## Mathematical tools for the technical analysis Technical indicators

The quantitative, or mathematical tools for the technical analysis called the technical indicators are being obtained as a result of the mathematical processing of prices averaged in time as well as other characteristics of market movements. They are applied to get signals for an additional evaluation of trade channels and patterns analysis by means of the indicators charts. The main groups of technical indicators are moving averages and oscillators.

Moving Averages. A moving average is an average price of a certain currency over a certain time interval (in days, hours, minutes etc) during an observation period divided by these time intervals. This averaged price is being determined consequently for each regular interval beginning from the first. A moving average has a smoother line than the underlying currency because statistical 'noises' are excluded to provide more convenient visualization of the currency activity. A moving average may be used as a special indicator or to create an oscillator. The moving average may be based on the midrange level or on a daily average of the high, low, and closing prices. The charts of moving averages are being plotted within same coordinates with an underlying price chart (See Figures 4.53 - 4.56).

In the technical analysis are known the next three types of moving averages:

1. The simple moving average or arithmetic mean (SMA).

2. The linearly weighted moving average (LMA). This type of average assigns more weight to the more recent closings. This is achieved by multiplying the last day's price by one, and each closer day by an increasing consecutive number. In our previous example, the fourth day's price is multiplied by 1, the third by 2, the second by 3, and the last one by 4; then the fourth day's price is deducted. The new sum is divided by 9, which is the sum of its multipliers.

3. The exponentially smoothed moving average (EMA) which provides the best smoothing of data averaged taking into account the previous price information of the underlying currency.

In Figure 4.53 is shown the difference in reading of different types of moving averages.

Trading signals of moving averages. Trade signals which occur by the use of one moving average is a buy signal by the crossing of the underlying price chart by the moving average chart from below up and a sell signal by the crossing of the underlying price chart by the moving average chart from above down (See Figure 4.54).

 - ----L — L _ 1 1 J_ V / 1____1___ - _ 1____L _ _ _ 1___ 1,6859 ----L — L _ i-- "hv 7 \ - _ 1____L _ _ _ 1___ 1,6781 ----L_ L _ -i—4- i-- rjy 1 W _ _ 1___ 1,6703 ----L_ --L--- L _ --L--- i-- 'if/' i-- \\ __L__ 1,6625 ----L_ L _ "\"f V i-- __1____L _ . 1,6547 ----L_ --L--- A If" S" i-- __1____L_. ¡-Vi-- 1,6469 ----L_ iz £> j-- ..L...L.. ...Vp --L-. 1,6381 i__ 1 1 __I____I___ . _ i____i__ __i___ 1,6313 / 8:00 PM 4:00 AM 12:00 PM 8:00 PM 12:00 AM 4:00 PM 12:00 AM 4:00 PM 12:00 AM 12/16/01 12/18/tll 12/18/01 izfzofoi 12/54/01 12/26/01 12^8/01 1/1/02 1/3/0;

Figure 4.53. The underlying price chart (blue) and charts of a 9 days moving average (red - SMA, brown - LMA, green

- EMA) in the Swiss franc chart.

Figure 4.53. The underlying price chart (blue) and charts of a 9 days moving average (red - SMA, brown - LMA, green

- EMA) in the Swiss franc chart.

^ | Explorer | Account History | System Mail USD/CHF D1 | <l > X I

^ | Explorer | Account History | System Mail USD/CHF D1 | <l > X I Figure 4.54. Trade signals (the underlying price chart - blue line, the moving average chart - red): the first and second crossing - signals buy, the third and forth - sell.

Figure 4.54. Trade signals (the underlying price chart - blue line, the moving average chart - red): the first and second crossing - signals buy, the third and forth - sell.

For the technical analysis applied are usually two or three moving averages charts constructed for different periods - long term, middle term and short term. For example to use two charts a combination of moving averages for 4 and 9 days and to use three moving averages - for 4, 9 and 18 days may be applied. Other often-applied combinations of three moving averages are 5, 20 and 60days and 7, 21 and 90 days.

