I am working on creating an entry condition for stock algo trading using a 5-minute time frame. The strategy involves detecting a Marubozu candle followed by inside bar candles (candles with open and close within the high and low of the Marubozu candle). We want to take an entry when any subsequent candle closes above the high of the 5-minute Marubozu candle.
Here is the specific requirement:
- The first candle is a Marubozu candle, defined by the open being equal to the low and the close being equal to the high.
- The following candles should be inside bar candles, where the open and close remain within the high and low of the Marubozu candle. There may be multiple inside bar candles.
- The entry is triggered when any candle closes above the high of the Marubozu candle, which signals a breakout.
Could you please help me set this up within the platform? I have attached the screenshot of chart. please consider open and high price comparison with rounding. like if open = 100.05 and high is 100.10 then it should consider equal as rounding will be 100. or compare percentage like change percentage of open and high like 0.1 etc. Thanks
Thanks for your support.