AMA Calculations

Hello There,

I have been trying this for months but unfortunately unable to reach a solution. I would like to know how to calculate AMA as per Amibroker in a spreadsheet. Tried every possible way.

As per the AFL Reference:
AFL Function Reference - AMA

The example of volatility-weighted adaptive moving average formula:

graph0 = ema( close, 15 );
fast = 2/(2+1);
slow = 2/(30+1);
dir=abs(close-ref(close,-10));
vol=sum(abs(close-ref(close,-1)),10);
ER=dir/vol;
sc =( ER*(fast-slow)+slow)^2;
graph0 = ama( close, sc );


Query-1: Where is the first line used graph0 = ema( close, 15 );

Query-2: How do we compute the function AMA(Close,1.5) as if you refer the AFL docs factor is nothing but SC. If we change SC to 1.5 it doesn't make any sense.

HaClose =EMA((O+H+L+C)/4,3); // Woodie
HaOpen = AMA( Ref( HaClose, -1 ), 1.5 );


All I am trying to achieve is to compute the below in spreadsheet as this is used in my application but not able to figure out the AMA calculations.

I have used the AMA in spreadsheet and not sure how we are to use the factor.

Help from your side will really save a lot of time and money and also will clear my problem for good.

Await for a response from the members.

Best Regards,
Srikanth

When posting the formula, please make sure that you use Code Tags (using </> code button) as explained here: How to use this site.

Using code button

Code tags are required so formulas can be properly displayed and copied without errors.

First line is not used anywhere. It is overwritten by last line.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.