A buying signal on a two-moving average combination, for example for 4 and 9 days, occurs when the shorter term of two consecutive averages (4 days) intersects the longer (9 days) upward. A selling signal occurs when the reverse happens, and the longer of two consecutive averages intersects the shorter one downward (See Figure 4.55).

J | Explorer | Account History | System Mail USD/CHFDll signal occurs when the reverse happens, and the longer of two consecutive averages intersects the shorter one downward (See Figure 4.55).

J | Explorer | Account History | System Mail USD/CHFDll Figure 4.55. Trade signals (from left to right) by the use of two EMA in the Swiss franc chart (the underlying price chart -blue line, moving averages charts: red - for 4 days, green - for 9 days): the first crossing -buy signal, the second- sell signal

Figure 4.55. Trade signals (from left to right) by the use of two EMA in the Swiss franc chart (the underlying price chart -blue line, moving averages charts: red - for 4 days, green - for 9 days): the first crossing -buy signal, the second- sell signal

A signal involving three moving averages is generated by a moving averages combination of 4, 9, and 18 days. The buying warning occurs when the 4-day moving average crosses upward both the 9-day and 18-day averages, and the buying signal is confirmed when the 9-day moving average also crosses upward the 18-day average. (See Figure 4.56). The reverse is true for the selling signal. Figure 4.56. Trade signals (from left to right) by the use of three EMA in the Swiss franc chart (the underlying price chart - blue line, moving averages charts: red - for 4 days, green - for 9 days, brown - for 18 days): the first crossing -buy signal, the second- sell signal.

Figure 4.56. Trade signals (from left to right) by the use of three EMA in the Swiss franc chart (the underlying price chart - blue line, moving averages charts: red - for 4 days, green - for 9 days, brown - for 18 days): the first crossing -buy signal, the second- sell signal.

Envelopes. The envelope model consists of a short-term (perhaps 5-day) closing price based moving average to which you add and subtract a small percentage (2 percent is suggested for foreign currencies). An example for the envelope using the averaging along 14 days intervals is shown on the figure 4.57. The crossing of the underlying chart price by the envelope chart from above down is a buy signal. Figure 457. The underlying price (blue line) and the Envelop indicator (black lines) in the Swiss franc chart.

Ballinger Bands. The Ballinger bands combine a moving average with the instrument's volatility. The bands were designed to gauge whether prices are high or low on a relative basis via volatility. The two are plotted two standard deviations above and below a 20-day simple moving average.

The bands look a lot like an expanding and contracting envelope model. When the band contracts drastically, the signal is that volatility is low and thus likely to expand in the near future. An additional signal is a succession of two top formations, one outside the band followed by one inside. If it occurs above the band, it is a selling signal. When it occurs below the band, it is a buying signal (See Figure 4.58).

Median Price. The Median Price indicator chart is being plotted using arithmetical averages of high and low for a trade period prices. An example of that indicator is shown on Figure 4.59. The superposition of an underlying price chart with the indicator chart gives a visual representation about the grade and direction of the deviation of close prices from the averaged prices during an observation interval.

Average True Range. The indicator Average True Range denoted in the USA, as ATR is a grade of the volatility. Minimal and maximal values of the volatility are signals warning about a possible reversal. Figure 4.58. The underlying price (blue line), EMA (red line) and the Ballinger Bands indicator (black lines) in the Swiss franc chart.

Figure 4.58. The underlying price (blue line), EMA (red line) and the Ballinger Bands indicator (black lines) in the Swiss franc chart. Figure 4.59. An example of the Median Price indicator (red line) in the Swiss franc chart. Figure 4.60. An example of the ATR indicator (red line) in the Swiss franc chart.

As it is shown in Figure 4.60 with an example of the ATR indicator for 14 days, declining of the volatility in the ATR chart till a minimal from all visible values was a prediction of the coming after it bearish price reversal.

Oscillators. Oscillators were designed to provide signals regarding overbought and oversold market conditions. Therefore the signals of oscillators are mostly useful at the extremes of their scales. Crossing the zero line, when applicable, usually generates direction signals. The major types of oscillators provided by the RoyalForex program are considered below.

