MetaStock Relative Strength Index Function

Provided By www.meta-formula.com

The Relative Strength Index (RSI) is a very popular oscillator and is widely used. The RSI measures the internal strength of a security rather than measuring the strength of a security relative to something else as the name would suggest. It actually compares the magnitude of a security's recent gains with the magnitude of its recent losses. It is commonly used to spot weaknesses in existing trends and can provide early warning of a trend change.

CALCULATION

The formula for the RSI is

In the above formula:

U = An average of upward price change

D = An average of downward price change

The RSI ranges between 0 and 100 with 70 and 30 commonly used as overbought/oversold levels.

SYNTAX RSI(Data Array, Periods)

Data Array _ This data array is used to determine the relative strength.

Periods _ This specifies how many periods are used to determine the average upward and downward moves.

Note: `RSI(Periods)' can also be used, as Metastock will select the closing price data array as the default

EXAMPLE

Here is an example using the RSI:

RSI(C,14)

In the above example:

Data Array = C

Periods = 14 

APPLICATION

A more useful application of this example could be:

RSI(C,14)>30

This formula specifies that the RSI must be above 30 which is used as a common reference line, along with 70. A basic strategy with the RSI is to go long when the RSI crosses above 30 and to go short when it crosses below 70.

Looking at Figure 3.31, we can see the RSI indicator at the base of the chart.

 
 

Figure 3.31 _ RSI Indicator   

EXERCISES

Construct formulas for the following:

1. The RSI (using 15 periods) crosses the 30 reference line:

__________________________________________________

2. The RSI (using 15 periods) has increased over the last 3 periods:

__________________________________________________

This article is a snippet from the
MetaStock Programming Study Guide...

"Discover The Simple Secret to Make Metastock Easy & Identify Profitable Trades"

Click Here To Find For More About
The MetaStock Programming Study Guide

copyright 2007 www.meta-formula.com