OPEN-SOURCE SCRIPT

MA Deviation Rate (200,1 + H-Line @ 0,0)

By Ric-Free
Updated
// Original Script : Moving Average Deviation Rate by daisuke_gewinn
// Modified by Ric-Free September 25, 2024
// Added an Horizontal Blue Dotted Line at coordinates 0,0 on the Y axis
// Set the MA @ (200,1)

-----------------------------------------

This is the moving average divergence rate and a 2σ band.

Bollinger Bands plot the standard deviation of the movement,
but closing prices do not follow a normal distribution with respect to Bollinger Bands.

The moving average divergence rate, however, shows a normal distribution with respect to the standard deviation.

When the divergence rate exceeds 2σ, it indicates a trading opportunity.

-----------------------------------------

移動平均かい離率と、2σのバンドです。
ボリンジャーバンドは移動量の標準偏差を描画しますが、終値はボリンジャーバンドに対して正規分布を描きません。
移動平均かい離率は、標準偏差に対して正規分布を示します。

かい離率2σを超えた場合、トレードチャンスです。

-----------------------------------------

Credits below to respective devs
(pasted from original indicator)

-----------------------------------------
May 19, 2017
-----------------------------------------
Moving average deviation rate
-----------------------------------------

Simple moving average deviation rate and standard deviation.

The Bollinger band is momentum value standard deviation.
Bat the Bollinger band is not normal distribution to close price.

Moving average deviation rate is normal distribution.

This indicator is draw Moving average deviation rate and fill area 2σ standard devition.
If it exceeds 2σ, it is a trading opportunity.

-----------------------------------------
May 26, 2023
-----------------------------------------
Update : Release Notes
-----------------------------------------
Updated to the code you updated on the forum.
thank you @rendfirst(jp.tradingview.com/u/trendfirst/)

1) Added color when the rate crosses over the upper or lower boundaries.
I find a bright color helps me spot the crossover better.
2) Changed the standard deviations from a fixed value of 2 to user input.
3) Converted to v5.
Release Notes
// Original Script : Moving Average Deviation Rate by daisuke_gewinn
// Modified by Ric-Free September 25, 2024
// Added an Horizontal Blue Dotted Line at coordinates 0,0 on the Y axis
// Set the MA @ (200,1)

-----------------------------------------

This is the moving average divergence rate and a 2σ band.

Bollinger Bands plot the standard deviation of the movement,
but closing prices do not follow a normal distribution with respect to Bollinger Bands.

The moving average divergence rate, however, shows a normal distribution with respect to the standard deviation.

When the divergence rate exceeds 2σ, it indicates a trading opportunity.

-----------------------------------------

移動平均かい離率と、2σのバンドです。
ボリンジャーバンドは移動量の標準偏差を描画しますが、終値はボリンジャーバンドに対して正規分布を描きません。
移動平均かい離率は、標準偏差に対して正規分布を示します。

かい離率2σを超えた場合、トレードチャンスです。

-----------------------------------------

Credits below to respective devs
(pasted from original indicator)

-----------------------------------------
May 19, 2017
-----------------------------------------
Moving average deviation rate
-----------------------------------------

Simple moving average deviation rate and standard deviation.

The Bollinger band is momentum value standard deviation.
Bat the Bollinger band is not normal distribution to close price.

Moving average deviation rate is normal distribution.

This indicator is draw Moving average deviation rate and fill area 2σ standard devition.
If it exceeds 2σ, it is a trading opportunity.

-----------------------------------------
May 26, 2023
-----------------------------------------
Update : Release Notes
-----------------------------------------
Updated to the code you updated on the forum.
thank you @rendfirst(jp.tradingview.com/u/trendfirst/)

1) Added color when the rate crosses over the upper or lower boundaries.
I find a bright color helps me spot the crossover better.
2) Changed the standard deviations from a fixed value of 2 to user input.
3) Converted to v5.
averagebollinger_bandsBollinger Bands (BB)deviationmovingmoving_averageMoving Averagesmoving_average_deviationmoving_average_deviation_rateRATEStandard Deviation

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