I'm looking to make a simple indicator. Here are the functionality i would like to program in:
1. Check candles from right to left, find a mimimum of 3, maximum of 7, basing candles (like the yellow highlighted region, shown in the image below).
2. Once found, draw a rectangle around the bodies of these candles, including the wicks. (if there are more than 7 basing candles, don't draw anything)
3. Repeat step one.
4. Repeat step two
5. if the second rectangle clashes with the first one, delete the first rectangle
6. Continue the check, until all candles viewable by the user on whichever timeframe has been complete.
I'm having two problems right now.
1. I don't know how to loop that candle check across the entire chart for a minimum of 3 candles.
2. how would i create it in a way that it is able to spot a set of basing candles or a consolidation zone?
Are there any indicators similar to this already out there?
Comment