I am learning to code using template from mql4trader, but I am stock. The experiment ea does not modify immediately it opens order until next
candle opens. Please, anybody, help me correct the ea to modify orders immediately after it is opened. thanks
- Help need modifying this EA trailing stop
- Pending Order EA
- How to open order
sol4live: Please, anybody, help me correct the ea to modify orders immediately after it is
opened.
int openbuy=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slip,0,0,"TEMPLATE",MagicNumber2,0,Lime); } if((OrderMagicNumber()==MagicNumber2)&&(OrderTakeProfit()==0)&&(OrderSymbol()==Symbol())){ int modify1=OrderModify(OrderTicket(),0,OrderStopLoss(),tpb,0,CLR_NONE); } if((OrderMagicNumber()==MagicNumber1)&&(OrderTakeProfit()==0)&&(OrderSymbol()==Symbol())){ int modify2=OrderModify(OrderTicket(),0,OrderStopLoss(),tps,0,CLR_NONE); }
- You can not use any Trade Functions unless you select an order first.
- There is no need to open an order and then set the stops. Simplify your code - do it in one step. TP/SL on OrderSend
has been fine for years.
Build 500 № 9 2013.05.09
Need help me mql4 guru add take profit to this EA - Take Profit - MQL4 programming forum 2017.09.27 - Why did you post your MT4 question in the Root / MT5 General
section instead of the MQL4 section, (bottom of the Root
page?)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Next time post in the correct place. The moderators will likely move this thread there soon. - Are your books one column but two feet wide? No because that is unreadable. They are 6 inches, sometimes two columns, so you can read it
easily. So should be your code. We're not going to go scrolling (or moving my eyes) back and forth trying to read it.
William Roeder:
Thank you.
- You can not use any Trade Functions unless you select an order first.
- There is no need to open an order and then set the stops. Simplify your code - do it in one step. TP/SL on OrderSend
has been fine for years.
Build 500 № 9 2013.05.09
Need help me mql4 guru add take profit to this EA - Take Profit - MQL4 programming forum 2017.09.27 - Why did you post your MT4 question in the Root / MT5 General
section instead of the MQL4 section, (bottom of the Root
page?)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Next time post in the correct place. The moderators will likely move this thread there soon. - Are your books one column but two feet wide? No because that is unreadable. They are 6 inches, sometimes two columns, so you can read
it easily. So should be your code. We're not going to go scrolling (or moving my eyes) back and forth trying to read it.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register