Lookback or hold indicator value for confirmation
-
Hi,
I’m trying to program the following:
When RSI cross 50, look back certain amount of bars (ex. 50 bars) to confirm if RSI was in an overbought/oversold region. If so, then proceed with buy or sell.
Thanks,
-
@hjmr here: https://fxdreema.com/shared/AHuqK5DSb
The draw line is only for visualization
-
Thank you for your fast response and sharing the program. I was looking at it. So the 2,3 and 7,8 blocks are performing the lookback? I‘ll keep studying your code.
Thanks,
-
@hjmr yes! When detecting the 50 cross, block 1 first resets the cid variable ("candle id") to 0. Then the loop keeps increasing the number, looking for rsi 70 or reaching the limit (lookback)
-
@roar
Thank you. Im used to eabuilder and transitioning to fxdreema. Have to keep learning. This was of great help.