-
if(takeProfit=takeProfit/2)
That statements divides takeProfit by to, assigns it back to takeProfit, and since it is non-zero, it is always true.
- themasterx7: I'm struggling with making my stopLose break even when my take profit reaches the half way I did this code but it doesn't work. can you help me ?
You can't do it in OrderSend.
- On my Do Not Help List, live in ignorance.
https://www.mql5.com/en/forum/355754#comment_19269451
https://www.mql5.com/en/forum/356097/page2#comment_19354226
William Roeder:
-
That statements divides takeProfit by to, assigns it back to takeProfit, and since it is non-zero, it is always true.
-
You can't do it in OrderSend.
- On my Do Not Help List, live in ignorance.
https://www.mql5.com/en/forum/355754#comment_19269451
https://www.mql5.com/en/forum/356097/page2#comment_19354226
Once again if you are not willing to help stop wasting both of our time and don't replay to any of my posts, I'm not asking for your help there a lot of good people here I ask them not you .
Thank You and Goodbye.
ticket= OrderSend(Symbol(),OP_BUY,lotSize,Ask,3,0,0,NULL,0,0,Red); //.................................................... for(int b=OrdersTotal()-1;b>=0;b--) { if(OrderSelect(b,SELECT_BY_POS,MODE_TRADES)) if(OrderSymbol()==Symbol()) if(OrderType()==OP_BUY) { if(OrderStopLoss()<=(Bid - stopLose*_Point)) mod= OrderModify(OrderTicket(),OrderOpenPrice(),(Bid -stopLose*_Point),(Bid + takeProfit*_Point),0,Red); } }
I used OrderModify but nothing I cant make it break even.

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
Hello
I'm struggling with making my stopLose break even when my take profit reaches the half way I did this code but it doesn't work.
can you help me ?
thanks