jasondhadley

McGinley Dynamic Range

244
Changed the formula from the TradingView formula to reflect the true formula that McGinley created.
The difference is that according to MvGinley you want to take half of the period length and not the whole length when calculating the average. This is because he put more emphasis on the relevancy of newer data compared to old.

The other addition is plotting 2 averages, one based on Close pricing and the other based on Open pricing to create envelopes. This can also show when momentum reverses either direction. This is optional, un-check the box in the input settings.
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.

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.

Want to use this script on a chart?