09.12.2012 Views

Charting and Studies User Guide - CQG.com

Charting and Studies User Guide - CQG.com

Charting and Studies User Guide - CQG.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Page 290<br />

First value SMOOTH(1) = AccumulatedPrice / Period where AccumulatedPrice is a sum of Period<br />

input prices.<br />

Next value (say SMOOTH(N)) is calculated as:<br />

SMOOTH(N) = SMOOTH(N-1) + (Price(N) - SMOOTH(N-1)) / Period<br />

The next value would be plotted at the fourth bar from the left side of the screen.<br />

SMOOTH2 = (PREVIOUS SUM - PREVIOUS AVG + PRICE 4) / PERIOD<br />

For the second calculation of SMOOTH, PREVIOUS SUM is the sum of PRICE 1 + PRICE 2 +<br />

PRICE 3; <strong>and</strong> PREVIOUS AVG is the initial value of SMOOTH.<br />

The next value would be plotted at the fifth bar from the left side of the screen.<br />

SMOOTH = (PREVIOUS SUM - PREVIOUS AVG + PRICE 5) / PERIOD<br />

Subsequent values would be determined by subtracting the PREVIOUS AVG from the PREVIOUS<br />

SUM, adding the next more recent PRICE, then dividing by the PERIOD.<br />

Example:<br />

If the values 1,2,3,4 <strong>and</strong> 5 were reported for the first 5 bars the 3-period smoothed moving<br />

averages for those bars would be calculated as follows:<br />

(1+2 +3)/3 = 2<br />

This is the first value <strong>and</strong> would be plotted on the 3rd bar from the left.<br />

(6 - 2 + 4)/3 = 2.67<br />

This second value would be plotted on the 4th bar from the left.<br />

(8-2.67+5)/3 = 3.44<br />

This third value would be plotted on the 5 th bar from the left.<br />

Exponential Moving Average Calculation<br />

For the following example the PERIOD = 3 <strong>and</strong> the PRICE = CLOSE.<br />

To calculate an Exponentially Smoothed Moving Average, (ESMA), the user must enter an<br />

integer value for the PERIOD or a decimal value Smoothing Constant.<br />

A decimal value Smoothing Constant must be greater than 0.0 <strong>and</strong> less than or equal to 2.0.<br />

Example: .5<br />

When an integer value is entered for PERIOD, the smoothing constant is converted by the<br />

system to a decimal value using the following formula:<br />

Smoothing Constant:<br />

= 2 / (PERIOD + 1)<br />

= 2 / (3+1)<br />

= 2 / 4<br />

= .5<br />

The Exponentially Smoothed Moving Average, ESMA, may be calculated after the Smoothing<br />

Constant is known.<br />

The first ESMA value is initially set to the first PRICE before the calculation begins. The first<br />

PRICE is from the leftmost bar on the screen.<br />

Basic <strong>Studies</strong>

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

Saved successfully!

Ooh no, something went wrong!