Download MetaTrader 5

Trailing stop

To add comments, please log in or register
Are you a real pro? Share your knowledge with millions of traders!
ammygo 2014.02.17 19:59 

Hi, I have one small problem with trailing stop programing.

                  bool res1=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(Bid-Point*TrailingStop,Digits),OrderTakeProfit(),0,Blue);  

 What I want then price go up, stop loss go up also with distance 50 points, but then price go down stop loss dont move.

This code works fine with BUY order, but I dont know how to do the same for SELL order (then price go down stop loss go down also, but then price go up stop loss dont move)

Can anyone hellp me? thanks. 

Alain Verleyen
Alain Verleyen 2014.02.17 20:04  


This forum is about MT5/mql5, please post your question about MT4/mql4 on forum.

To add comments, please log in or register