peacefulLizard50262

Gaussian Moving Average (GA)

peacefulLizard50262 アップデート済   
The Gaussian moving average (GA) is a technical analysis tool that is used to smooth out price data and identify trends. It is similar to a simple moving average (SMA), but instead of using equal weights for each value in the calculation, it uses a Gaussian distribution to assign weights. This means that the values at the edges of the calculation window have lower weights and are given less importance in the moving average calculation, while the values at the center of the window have higher weights and are given more importance. This helps to reduce the impact of noisy or outlying data points on the moving average and make it more responsive to changes in the underlying trend.

To calculate the GA, the script first defines the standard deviation of the Gaussian distribution. This is a measure of how spread out the values in the distribution are and can be adjusted to change the shape of the curve. The default value in the script is set to one quarter of the length of the calculation window, which gives a bell-shaped curve with a peak at the center of the window.

Next, the script generates an array of indices from 1 to the length of the calculation window. This is used to calculate the weights for each value in the moving average calculation. The weights are calculated using the Gaussian distribution, with the indices as the input values and the standard deviation as a parameter. This produces a set of weights that are highest at the center of the window and decrease towards the edges.

Finally, the script calculates the weighted sum of the values in the calculation window using the weights. This is divided by the sum of the weights to give the moving average value. The resulting moving average is smoother and more responsive to changes in the underlying trend than a simple moving average, making it a useful tool for technical analysis.

Overall, this script is useful for analyzing financial data and identifying trends in the data. By using the Gaussian moving average, the script can smooth out fluctuations in the data and make trends more apparent, which can help traders make more informed decisions.
リリースノート:
major update

オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?