Apologies if the below sounds elementary but basically I would like to plot a shape/signal whenever candlestick that fulfills condition A cross under candlestick that fulfills condition B (within a lookback period).
Example:
Condition A = low < low[1] and close > low[1] Condition B = close [1] < low[2] and open < close
Is there a way for me to do it while also adding a lookback period (example, 5 bars, so Condition A candlestick will look to the left 5 bars to see whether it cross any Condition B candlestick)?
Thanks!!
Crossover and lookback periods