As shown in the picture Nwma is performing better than DEMA, TEMA, EMA, and other common used moving averages such as Hull MA that is prone to overshooting. With NWMA lag is extremely reduced.
Nyquist Criterion In signal processing theory, the application of a MA to itself can be seen as a Sampling procedure. The sampled signal is the MA (referred to as MA1) and the sampling signal is the MA as well (referred to as MA2). If additional periodic cycles which are not included in the price series are to be avoided sampling must obey the Nyquist Criterion [1, 4]. With the cycle period as parameter, the usual one in Technical Analysis, the Nyquist Criterion reads as follows: n1 = λ*n2 , with λ ≥ 2. n1 is the cycle period of the sampled signal to which a sampling signal with cycle period n2 is applied. n1 must at least be twice as large as n2. In Mulloy´s and Ehlers´ approaches (referred to as Moving Averages 2.0) both cycle periods are equal. Moving Averages 3.0 Using the Nyquist Criterion there is a relation by which the application of a MA to itself can be described more precisely. In figure 2 a price series C (black line), one MA (MA1, red line) with lag L1 to the price series and another MA with lag L2 to MA1 (MA2, blue line) are illustrated. Based on the approximation and the relations described in figure 2 the following equation holds: (1) D1/D2 = (C – MA1)/(MA1 – MA2) = L1/L2 According to the lag formulas in the introduction L1/L2 can be written as follows:
α := L1/L2 = (n1 – 1)/(n2 – 1).
In this expression denominator 2 for the SMA and EMA as well as denominator 3 for the WMA are missing. α is therefore valid for all three MAs.
Using the Nyquist Criterion one gets for α the following result: (2) α = λ* (n1 – 1)/(n1 – λ). α put in (1) and C replaced by the approximation term NMA, the notation for the new MA, one gets: NMA = (1 +α) MA1 – α MA2. In detail, equation (2) reads as follows: (3) NMA[price/ n1, n2] = (1 + α) MA1[price/ n1 ] – α MA2[MA1/ n2], (4) α = λ* (n1 – 1)/(n1 – λ), with λ ≥ 2. (3) and (4) are equations for a group of MAs (notation: Moving Averages 3.0). They are independent of the choice of an MA. As the WMA shows the smallest lag (see introduction), it should generally be the first choice for the NMA. n1 = n2 results in the value 1 for α and λ, respectively. Then equation (3) passes into Ehlers´ formula. Thus Ehlers´ formula is included in the NMA formula as limiting value. It follows from a short calculation that the lag for NMA results in a theoretical value zero.
진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.