Commodity Channel Index. The commodity channel index (CCI) consists of the difference between the mean price of the currency and the average of the mean price over a predetermined period of time. A buying signal is generated when the price exceeds the upper (+100) line, and a selling signal occurs when the price dips under the lower (-100). An example of this indicator is shown in Figure 4.61. As one can see in this Figure, the CCI oscillates around 0 in the interval from -100 till +100. Values CCI>100 tells about an overbought (position sell likes to be rational), a value CCI<100 is a feature of an oversold (position buy likes to be rational). www.royalforex.com"/>
Figure 4.61. Example of a real CCI indicator chart in the Swiss franc chart. © 2001 by Royal Forex. All right reserved. www.royalforex.com

Directional Movement Index. The directional movement index (shortly - DMI) provides a signal of a clear trend presence in the market. The line simply rates the price directional movement on a scale of 0 to 100%. The higher the number, the better the trend potential of a movement, and vice versa. An example of the DMI indicator for 14 days is presented in Figure 4.62.

 EUR/USD D1 GBP/USD M1 | USD/J FY M30 | GBPAJSD M1 USD/CHF M30 | GBP/USD M30 OX L L L L l_Ll_ L L L L L L L L l_ L -- __i____i___' 1 1 1 1 lt.Eit.f: 1,6137 1,5706 V, i i i 43.9989 22,1632 0,3275 12:00 AM 12:00 AM 12:00 AM 12:00 AM S/30/01 6/21/01 7/13/01 S/6/01 12:00 AM 8/28/01 12:00 AM 12:00 AM 9/19/01 10/11/01 12:00 AM 10/31/01

Figure 4.62. Example of a real DMI indicator chart in the Swiss franc chart.

Figure 4.62. Example of a real DMI indicator chart in the Swiss franc chart.

To construct a DMI indicator chart two lines are to be generated which measure the buying and selling pressure. They are called +DI (that is the positive directional indicator which is shown in Figure 4.62 by the green line) and-DI (that is the positive directional indicator which is shown in Figure 4.62 by the black line). If +DI line is higher than -DI, a bullish situation exists, otherwise - a bearish as in Figure 4.62. Lines +DI and -DI are a ground to create the third one - so called directional movement line (ADX). The latter oscillates in limits from 0 till 50. Values of the ADX below 20 correspond to the absence of any clear trend in the market. A rise of the ADX above 20 is a signal warning about the beginning of a trend formation. An ADX line, which was above 40 and is going to fall down signals about an exhaustion of the trend.

Stochastic. Stochastic generate trading signals before they appear in the price itself. The stochastic concept is based observations that, as the market gets toppish, the closing prices tend to approach the daily highs; whereas in a bottoming market, the closing prices tend to draw near the daily lows.

This oscillator consists of two lines called %K and %D. Visualize %K as the plotted instrument, and %D as it's moving average. The formulas for calculating the stochastic are: %K = [(CCL -L9)I(H9 -L9)] * 100, Where

CCL - current closing price; L9 - the lowest low of the past 9 trade periods; H9 - the highest high of the past 9 trade periods and

The resulting lines are plotted on a 1 to 100 scale, with overbought and oversold warning signals at 70% and 30%, respectively. The buying (bullish reversal) signals occur under 10%, and conversely the selling (bearish reversal) signals come into play above 90% after the currency turns. (See Figure 5.67.) In addition to these signals, the oscillator-currency price divergence generates significant signals. A real example of a stochastic oscillator is presented in Figure 4.63.

The intersection of the %D and %K lines generates further trading signals. There are two types of intersections between the %D and %K lines:

1. The left crossing, when the %K line crosses prior to the peak of the %D line.

2. The right crossing, when the %K line occurs after the peak of the %D line.

J | Explorer | Account History | System Mail USD/CHF H4 | <i l> X

