Function Sawtooth Wave

This is an indicator to draw a sawtooth wave on the chart.

It can be a useful perspective, as decaying markets tend to oscillate in reverse sawtooth waves, and bullish markets can oscillate in conventional sawtooth waves. With the right inputs, it can be an early warning signal for potential movements.

Something I've noted is that large waves cause a ripple effect and sets the frequency for the market until a change occurs. Sawtooth waves may help in capturing ripple waves.

Useful inputs are:
- Average True Range as wave height (amplitude)
- Periodicity of market as wave duration (frequency)
(Inputs will change the wave from conventional to reverse)

I hope that it is helpful.

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.


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.

Want to use this script on a chart?