OPEN-SOURCE SCRIPT

Straightened Price Curve

This is another among zillions of attempts at a moving average of a security. More precisely, two attempts at one go). The zzoid function generates a zigzag-like MA that can adopt different forms. The stepline function creates, sure enough, a stepline.
curveMoving AveragessteplinestreightenedTrend AnalysisVolatilityZigzagzzoid

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 publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer