Please use this to post code . . . it makes it easier to read.
take a look here for trailing SL :http://crum.be/trailsl
fm=OrdModify(OrderTicket(),OrderOpenPrice(),ldTakeProfit,OrderStopLoss(),0,CLR_NONE);
- OrdModify is custom function or your code DOESN'T compile.
- Did you OrderSelect() the order, otherwise OrderTicket(), OrderOpenPrice(), etc are meaning less.
- Always test return codes.
if (!OrderModify(...) Alert("OrderModify failed: ",GetLastError());

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 want to make a negative trailing stops.I pasted code which makes takeprofit 0 when it goes for exzample -10 pips.But it gives error...
void TrailingPositions() {