ka66

ka66: Average Range

Plots the average range of current symbol, in a particular resolution (daily by default) averaged across a configurable period (20 by default). Increase or decrease precision through the UI to make it better applicable to your instrument. The default precision is set to 4, useful for most forex pairs pip counting (multiply by 10,000 to get the pip value). But for USDJPY, you might change it to 2 (multiply by 1,00 to get the pip value). Range is defined as (high - low).

For different measures of ticks, you can set the Scale Multiplier input to adjust the scale by some factor. Deliberately allowing floats. In the Forex example, if you did not wish to mentally calculate pips, you would set the multiplier to 10,000 for 4-decimal place pairs and 100 for 2-decimal place pairs. Defaults to 1.

Inputs:
  • Resolution, the timeframe to use
  • Averaging Period, no. of past bars to average over. Just using a simple moving average.
  • Scale Multiplier, a positive integer value to multiply the scale by
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?