can anyone give me a hand with this?? My questions are regarding the AMA function of Amibroker. I'm trying to migrate an AFL script to Metatrader and need to code this formula.
1. the array "Period", where does it come from? 2. the "Factor" is calculated as 2/(Period+1). So is this a "fixed" formula or does it vary? If I would like something like AMA(Close, 0.5) where does the 0.5 gets plugged in the "Factor" formula? 3. How is the first value of AMA established? Thanks for your help! --- In [email protected], "bigitop" <doctormu...@...> wrote: > > Hi Joe. I read what you recommended and understand how the arrays are > calculated, but it still leaves out some details about the AMA function. > Please correct me if I'm wrong. > > 1. the array "Period", where does it come from? > > 2. in the example you provided the "Factor" is calculated as 2/(Period+1). So > is this a "fixed" formula or does it vary? If I would like something like > AMA(Close, 0.5) where does the 0.5 gets plugged in the "Factor" formula? > > 3. How is the first value of AMA established? > > Thanks for your help! > > > --- In [email protected], "Joe" <j0etr4der@> wrote: > > > > Find "Understanding How AFL Works" in the User's Guide (Help). AMA is > > explained at the bottom. > > > > Joe > > > > --- In [email protected], "bigitop" <doctormuniz@> wrote: > > > > > > 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 > > > > > >