J | Explorer | Account History | System Mail USD/CHF H4 | <i l> X Figure 4.63. Example of the stochastic indicator in the Swiss franc chart: red line - %K, green - %D.

Convergence — Divergence of Moving Averages. The moving average convergence-divergence (MACD) oscillator is built on exponentially smoothed moving aver ages. The MACD is a combination of charts (1) of the difference of two EMA (a short and a long ones) and (2) of "the shortest" EMA which all are plotted against the zero line. The zero line represents the times the values of the two moving averages are identical. A real example of the MACD indicator is shown in Figure 4.64.

In addition to the signals generated by the averages' intersection with the zero line and by divergence, additional signals occur as the shorter average line intersects the longer average line. The buying signal is displayed by an upward crossover, and the selling signal by a downward crossover (See Figure 4.64).

Momentum. Momentum is an oscillator designed to measure the rate of price change. This oscillator consists of the net difference between the current closing price and the oldest closing price from a predetermined period.

The formula for calculating the momentum (M) is: M=CCP-OCP, Where

CCP - current close price;

OCP - the oldest close price for the predetermined period.

The new values thus obtained will be either positive or negative numbers, and they will be plotted around the zero line. In the program RoyalForex the algebraic addition of the difference obtained with the figure 100 is being performed and a real indicator outputted from this program oscillates around the 100 line. At values of the momentum M>100 one says "The market caught a moment", otherwise (M<100)"The market lost a moment". A real example of the Momentum indicator for 14 days is shown in Figure 4.65. Maximal values of the indicator show the overbought, minimal - oversold market conditions. In terms of time frame, needless to say, the shorter the number of days included in the calculations, the more responsive the momentum will be to short-term fluctuations, and vice versa. Figure 4.64. Example of a real MACD indicator chart in the Swiss Franc chart.

Figure 4.65. Example of a real Momentum indicator chart in the the Swiss franc chart.

Relative Strength Index. The Relative Strength Index (shortly called as RSI) measures the relative changes between the highest and lowest close prices (See Figure 4.66).

The formula for calculating the RSI is: RSI=100-[100/(1+RS)], Where

RS - average of predetermined number Xtrade periods value of all closes, which were higher than all preceded closes divided by average of the same X priodss value of all closes, which were lower than all preceded closes.

Most often RSI is calculated for 14 days. RSI charts are plotted on a 0 to 100% scale. The 70% and 30% values are used as warning signals, whereas values above 85% indicate an overbought condition (sell signal) and values under 15 indicate an oversold condition (buy signal). By the technical analysis RSI is effectively used together with Ballinger Bands. It is believed that a sell position should be open when by a high RSI value the price chart touches with the upper Ballinger Band, and a buy position -when by a low RSI value the price chart touches with the bottom band. A real example of an RSI indicator for 14 days together with the Ballinger Bands indicator is shown in Figure 4.66.

Figure 4.66. Example of real RSI and Ballinger Band indicators in the Swiss Franc chart Rate of Change. The Rate of Change (shortly - ROC) is another version of the Momentum oscillator. The difference consists in the fact that, while the Momentum's formula is based on subtracting the oldest close price from the most recent, and the ROC's formula is based on dividing the oldest close price into the most recent one: ROC=(CCP/OCP) * 100, Where

CCP - current close;

OCP - the oldest close price for the predetermined period.

A real example of the ROC for 14 days is shown in Figure 4.67.

HI I EUR/USD DI I GBP/USD Ml | USD/JFY M30 | GBPAJSD Ml | USD/CHF M30 | GBPAJSD M30 < ► X

HI I EUR/USD DI I GBP/USD Ml | USD/JFY M30 | GBPAJSD Ml | USD/CHF M30 | GBPAJSD M30 < ► X Figure 4.66. Example of real RSI and Ballinger Band indicators in the Swiss Franc chart Rate of Change. The Rate of Change (shortly - ROC) is another version of the Momentum oscillator. The difference consists in the fact that, while the Momentum's formula is based on subtracting the oldest close price from the most recent, and the ROC's formula is based on dividing the oldest close price into the most recent one: ROC=(CCP/OCP) * 100, Where

