31.07.2021 Views

Ultimate Algorithmic Trading System

Using automated systems for trading in stock markets

Using automated systems for trading in stock markets

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The basic theory behind the ADX is based on market directional movement. This

movement is either positive, negative, or neutral. In Wilder’s vernacular, positive

direction was described as plus directional movement (+DM) and negative as

minus directional movement (−DM). Directional movement is calculated by

comparing the difference between two consecutive bars’ lows and the difference

between their respective highs. Movement is positive (plus) when the current bar’s

high minus the prior bar’s high is greater than the prior bar’s low minus the current

bar’s low. This plus directional movement (+DM) then equals the current high

minus the prior bar’s high as long as this value is positive. If the value is negative,

then the +DM would be set to zero. Negative movement or minus directional

movement (−DM) does the same comparison. A −DM occurs when the prior bar’s

low minus the current is greater than the current bar’s high minus the prior. In this

case the difference between the two lows is assigned to the −DM as long as the value

is positive. If the value is negative, it is assigned zero just like the +DM. Sounds a

bit confusing but Figure 2.1 should help clarify things.

Figure 2.1 shows four calculation examples for directional movement. The

first pairing shows a big positive difference between the highs for a strong plus

directional movement (+DM). The second pairing shows an outside day with minus

directional movement (−DM) getting the edge. The third pairing shows a big

difference between the lows for a strong minus directional movement (−DM). The

final pairing shows an inside day, which amounts to no directional movement (zero).

Both plus directional movement (+DM) and minus directional movement (−DM)

are negative and cancel out each other. Negative values revert to zero. Keep in mind

all inside days will have zero directional movement.

+ DMI – DMI

– DMI 0 DMI

27

STOCHASTICS AND AVERAGES AND RSI! OH, MY!

FIGURE 2.1

Examples of directional movement.

www.rasabourse.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!