Hi guys, I'm looking for some help to code an important indicator to spot major supply and demand levels on higher timeframes using a Zig Zag indicator as starting point.
Zig Zag indicator used to spot major swings:
The indicator must work like this:
The indicator must use an existing zigzag indicator (attached to this post) to spot major support and resistances. When a new swing is created, a new thin "box" should be created (supply or demand area) starting from the last candle of the swing. Here you have an example:
Few requirements:
1) Box center should be at the high or the low of the relative candle.
(So that if the box width is 20 pips, the box ranges from +10 pips from the high or low of the candle to -10 pips).
2) Box width must be customizable (in pips).
3) Box length should be calculated with this formula:
y * move in % of the swing that created said box
In other words, the box legth (in bars) is calculated multiplying the percentage zigzag swing move with a customizable number of bars.
For example:
We set our y value to 25 bars.
A box originated from a 6% zigzag swing must have a length of: 25 * 6 = 150 bars
A box originated from a 2% zigzag swing must have a length of: 25 * 2 = 50 bars
4) Box must be visible on multiple timeframes. For example, it should be possible to see D1 boxes from lower timeframes.
The final indicator should more or less look like this:
Thanks in advance.
Zig Zag indicator used to spot major swings:
Attached File(s)
High_Low_v2.mq4
3 KB
|
1,020 downloads
The indicator must work like this:
The indicator must use an existing zigzag indicator (attached to this post) to spot major support and resistances. When a new swing is created, a new thin "box" should be created (supply or demand area) starting from the last candle of the swing. Here you have an example:
Few requirements:
1) Box center should be at the high or the low of the relative candle.
(So that if the box width is 20 pips, the box ranges from +10 pips from the high or low of the candle to -10 pips).
2) Box width must be customizable (in pips).
3) Box length should be calculated with this formula:
y * move in % of the swing that created said box
In other words, the box legth (in bars) is calculated multiplying the percentage zigzag swing move with a customizable number of bars.
For example:
We set our y value to 25 bars.
A box originated from a 6% zigzag swing must have a length of: 25 * 6 = 150 bars
A box originated from a 2% zigzag swing must have a length of: 25 * 2 = 50 bars
4) Box must be visible on multiple timeframes. For example, it should be possible to see D1 boxes from lower timeframes.
The final indicator should more or less look like this:
Thanks in advance.