how to code SL and TP as as the distance between price and specified MA

 

Hello fellow coders,

can anyone of you give me a hint, how to code an EA, where the SL should be the amount of pips between open pric of the tradee and an identified MA value of the previous candle? and the same for TP?

Thank you :)

 
vitabo:

Hello fellow coders,

can anyone of you give me a hint, how to code an EA, where the SL should be the amount of pips between open pric of the tradee and an identified MA value of the previous candle? and the same for TP?

Thank you :)

you can look into the codebase, there are hundreds

 
vitabo:

Hello fellow coders,

can anyone of you give me a hint, how to code an EA, where the SL should be the amount of pips between open pric of the tradee and an identified MA value of the previous candle? and the same for TP?

Thank you :)

look at the link : https://www.mql5.com/ru/code/33136 ( you can use translator to get details :) )

coded by Vladimir Karputov 

and give your thanks to him and other free coders ...

Reason: