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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

44

STOCHASTICS AND AVERAGES AND RSI! OH, MY!

becomes a three-period moving average of the slow %K. The two versions can be

confusing so most people simply use the slow variety. Through my obeservations

the fast stochastic seems to be very erratic.

The default parameters for the slow stochastic are (14, 3, 3) where the 14

represents the raw %K calculation period, the first 3 is the initial smoothing length,

and the second 3 is the secondary smoothing.

As you can see from the %K formula, the numerator will always be less than or

equal to the denominator and therefore produce a reading between 0 and 100. If the

close is near the lowest low, then the formula will produce a low stochastic.

Most traders utilize the stochastic (STO) as an overbought/oversold indicator with

80 and 20 as the corresponding thresholds. If the STO is high, then the momentum

is very bullish, and if it’s low—well, it’s pretty obvious. Just like the RSI, the

STO can be faked out into believing a market has become overbought/sold when in

fact the market is in a very strong trend. A unique feature of the STO (and some

other oscillators) is that it incorporates a trigger. Instead of simply buying/selling

in the oversold/overbought territory a trader can wait until the slow %K crosses

above/below the slow %D. Remember, these calculations are simple moving

averages of the raw %K and when a shorter-term average crosses the longer term,

this indicates a short-term shift in momentum.

Figure 2.8 shows trades where the slow %K crosses slow %D in overbought and

oversold territories.

Entry signals for a stochastic oscillator crossover algorithm can be defined by

simple if–then constructs. So a simple flowchart can be used to model this type of

trading algorithm. The flowchart is shown in Figure 2.9.

FIGURE 2.8

Source: TradeStation

Chart showing trade signals from stochastic crossover algorithm.

www.rasabourse.com

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

Saved successfully!

Ooh no, something went wrong!