How to Stoploss change each tick?

To add comments, please log in or register
jrrchagas Chagas
13
jrrchagas Chagas  
Hi,
I am try to make a EA with stoploss following the moving average. 
After buy just sell when the price touch the moving average(ema[ ]). 
Using stoploss = ema [0] in trade system, the sl set to the ema of bought. 
I would like to programming stoploss to changing every tick.
It s possible? 
Magruder Trading Group, Inc.
167
Chad Magruder  

Yes, possible. Very easy...

Files:
SL_EMA.mq4 3 kb
iRick
201
iRick  
jrrchagas Chagas:
Hi,
I am try to make a EA with stoploss following the moving average. 
After buy just sell when the price touch the moving average(ema[ ]). 
Using stoploss = ema [0] in trade system, the sl set to the ema of bought. 
I would like to programming stoploss to changing every tick.
It s possible? 

What's the point of constantly moving the SL around, surely you could just say when price crosses EMA(0) then close

To add comments, please log in or register