Hi
Could somebody advise if I can set a stop using elder safe zone long? I’m trying to use the safe zone level at the point of trade entry. Is it possible timestamp or identify the candle at point of entry (TRADEPRICE perhaps?) and then use the safe zone indicator level at that point in time?
Problem is I think I will end up identifying the current safe zone level instead of the previous (n) bars.
Many thanks
Pete
Maybe TRADEINDEX would be more suitable?
This is where I’m at at present, it seems to be getting there but not sure if its as efficient as it could be?
// Conditions to exit long positions. Firstly define safezone long level at time of trade entry. Use this level as a stop. For profit target multiply this risk amout to achieve risk reward level.
indicator2 = CALL "Elder - SafeZone Long"[2, 99]
indicator3 = CALL "Elder - Chandelier Long"[3, 22]
IF ONMARKET AND (BarIndex-TradeIndex = 0) THEN
myRisk = TRADEPRICE - indicator2[1]
ENDIF
IF LONGONMARKET AND Low <= TRADEPRICE-myRisk THEN
SELL AT MARKET
ENDIF
myReward =myRisk*10
IF LONGONMARKET AND High >= TRADEPRICE + myReward AND close <= indicator3[1] THEN
SELL AT MARKET
ENDIF