Job finished
Specification
I need an indicator that is going to look at several order blocks (OBs) across multiple timeframes.
Definition of order block
An order block is a candlestick pattern formed by either 3 or 4 candles.
Normal order block:
Candle | Bullish | Bearish |
---|---|---|
A | Bearish Candle | Bullish Candle |
B | Bearish Candle & Close < Candle A Low | Bullish Candle & Close > Candle A High |
C | Bullish Candle & Close > Candle B High | Bullish Candle & Close > Candle B High |
OB values
- Open - Open of Candle B
- High - High of Candle B
- Low - Low of Candle B
- Close - Close of Candle B
Order block + Fair Value Gap
Candle | Bullish | Bearish |
---|---|---|
A | Bearish Candle | Bullish Candle |
B | Bearish Candle & Close < Candle A Low | Bullish Candle & Close > Candle A High |
C | Bullish Candle & Close > Candle B High | Bullish Candle & Close > Candle B High |
D | Candle D Low > Candle B High | Candle D High < Candle B Low |
- Bullish
- Open - Open of Candle B
- High - High of Candle B
- Low - High of Candle D
- Close - Close of Candle B
- Bearish
- Open - Open of Candle B
- High - Low of Candle D
- Low - Low of Candle B
- Close - Close of Candle B
How must it behave
The Indicator needs to search across multiple timeframes for the order blocks and display horizontal lines on the chart for the one of the selected values:
- High (bullish ob) /Low (bearish ob)
- Open
- Both
When price closes above (bullish ob) /below (bearish ob) these lines need to be deleted, otherwise they are updated with right coordinate as current time.
Inputs
- Order block type (Enum)
- Order block
- Order block + FVG
- Order block zone (enum)
- High/Low
- Open
- Both
- M1 Opposing? (bool)
- M2 Opposing? (bool)
- ... m3, m4, m5, m6, m10, m12,m15,m20,m30,h1,h2,h3,h4,d1 (bool)
How it must look like
Returning Buffers
It needs to return the following buffers.
- Closest Bullish Value
- Closest Bearish Value
These values are the closest lines in regards to current price. The buffer needs to always display a value (unless of course there are no Order blocks).
Things to note
Closest Bullish Value can never be > current price
Closest Bearish Value can never be < current price