iMACD
  #1 (permalink)  
Old 04-06-2010, 02:15 AM
Currency Trader
 
Join Date: Apr 2009
Posts: 1
brspma is on a distinguished road
Default iMACD

hi all,

anyone could please help me on that:

i am looking for the source code of the function iMA. thank you so much!

,,,

Last edited by brspma; 04-06-2010 at 01:27 PM. Reason: realized my question should be different.. thanks
Reply With Quote
  #2 (permalink)  
Old 04-15-2010, 09:38 AM
Currency Trader
 
Join Date: Apr 2010
Posts: 4
christenajenifer is on a distinguished road
Default

The Moving Average Technical Indicator shows the mean instrument price value for a certain period of time.
Calculation
Simple Moving Average (SMA)

Simple, in other words, arithmetical moving average is calculated by summing up the prices of instrument closure over a certain number of single periods (for instance, 12 hours). This value is then divided by the number of such periods.


SMA = SUM(CLOSE, N)/N

Where:
N — is the number of calculation periods.
Exponential Moving Average (EMA)

Exponentially smoothed moving average is calculated by adding the moving average of a certain share of the current closing price to the previous value. With exponentially smoothed moving averages, the latest prices are of more value. P-percent exponential moving average will look like:

EMA = (CLOSE(i)*P)+(EMA(i-1)*(100-P))

Where:
CLOSE(i) — the price of the current period closure;
EMA(i-1) — Exponentially Moving Average of the previous period closure;
P — the percentage of using the price value.
Smoothed Moving Average (SMMA)

The first value of this smoothed moving average is calculated as the simple moving average (SMA):

SUM1 = SUM(CLOSE, N)

SMMA1 = SUM1/N

The second and succeeding moving averages are calculated according to this formula:

SMMA(i) = (SUM1-SMMA1+CLOSE(i))/N

Where:
SUM1 — is the total sum of closing prices for N periods;
SMMA1 — is the smoothed moving average of the first bar;
SMMA(i) — is the smoothed moving average of the current bar (except for the first one);
CLOSE(i) — is the current closing price;
N — is the smoothing period.
Linear Weighted Moving Average (LWMA)

In the case of weighted moving average, the latest data is of more value than more early data. Weighted moving average is calculated by multiplying each one of the closing prices within the considered series, by a certain weight coefficient.

LWMA = SUM(Close(i)*i, N)/SUM(i, N)

Where:
SUM(i, N) — is the total sum of weight coefficients.
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:56 AM.

Registered members gain free access to online FOREX currency trading tools, foreign exchange software, Metatrader MT4/MT5 expert advisors, MT4 indicators and EAs. Register now