In her article in the December 2022 issue of Stocks and Commodities, “Short-Term Continuation And Reversal Signals,” Barbara Star describes modifications to the classic directional movement indicator (DMI) and commodity channel index (CCI) that can aid in more easily identifying price reversals and continuations in a trend. Traditionally, the DMI is comprised of two lines: a positive line (+DI) and negative line (−DI).
In her article, Star creates a DMI oscillator by subtracting −DI from +DI. Historically, the DMI uses a default length of 14. In the article, this has been shortened to 10. The CCI has also been adjusted in the article to use a length of 13 instead of the usual 14 or 20. The oscillator is setup using an AIQ Color Study
The importable AIQ EDS file can be obtained on request via email to info@TradersEdgeSystems.com. The code is also shown here:
! Short-Term Continuation And Reversal Signals
! Author: Barbara Star, TASC Dec 2022 ! Coded by: Richard Denning, 10/21/2022
C is [close].
H is [high].
L is [low].
H1 is valresult(H,1).
H2 is valresult(H,2).
L1 is valresult(L,1).
L2 is valresult(L,2).
GreenDMI if [DirMov] > 0.
RedDMI if [DirMov] < 0.
StartOfDownTrend if C < simpleavg(C,18) and [DirMov] < 0 and H < H1 and H1 > H2.
StartOfUpTrend if C >= simpleavg(C,18) and [DirMov] >= 0 and L > L1 and L1 < L2.
GreenTrend if C >= simpleavg(C,18) and [DirMov] >= 0.
RedTrend if C < simpleavg(C,18) and [DirMov] < 0.
Code for the author’s color study is set up in the AIQ EDS code file. Figure 7 shows the color studies set up in the charts module. Figure 8 shows the color studies on a chart of Apple, Inc. (AAPL). The black bars are potential entry points in the downtrend.
FIGURE 7: AIQ. The color bar setup in the charts module is demonstrated.
FIGURE 8: AIQ. This shows an example of the color studies applied to a chart of Apple, Inc. (AAPL) with a DMI histogram and an 18-bar simple moving average.
for AIQ Systems