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
I am a MQL4 novice and have spent hours trying to solve this. Please help! I would really appreciate it.
Here it is:
{ ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0,0,12345,0,Green); if(ticket>0) { if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Alert("BUY order opened : ",OrderOpenPrice()); } else Alert("Error opening BUY order : ",GetLastError()); return; } //--- modifying the order if(Close[1]>1.10001) Alert("Modifying the order"); bool buyres; buyres=OrderModify(ticket,0,0,Ask+TakeProfit*Point,0); if(buyres==false) { Alert("Error modifying BUY order : ",GetLastError()); } else { Alert("Order modified successfully"); }Thank you!