you must look here
if(Ticket03 > 0) { if(OrderSelect(Ticket03,SELECT_BY_TICKET)==true) { TP = OrderOpenPrice()+(TakeProfit*Dig)*Point; SL = OrderOpenPrice()-(StopLoss*Dig)*Point; OrderModify(OrderTicket(),OrderOpenPrice(),0,TP,0,Green); Print("OrderSend Success for Symbol : ",OrderSymbol()," Opposite"); Print("Loss Points : ",Opp); return(0); } }
if the Order is Buy or Sellorder
if(Ticket03 > 0) { if(OrderSelect(Ticket03,SELECT_BY_TICKET)==true) { if(OrderType()==OP_BUY) { TP = OrderOpenPrice()+(TakeProfit*Dig)*Point; SL = OrderOpenPrice()-(StopLoss*Dig)*Point; } if(OrderType()==OP_SELL) { TP = OrderOpenPrice()-(TakeProfit*Dig)*Point; SL = OrderOpenPrice()+(StopLoss*Dig)*Point; } OrderModify(OrderTicket(),OrderOpenPrice(),0,TP,0,Green); Print("OrderSend Success for Symbol : ",OrderSymbol()," Opposite"); Print("Loss Points : ",Opp); return(0); } }
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Dear's,
Kindly i need your help me on the below as it's open oppsite trade for one trade exsit,but while i test it it some time calculate take profie (Open Order Price-20 point) and this right and sometimes (Open Order Price-2000 point) calculate and this wrong
Please Heeeeelp