PROTECTED SOURCE SCRIPT
Updated

Statistical pivot wave - Average periods and drawdowns

13 554
Statistical pivot wave - Average cycle periods and drawdowns (and assuming there is a trend)

How does these cycle periods and drawdowns come from?
Collecting the data from the last 70 pivot waves. Pivot waves are defined by once a new pivot low is recognized.

Explanation of variables:
Period(i) : Timespan from one pivot low to its previous pivot low.
Drawdown(i) : Max drawdown (from 22 bars lookback high + trend adjustment)
Trend(up / down): Historical linear regression

Median cycle: Median value of Period(i), based on i=1 to i=70 pivot waves data.
Median drawdown: Median value of Drawdown(i), from the trend projected high, based on i=1 to i=70 pivot waves data.
Release Notes
A new input variable updated.
Now the users could specify the total number of the most recent observed pivot waves period, in the input panel.

Indicator where observations = 10:
snapshot

Indicator where observations = 70:
snapshot
Release Notes
Not the indicator allows change of colors.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.