Hi All.

I am trying to migrate an AFL script to Metatrader 4 for forex. The
script is based on Woodie's Heikin Ashi
(http://www.amibroker.com/library/detail.php?id=1024) and it uses AB's
AMA function.

The problem I have is that Metatrader doesn't have a built-in AMA
function as AB does. So I am trying to code the AMA function myself.

My question is this:

1. What is the default PERIOD for AB AMA function. (since it only takes
two parameters, the ARRAY and SMOOTHINGFACTOR)

2. What exactly is the SMOOTHINGFACTOR?

Any help is greatly appreciated!

I'm using the following, which i got on the internet, to calculate the
AMA

Direction = Price - price(n)  ; where n = AMA Period
Volatility = Sum(abs(price - price[1], n)
Effeciency Ratio (ER) = Direction / Volatility
Fast Smoothing Constant (FastC) = 2/(p + 1)  ; where p = FSC Period
Slow Smoothing Constant (SlowC) = 2/(q + 1)  ; where q = FSC Period
Scaled Smoothing Constant (SSC) = ER(FastC - SlowC) + SlowC

Reply via email to