Skip to main content

Smoothed MA (SSMA) for Amibroker (AFL)

kelvinhand about 13 years ago Amibroker (AFL)

  • Rating:
    4 / 5 (Votes 2)
  • Tags:
    amibroker, moving average

similar to MT4 MODE_SSMA

Indicator / Formula

Copy & Paste Friendly
iPeriod=Param("Period", 5, 1);

ssma = MA(C, iPeriod);

for(i=iPeriod+1; i<BarCount; i++)
{
   iSum = ssma[i-1]*(iPeriod-1)+Close[i];
   ssma[i] = iSum/iPeriod;
}

Plot(ssma, "SSMA", ParamColor("Color", colorRed), ParamStyle("Style"));

6 comments

about 13 years ago

if u would have checked it u would have found tht it is same as Wilders average. Which is ready to use code in amibroker in average section.

anyways thanx for the logic…!

about 13 years ago

Thank you very much for your finding.
So now we know

MT4 is Amibroker
= ===
LWMA ==> WMA
SSMA ==> Wilders

Publish out is to serve as record for future reference purpose.

about 13 years ago

Yes, I got good memory.
Using internal command is always faster then script.

5. sourish
about 13 years ago

Can we get screen shots of the various AFLs posted here? Would be nice and easy to know more abt the functioning.. Thanks.

about 13 years ago

It is good that you learn to load the MT4 historical data into amibroker and do the comparison yourself is more conclusive then i give you the screenshots.

Leave Comment

Please login here to leave a comment.