Adjusting EMA OCO limit take profit level every new bar
-
Hi,
I have a simple strategy that uses an EMA as the profit target, when the order is opened it sets it at the previous candles ema price level,
I would like to get my EA to adjust this with every new bar to the last candles (-1) EMA value so that as it declines the preset target is adjusted down
Reasons being that at present if the internet or platform crashes, there is no fallback to take any profit, also having preset targets allows you to specify whether bid or ask prices trigger the exit taking into account the spread in real time
Can anyone offer some help?
I've built some basic EA's that operate as intended, but still a relative beginner.... -
This should do it, once per bar - pink for each - modify stops (set as original to EMA)
-
Thank you jstap... perfect!
-
@DV4 --