CCP - current close;

OCP - the oldest close price for the predetermined period.

A real example of the ROC for 14 days is shown in Figure 4.67. Figure 4.67. Example of a real ROC indicator on the f the Swiss Franc chart.

Larry Williams Percent Rate. The Larry Williams Percent Rate (Williams %R) is a version of the stochastic oscillator. It consists of the difference between the highest high price of a predetermined number of days and the current close price, which difference in turn is divided by the total range. This oscillator is plotted on a reversed 0 to 100% scale (See a real example in Figure 4.68). Therefore, the bullish reversal signals occur at fewer than 80%, and the bearish signals appear at above 20%. The interpretations are similar to those discussed under stochastic.

^ | Explorer | Account History | System Mail USD/CHF H4 | <1 l> X

^ | Explorer | Account History | System Mail USD/CHF H4 | <1 l> X Figure 4.68. Example of a real W%R indicator on the of the Swiss Franc chart.

It is rational to use for a detailed technical analysis a combination of different indicators from the above mentioned (See Figure 4.69). Figure 4.69. Example of the technical indicators combination indicator in the Swiss Franc chart: EMA (red line in the price chart), RSI (the upper indicator), Stochastic (the middle indicator) and MACD (the bottom indicator).

Ichimoku Kinko Hyo. The Ichimoku Kinko Hyo (or simply - Ichimoku) indicator is appointed to determine simultaneously a market trend direction, support and resistance levels and to trigger buy and sell signals. Such a way, this indicator unites in itself a number of other indicators as well as different approaches concerning with the price movement prediction. To construct an Ichimoku's chart four time intervals of different widths are used. On those intervals are grounded values of the following lines constituting the Ichimoku which are the lines of median prices in a corresponding interval:

Tenkan-sen - shows the average value of a price of the first time interval which is the sum of a maximum and minimum of that time, divided by two;

Kijun-sen - shows the average value of a price of the second time interval;

Senkou Span A - shows the middle of a distance between two preceding lines moved ahead on the value equal the second time interval;

Senkou Span B - shows the average value of a price of the third time interval moved ahead on the value equal the second time interval;

Chinkou Span - shows the close of a current candlestick moved back on the value equal the second time interval.

The area between Senkou lines is hatched and called the cloud. If the price chart is inside the cloud the market is believed trendless, and Senkou lines form support and resistance levels. If the price chart is above the cloud, the upper cloud border is the first support and the bottom - the second. If the price chart is under the cloud then the bottom cloud border is the first resistance and the upper - the second. The crossing of the price chart by the line Chinkou Span bottom-up is a buy -signal, top-down - sell. Kijun-sen («main line») is used as a gauge of the market movement. If the price is above this line, a growth of prices is to be expected. If the prices cross this line the further trend reversal is likely to be expected. The other variant of the

Kijun-sen use is trade signals triggering. A signal buy is generated if the Tenkan-sen line crosses the Kijun-sen line bottom-up and signal sell - by crossing otherwise. The Tenkan-sen

("reversal line") is being used as an indicator of the market trend - a trend exists if this line is rising or falling. A real example of the Ichimoku is presented in Figure 4.70. Figure 4.70. Example of the Ichimoku indicator with lines Tenkan-sen (of 9 days, red), Kijun-sen (of 26 days, black), Senkou Span B and A (of 52 days, the cloud's color), Chinkou Span (of 26 days, green) in the Japanese yen chart. The trade signals buy and sell are in points of crossing of black and green lines by the red line bottom-up and top-down.

Figure 4.70. Example of the Ichimoku indicator with lines Tenkan-sen (of 9 days, red), Kijun-sen (of 26 days, black), Senkou Span B and A (of 52 days, the cloud's color), Chinkou Span (of 26 days, green) in the Japanese yen chart. The trade signals buy and sell are in points of crossing of black and green lines by the red line bottom-up and top-down.

The additional information with regard to technical indicators is represented under the menu "Additional Materials" of this Web site. 