Corpus Christi, TX / Westcliffe, CO
Experience: Advanced
Platform: NinjaTrader
Broker: DDT / Rithmic / Kinetick / IQ
Trading: 6E, ES
Posts: 420 since Oct 2010
Thanks Given: 24
Thanks Received: 1,022
|
I think what you are actually interested in is Periodicity... the interval (bar count) between Cycle Highs and between Cycle Lows. Many indicators that plot Zig-Zag or Swing will be tracking Swing Highs and Swing Lows and will record the bar count between the Low - High and High - Low... but not High - High or Low- Low, which is what you want. If you look at the language in the code of Zig-Zag or Swing you will see something like " Length = Low(0) Bar Number - High(0) Bar Number".
What you want is Length = Prior High(0) Bar Number - High(0) Bar Number to get the duration between Cycle ( Swing) Highs.
This is the code re-write for NT7 Price Action Swing that may help you:
// curLowDuration = curLowBar - curHighBar; Original code that defines duration as LowBar - HighBar
curLowDuration = (curLowBar - lastLowBar); New code the re-defines duration as LowBar - last (or prior) LowBar.
Once you have access to these values it is a simple matter to come up with a projection based on an average duration. You then need to decide how many occurrences to use in the average. I use 5. A way to figure this out is to consider that you are identifying Minor Cycles inside a Dominant Cycle so you will want to incorporate a few of the Minor Cycle durations from the prior Dominant Cycle so your average will reflect past durations but emphasize recent durations. When moving sideways in a consolidation durations will tend to be shorter ( @ 1/2) than when trending so that needs to be considered. It is useful to think of the average as "X" but that it can be as short as "Y" or as long as "Z" and that the difference is often +/- the Half-Span of "X".
[ATTACH][/ATTACH]
|