Does anyone have or is aware of a free simple buy and sell button EA (not script) with mql file (so that it can be edited with own MM)...
Thanks in advance...
Thanks in advance...
Can I execute trades via buy/sell button with an EA? 0 replies
Simple Buy/Sell/Close Button 18 replies
Simple buy/sell script for Oanda mt4 5 replies
Program Buy/Sell button with MT4 12 replies
I am looking for EA to put Buy Stops, Buy limits, Sell limits, and Sell Stops. I will 0 replies
//+------------------------------------------------------------------+ //| TesterTrades.mq4 | //| Keith Watford | //| none | //+------------------------------------------------------------------+ #property copyright "Keith Watford" #property link "none" #property version "1.00" #property strict //--- input parameters input int MagicNumber=99; input double LotSize=1; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { if(IsTesting()) { string name; string heading[4]={"Buy","Sell","Stop","TP"}; int xc=5; int yc=30; for(int i=0;i<2;i++) { name=heading[i]; ObjectCreate(0,name,OBJ_BUTTON,0,0,0); ObjectSetText(name,name,10,"Arial",clrBlue); ObjectSetInteger(0,name,OBJPROP_XDISTANCE,xc); ObjectSetInteger(0,name,OBJPROP_YDISTANCE,yc); yc+=20; } for(int i=2;i<4;i++) { name=heading[i]; ObjectCreate(0,name,OBJ_LABEL,0,0,0); ObjectSetText(name,name,10,"Arial",clrBlue); ObjectSetInteger(0,name,OBJPROP_XDISTANCE,xc); ObjectSetInteger(0,name,OBJPROP_YDISTANCE,yc); ObjectSetInteger(0,name,OBJPROP_SELECTED,false); yc+=20; } name="EditSL"; ObjectCreate(0,name,OBJ_EDIT,0,0,0); ObjectSetText(name,DoubleToStr(0,Digits),10,"Arial",clrRed); ObjectSetInteger(0,name,OBJPROP_XDISTANCE,xc+50); ObjectSetInteger(0,name,OBJPROP_YDISTANCE,70); ObjectSetInteger(0,name,OBJPROP_XSIZE,60); ObjectSetInteger(0,name,OBJPROP_YSIZE,20); name="EditTP"; ObjectCreate(0,name,OBJ_EDIT,0,0,0); ObjectSetText(name,DoubleToStr(0,Digits),10,"Arial",clrRed); ObjectSetInteger(0,name,OBJPROP_XDISTANCE,xc+50); ObjectSetInteger(0,name,OBJPROP_YDISTANCE,90); ObjectSetInteger(0,name,OBJPROP_XSIZE,60); ObjectSetInteger(0,name,OBJPROP_YSIZE,20); } //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { if(IsTesting()) { string name="Buy"; if(ObjectGetInteger(0,name,OBJPROP_STATE)==true) { ObjectSetInteger(0,name,OBJPROP_STATE,false); double sl=StrToDouble(ObjectGetString(0,"EditSL",OBJPROP_TEXT)); double tp=StrToDouble(ObjectGetString(0,"EditTP",OBJPROP_TEXT)); int ticket=OrderSend(Symbol(),OP_BUY,LotSize,Ask,50,sl,tp,NULL,MagicNumber,0,clrNONE); } name="Sell"; if(ObjectGetInteger(0,name,OBJPROP_STATE)==true) { ObjectSetInteger(0,name,OBJPROP_STATE,false); double sl=StrToDouble(ObjectGetString(0,"EditSL",OBJPROP_TEXT)); double tp=StrToDouble(ObjectGetString(0,"EditTP",OBJPROP_TEXT)); int ticket=OrderSend(Symbol(),OP_SELL,LotSize,Ask,50,sl,tp,NULL,MagicNumber,0,clrNONE); } } //--- }
#property copyright "Keith Watford" #property link "none" #property version "1.00" #property strict //--- input parameters input int MagicNumber=99; input double LotSize=1; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { //if(IsTesting()) { string name; string heading[4]={"Buy","Sell","Stop","TP"}; int xc=5; int yc=30; for(int i=0;i<2;i++) { name=heading[i]; ObjectCreate(0,name,OBJ_BUTTON,0,0,0); ObjectSetText(name,name,10,"Arial",clrBlue); ObjectSetInteger(0,name,OBJPROP_XDISTANCE,xc); ObjectSetInteger(0,name,OBJPROP_YDISTANCE,yc); yc+=20; } for(int i=2;i<4;i++) { name=heading[i]; ObjectCreate(0,name,OBJ_LABEL,0,0,0); ObjectSetText(name,name,10,"Arial",clrBlue); ObjectSetInteger(0,name,OBJPROP_XDISTANCE,xc); ObjectSetInteger(0,name,OBJPROP_YDISTANCE,yc); ObjectSetInteger(0,name,OBJPROP_SELECTED,false); yc+=20; } name="EditSL"; ObjectCreate(0,name,OBJ_EDIT,0,0,0); ObjectSetText(name,DoubleToStr(0,Digits),10,"Arial",clrRed); ObjectSetInteger(0,name,OBJPROP_XDISTANCE,xc+50); ObjectSetInteger(0,name,OBJPROP_YDISTANCE,70); ObjectSetInteger(0,name,OBJPROP_XSIZE,60); ObjectSetInteger(0,name,OBJPROP_YSIZE,20); name="EditTP"; ObjectCreate(0,name,OBJ_EDIT,0,0,0); ObjectSetText(name,DoubleToStr(0,Digits),10,"Arial",clrRed); ObjectSetInteger(0,name,OBJPROP_XDISTANCE,xc+50); ObjectSetInteger(0,name,OBJPROP_YDISTANCE,90); ObjectSetInteger(0,name,OBJPROP_XSIZE,60); ObjectSetInteger(0,name,OBJPROP_YSIZE,20); } //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- } //+------------------------------------------------------------------+ //| ChartEvent function | //+------------------------------------------------------------------+ void OnChartEvent(const int id, const long &lparam, const double &dparam, const string &sparam) { if(id==CHARTEVENT_OBJECT_CLICK) { string name="Buy"; if(ObjectGetInteger(0,name,OBJPROP_STATE)==true) { ObjectSetInteger(0,name,OBJPROP_STATE,false); double sl=StrToDouble(ObjectGetString(0,"EditSL",OBJPROP_TEXT)); double tp=StrToDouble(ObjectGetString(0,"EditTP",OBJPROP_TEXT)); int ticket=OrderSend(Symbol(),OP_BUY,LotSize,Ask,50,sl,tp,NULL,MagicNumber,0,clrNONE); } name="Sell"; if(ObjectGetInteger(0,name,OBJPROP_STATE)==true) { ObjectSetInteger(0,name,OBJPROP_STATE,false); double sl=StrToDouble(ObjectGetString(0,"EditSL",OBJPROP_TEXT)); double tp=StrToDouble(ObjectGetString(0,"EditTP",OBJPROP_TEXT)); int ticket=OrderSend(Symbol(),OP_SELL,LotSize,Ask,50,sl,tp,NULL,MagicNumber,0,clrNONE); } } //--- }
Disliked{quote} Thanks for the post and contribution. I should have mentioned that I'm also looking for an mql file it since I plan to modify the MM and lot sizing per order. Just need to buttons to work and send the trades, the rest I plan to modify. Thanks anyway.Ignored
Disliked{quote} Thanks for the post and contribution. I should have mentioned that I'm also looking for an mql file it since I plan to modify the MM and lot sizing per order. Just need to buttons to work and send the trades, the rest I plan to modify. Thanks anyway.Ignored
Disliked{quote} Okay, i just found a useful script yesterday credited to the author @Sangmane. This is quite have fun and perfect script (have tested it today on demo) http://www.forexfactory.com/showthre...59#post8547559 I think u can adjust it with anything your rule, MM or fixed size. No Button, but a dropdown order type list. Have fun bro.Ignored
DislikedHello, This is the code that I use when I have to open trades manually when testing in the strategy tester. Unfortunately OnChartEvent doesn't work in the tester, so I have to have it in OnTick //+------------------------------------------------------------------+ //| TesterTrades.mq4 | //| Keith Watford | //| none | //+------------------------------------------------------------------+ #property copyright "Keith Watford" #property link "none" #property version "1.00" #property strict //--- input parameters input int MagicNumber=99; input double...Ignored
DislikedDoes anyone have or is aware of a free simple buy and sell button EA (not script) with mql file (so that it can be edited with own MM)... Thanks in advance...Ignored
DislikedHello, My proposal is the attached EA that is not opening orders but will help traders to place buy/sell orders predefined with SL/TP/trailing stop. Very useful in testing skills. Enjoy! {file}Ignored