OPEN-SOURCE SCRIPT

Deviation Adjusted MA

アップデート済
Overview

The Deviation Adjusted MA is a custom indicator that enhances traditional moving average techniques by introducing a volatility-based adjustment. This adjustment is implemented by incorporating the standard deviation of price data, making the moving average more adaptive to market conditions. The key feature is the combination of a customizable moving average (MA) type and the application of deviation percentage to modify its responsiveness. Additionally, a smoothing layer is applied to reduce noise, improving signal clarity.

Key Components

Customizable Moving Averages
The script allows the user to select from four different types of moving averages:

Simple Moving Average (SMA): A basic average of the closing prices over a specified period.

Exponential Moving Average (EMA): Gives more weight to recent prices, making it more responsive to recent price changes.

Weighted Moving Average (WMA): Weights prices differently, favoring more recent ones but in a linear progression.

Volume-Weighted Moving Average (VWMA): Adjusts the average by trading volume, placing more weight on high-volume periods.

Standard Deviation Calculation
The script calculates the standard deviation of the closing prices over the selected maLength period.
Standard deviation measures the dispersion or volatility of price movements, giving a sense of market volatility.

Deviation Percentage and Adjustment

Deviation Percentage is calculated by dividing the standard deviation by the base moving average and multiplying by 100 to express it as a percentage.
The base moving average is adjusted by this deviation percentage, making the indicator responsive to changes in volatility. The result is a more dynamic moving average that adapts to market conditions.
The parameter devMultiplier is available to scale this adjustment, allowing further fine-tuning of sensitivity.

Smoothing the Adjusted Moving Average

After adjusting the moving average based on deviation, the script applies an additional Exponential Moving Average (EMA) with a length defined by the smoothingLength input.
This EMA serves as a smoothing filter to reduce the noise that could arise from the raw adjustments of the moving average. The smoothing makes trend recognition more consistent and removes short-term fluctuations that could otherwise distort the signal.

Use cases

The Deviation Adjusted MA indicator serves as a dynamic alternative to traditional moving averages by adjusting its sensitivity based on volatility. The script offers extensive customization options through the selection of moving average type and the parameters controlling smoothing and deviation adjustments.

By applying these adjustments and smoothing, the script enables users to better track trends and price movements, while providing a visual cue for changes in market sentiment.
リリースノート
Added watermark to code
Moving AveragesStandard DeviationTrend Analysis

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

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

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


----------------------------------------
discord.gg/Jxsw5Czc6r
----------------------------------------
他のメディア:

免責事項