Search This Blog

Thursday, March 14, 2019

Using spreadsheet to produce DMI indicators (Directional Movement Index)

Stock Exchange and Market Analysis
Technical Analysis (22)

Trend indicators DMI (Directional Movement  Index, also known as Movement Index ) is derived by the US technical analysis guru Wilder (J. Welles Wilder ) in 1978 elaboration year of out long-term technical analysis tools , an important indicator to determine the trend as available , especially for long and short plate potential confirmed in the head and the bottom has a fairly accurate results . also is seen as the most practical method of technical analysis Wilder .

DMI basic idea indicator is in the process of ups and downs in the stock price , according to a new high or a new low stocks of kinetic energy , judged both long and short trading strength of growth and decline and the plate potential equilibrium with each other to pull data , in order to identify high and low band signals a turning point , provide investors out of the stock market basis . use DMI typically used when the trend line three indicators , namely rising index line (+ DI, Positive Directional On indicator), drop the index line (-DI, Negative Directional On indicator) and the average trend indicator line (ADX, Average Directional Movement Index ) , all of which can set the period , generally based on 14 days . In order to judge the energy accumulated by both parties in the disk , the calculation process of DMI index is more complicated , and the daily market must be calculated first. Positive and negative trend change value DM (Directional Movement,Also known as innovation amplitude values ) and the true amplitude value TR (True Range), then seek three n Amended moving average + ADM , - ADM and ATR in order to calculate the value of a positive direction indicators + DI (Positive Directional On Indicator ) and negative direction index value -DI (negative Directional indicator ) . Then use the difference and ratio of the two to calculate the directional value DX ( Directional Movement Index ), and finally calculate the n- day average trend value ADX by correcting the moving average . Next, let us according to DMI import mathematical formulas Excel spreadsheet :
+DM0 t : a first t day and t-1 the highest price day ( H t and H t -1 ) the initial comparison of the two values .
  +DM0t = Ht Ht -1   (when Ht > Ht -1 )
  +DM0 t = 0 ( when H t ≤ H t -1 )
-DM0 t : a first t day and t-1 lowest day ( L t and L t -1 ) the initial comparison of the two values .
  -DM0t = Lt-1 Lt   (when Lt-1 > Lt )
  -DM0t = 0 ( when L t-1 ≤ L t )
+DMt : is the first t day and t-1 the highest price day ( H t and H t -1 ) final comparison of the two values .
-DMt : is the first t day and t-1 lowest day ( L t and L t -1 ) final comparison of the two values .
The two values ​​can be determined by the following judgment :
  +DM t = +DM0 t ,   -DM t = 0
  ( when +DM0 t > -DM0 t )
  +DM t = 0 ,             -DM t = -DM0 t
  ( when +DM0 t < -DM0 t )
  +DM t = 0 ,             -DM t = 0
  ( when +DM0 t = -DM0 t )
It can be seen from the above formula that +DM t and -DM t must be greater than or equal to 0.
TR t : a first t date real amplitude value , for the first t highest day , the lowest of the first t-1 Room closing price Day three largest difference . Detailed the following formula :
  DTRt = HtLt:
Of t highest price H t first t daily low L t difference between the two.
  DTRHt = | HtCt-1 |:
Of t highest price H t first t-1 closing price of C t-1 the absolute value of the difference .
  DTRLt = | LtCt-1 |:
Of t days Low L t first t-1 closing price of C 1-t. the absolute value of the difference.
TR t = max ( DTR t , DTRH t , DTRL t ):
Is the maximum of DTR t , DTRH t and DTRL t
And + the DM t , -DM t and TR t of n daily averages + the ADM t , - ADM t and the ATR t formula is as follows :
+ADMt= +ADMt-1 + (+DMt +ADMt-1) / n
-ADM = -ADMt-1 + (-DMt -ADMt-1) / n
ATR t = ATR t -1 + ( TR t - ATR t -1 ) / n
Finally, find +DI t , -DI t , DX t and ADX t : ( where n is usually taken as 14 days)
+ DI t = +ADM t / ATR t
-DI t = -ADM t / ATR t
DX t = | +ADM t - -ADM t | / (+ADM t + -ADM t ) * 100
ADXt = ADXt-1 + (DXt ADXt-1) / n
The DMI indicator represents the extent to which the stock price is chasing high or low in the rising or falling stage . It is a representation of the strength of the long- selling force . Its application principles can generally be classified into the following points for reference :
1. +DI is the indicator of the upward trend of the stock price , and its value is increasing, indicating that the long market starts . The opposite -DI is the direction indicator of the stock price decline , and its value is increasing, indicating that the bears gain an advantage . When the two cross each other , the market is about to Reversal , from the bottom to the top began to press from the top to the other side , gradually gaining the advantage of the disk , the sale of signals also emerged , ready to wait for an opportunity to enter and leave .
2. The ADX indicator represents the magnitude of the multi-space force enhancement . When both +DI and -DI cross each other , if ADX is also gradually enhanced , it represents a new trend is emerging . When the ADX value breaks through 20, it represents the establishment of the market , investors Should operate with the trend , +DI from the bottom up is a long market , and vice versa -DI from the bottom up is a short market .
3. When ADX continues to be high , showing high-end hovering , indicating that the market is in the overbought or oversold phase , the market may be reversed at any time , investors should not be able to operate at this time , should pay attention to the ADX reverse downwards change signal .
4. When ± DI value very close and intertwined , ADX will usually hover in the low-end , if its value is less than 20 or less , more representative of the stock in a consolidation phase , investors should wait patiently waiting to start a new wave of market signals .
Although the above is the general rule of entering and exiting stocks , due to the complicated calculation principle of DMI indicators , it is a medium- and long-term operation index , especially when ADX is in a low-end hovering , the indicator signal is not obvious , and the stocks are different , it is best to use with KD and RSI indicators . and observe the subject matter of at least one year and then control the price trend of the technical specifications for a modest correction is appropriate . Finally, for the convenience of the reader utilize DMI indicators , the author still Makalot modeled (template), continue to produce the Excel analysis format Sample for reader's reference :
template22.xlsx
In addition to this sample " historical stock price " provides spreadsheet + DI, -DI and ADX of DMI reference index outside , the second spreadsheet provides the candlestick graph , volume and DMI trend line for FIG. Reader's reference . If you have any mistakes, please correct me . Thank you !
In addition , the author for all types of stock analysis indicators ( moving average , RSI, BIAS, stochastic KD line, William indicators , MACD, CDP and Bollinger bands, etc. ) produced EXCEL spreadsheet for reference use , and further production of candlestick charts and other technical indicators on the same chart , interested readers can refer to Ref.1.
Reference (Ref):
1. Investment Financial Notes - Stock Technical Analysis















































No comments:

Post a Comment