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.

34

STOCHASTICS AND AVERAGES AND RSI! OH, MY!

3. Once these values are summed, simply divide them by the RSI period. In doing

so, you will have two new values: avgUp and avgDn. In a strong upward-moving

market, the upSum and corresponding avgUp will be much greater than the

dnSum and avgDn.

4. Once you have arrived to the avgUp and avgDn values the relative strength (RS)

is simply the quotient of the two values:

RS = avgUp∕avgDn

5. The RS is the ratio of the changes in up closes to down closes. If the market

is in a strong uptrend, the avgUp will be large in relation to the avgDn, thus

generating a larger number. The opposite is true if the avgDn is much greater

than the avgUp (an occurrence of a downward trending market).

6. The RSI is a bound indicator, meaning that it will stay within an upper and lower

constraint. In the case of the RSI, as we mentioned earlier, these constraints are

0 and 100. The simple ratio of avgUp and avgDn can go from a small number to

a large one. We can normalize the RS for any market and constrain it between 0

and 100 by applying the following formula:

RSI = 100 − 100

1 + RS

Let’s assume a strong upwardly trending market with an upAvg of 60 and

a dnAvg of 20. Inputting this information into the formula, we arrive at the

following:

RS = 60

20 , or 3

RSI = 100 − 100 , or 100 − 25 = 75

1 + 3

7. Just like the ADX, subsequent values are smoothed utilizing either an exponential

moving average or Wilder’s homebrew.

The default period length for the RSI is 14 so it is easy to see that this indicator

was designed for a short-term approach. When using RSI in an overbought/oversold

application, traders are looking for a reversion to a mean type movement—what

goes up must eventually come down. Through Wilder’s research he observed his

indicator usually topped/bottomed out prior to an actual market top/bottom.

Figure 2.4 shows a highly successful RSI trade.

Box 2.2 shows a trading system description incorporating the RSI, a volatilitybased

profit objective, and protective stop. The profit and stop are based off a 10-day

average true range—wider profit targets and stops in high volatility. Notice how the

system is trying to cut losses short and let profits run using a 3:1 ratio. I have noticed

www.rasabourse.com

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

Saved successfully!

Ooh no, something went wrong!