Convergence/Divergence Oscillator
factor.formula
BIAS (bias ratio):
DIF (Difference of Deviation):
DBCD (DBCD Oscillator):
SMA(X, N, M) (Weighted Moving Average):
The meaning of each parameter in the formula is as follows:
- :
The closing price of the current period, indicating the last trading price during this period.
- :
N₁ period simple moving average of closing prices. It represents the average of the closing prices over the past N₁ periods and is used to smooth price fluctuations.
- :
The length of the period for calculating the simple moving average, the default value is 5. This parameter determines how sensitive the moving average is to price fluctuations. Smaller N₁ values make the moving average more sensitive, larger ones make it smoother.
- :
The Bias Rate indicates the degree to which the current closing price deviates from its N₁ period simple moving average. A positive value indicates that the current price is higher than the average, while a negative value indicates the opposite. It reflects the short-term volatility of the price.
- :
The length of the period for calculating the difference in deviation (DIF), the default value is 16. DIF is the difference between the current deviation and the deviation N₂ periods ago, which indicates the speed and trend of the change in the deviation. A larger N₂ value makes DIF more sensitive to long-term changes in the deviation.
- :
The moving average period for calculating DBCD, the default value is 17. This parameter determines the degree of smoothing of DIF by DBCD. A smaller N₃ value makes DBCD more sensitive, while a larger value makes it smoother, thus reducing noise signals.
- :
The input value can be any time series data, here it refers to the input sequence that needs to calculate the moving average.
- :
The length of the moving average period. It determines the degree of smoothing of the moving average.
- :
The weight of the current data. When M=1, it means simple moving average (SMA); when M>1, it means weighted moving average (WMA), giving more weight to the current data.
- :
The weighted moving average of the previous period is used to recursively calculate the current weighted moving average. Note: In some literature, weighted moving average is represented by WMA.
- :
The weighted moving average is the moving average result calculated based on X and M in the current period.
factor.explanation
The core idea of DBCD is to perform secondary processing on the deviation rate. First, the deviation rate of the current closing price and its N₁-period simple moving average is calculated, and then the difference between the current deviation rate and the deviation rate N₂-period ago is calculated, and finally the difference is smoothed for N₃-period. The advantage of DBCD is that it can effectively reduce noise through difference and moving average smoothing, thereby generating clearer and more stable overbought and oversold signals. Its usage is similar to the deviation rate. When DBCD reaches a certain height, it may indicate overbought, and when DBCD is at a low level, it may indicate oversold. Traders can use the intersection of DBCD or combine it with other indicators to make trading decisions. It should be noted that the parameter settings of DBCD (N₁, N₂, N₃) will significantly affect its sensitivity and signal quality, and need to be adjusted according to specific market conditions and trading products.