James, I got this from the site you offered:
The calculation of the DMI is fairly complex, and consists of three lines:
+DI: current positive directional index, the range of highs divided by the price range over the last day and previous close, smoothed over a given number of periods. -DI: current negative directional index, the range of lows divided by the price range over the last day and previous close, smoothed over a given number of periods. ADX: modified moving average of the difference of +DI and -DI divided by the sum of +DI and -DI, multiplied by 100.
I'm trying to interpret this stuff. Is this how you think it translates mathematically?
+DI: ABS(Ph(t)-Ph(t-1))/ABS(Pc(t)-Pc(t-1)), smoothed, where Ph(t) is the high price in period t, Pc(t) is the closing price in period t, and ABS stands for absolute value, i.e., ignore minus signs.
-DI: ABS(Pl(t)-Pl(t-1)/ABS(Pc(t)-Pc(t-1)), smoothed, were Pl(t) is the low price in period t.
ADX: Form the ratio of the difference +DI and -DI over the sum of +DI and -DI, then smooth and take moving average.
Is this your interpretation or am I missing something? Also, do you have any notion of the number of periods to use for the smoothing?
Thanks in Advance (TIA) |