Technical Studies Reference


Moving Average - Adaptive Binary Wave

This study calculates the binary wave for Kaufman's Adaptive Moving Average. Refer to that study to familiarize yourself with the notation used here.

Just as with the Adaptive Moving Average, this study relies on the Inputs Input Data \(X\), Length \(n\), Fast Smoothing Constant \(c_F\), and Slow Smoothing Constant \(c_S\). The study also has an additional Input, namely the Filter Percentage \(f\).

For the given Inputs, the Variance \(Var_t(X,n)\) and Standard Deviation \(\sigma_t(X,n)\) are calculated in terms of Simple Moving Averages at chart bar \(t\) as follows.

\(Var_t(X,n) = MA_t\left(X^2,n\right) - \left(MA_t(X,n)\right)^2\)

\(\sigma_t(X,n) = \sqrt{Var_t(X,n)}\)

Next we define two functions \(AMALow_t(X,n)\) and \(AMAHigh_t(X,n)\) at chart bar \(t\) as follows.

For \(t = 0\):

\(AMALow_0(X,n) = AMAHigh_0(X,n) = AMA_0(X,n)\)

For \(t > 0\):

\(\displaystyle{AMALow_t(X,n) = \left\{ \begin{matrix} AMA_t(X,n) & AMA_t(X,n) < AMA_{t-1}(X,n) \\ AMALow_{t-1}(X,n) & AMA_t(X,n) \geq AMA_{t-1}(X,n) \end{matrix}\right .}\)

\(\displaystyle{AMAHigh_t(X,n) = \left\{ \begin{matrix} AMAHigh_{t-1}(X,n) & AMA_t(X,n) \leq AMA_{t-1}(X,n) \\ AMA_t(X,n) & AMA_t(X,n) > AMA_{t-1}(X,n) \end{matrix}\right .}\)

The function \(AMALow\) only changes value if the Adaptive Moving Average decreases from chart bar \(t-1\) to chart bar \(t\). The function \(AMAHigh\) only changes value if the Adaptive Moving Averaage increases from chart bar \(t-1\) to chart bar \(t\).

Finally, the Binary Wave is calculated. We denote the value of the Binary Wave at chart bar \(t\) for the given Inputs as \(BW_t(X,n,f)\), and we compute it as follows.

\(\displaystyle{BW_t(X,n,f) = \left\{ \begin{matrix} 1 & AMA_t(X,n) - AMALow_t(X,n) > \frac{f}{100}\sigma_t(X,n) \\ -1 & AMAHigh_t(X,n) - AMA_t(X,n) > \frac{f}{100}\sigma_t(X,n) \\ 0 & otherwise \end{matrix}\right.}\)

Inputs

  • Input Data
  • Length
  • Fast Smoothing Constant: This is the Length of a fast-moving Exponential Moving Average. It should be set to a value that is less than that of the Input Slow Smoothing Constant to obtain sensible results.
  • Slow Smoothing Constant: This is the Length of a slow-moving Exponential Moving Average.
  • Filter Percent: This Input, together with the Standard Deviation, determines the lower bound on both \(AMA_t(X,n) - AMALow_t(X,n)\) and \(AMAHigh_t(X,n) - AMA_t(X,n)\), which in turn determine the value of \(BW_t(X,n,f)\).

*Last modified Friday, 09th June, 2017.