Can anyone please help ?

 

Is it possible to use a moving average value as a trailing stop ? If yes how do I program that in to an Ea. I have a trailing stop at present that trails X amount (set by user) from the present price. I want to get the value of the MA which I can do. But if I just try and use this value as the stop loss the broker throws an error when I try to modify the order. I assume I have to do a calculation on it and find the difference between present price and the Ma and use the point difference in the modify order command. Is this correct and if so how do i do it ?

 

hi,

maybe it will really help if you tell us the error message that you get.

you should compared your TR or SL value with the stoplevel value (MarketInfo(Symbol(),MODE_STOPLEVEL)) from your broker before you modified your order and don't forget to normallize the value you get from the indicator.

sorry for my english

Reason: