Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

AmiALMA for Amibroker (AFL)
rmike
about 14 years ago
Amibroker (AFL)

Rating:
3 / 5 (Votes 6)
Tags:
amibroker, moving average

AFL code by hiscores. Originally posted here http://finance.groups.yahoo.com/grou…message/154257

Minor mod by rmike to Modify the AFL in conformance with NinjaTrader & Metatrader
releases by the original developer.

Release Date – 09 Nov 10

AFL Usage – Moving Average. Further information Can be found at http://www.arnaudlegoux.com/

Screenshots

Similar Indicators / Formulas

Hull Moving Average (HMA)
Submitted by kaiji almost 15 years ago
Beauty
Submitted by sbtc555 over 11 years ago
Smoothed MA (SSMA)
Submitted by kelvinhand over 11 years ago
Trend Scalping System
Submitted by esnataraj over 14 years ago
Buff Volume Weighted Moving Averages
Submitted by kaiji almost 15 years ago
Volume wieghted moving average
Submitted by kaiji almost 15 years ago

Indicator / Formula

Copy & Paste Friendly
"Arnaud Legoux Moving Average";
/*________________________________________________________________________________________________
AFL code by hiscores. Originally posted here http://finance.groups.yahoo.com/grou...message/154257

Minor mod by rmike to Modify the AFL in conformance with NinjaTrader & Metatrader
releases by the original developer. 

Release Date - 09 Nov 10

AFL Usage - Moving Average. Further information Can be found at http://www.arnaudlegoux.com/
________________________________________________________________________________________________*/

_SECTION_BEGIN("ALMA");
p = ParamField("Price Field");
windowSize = Param("Window Size", 9, 5, 201, 2);
sigma = Param("Sigma", 6, 1, 20);
Offset = Param("Offset", 0.85, 0.05, 1.0, 0.05);

m = floor(Offset * (windowSize - 1));
s = windowSize / sigma;

w = 0;
wSum = 0;

for(i = 1; i < windowSize; i++)
{
     w[i] = exp(-((i-m)*(i-m))/(2*s*s));
     wSum += w[i];
}

for(i = 1; i < windowSize; i++)
{
     w[i] = w[i] / wSum;
}

alma = Null;

for(j = 1; j < BarCount; j++)
{
     alSum = 0;

     if(j < windowSize)
     {
         alma[j] = Null;
     }
     else
     {
         for(i = 1; i < windowSize; i++)
         {
             alSum += p[j - (windowSize - 1 - i)] * w[i];
         }

         alma[j] = alSum;
     }
}

Plot(alma, "ALMA("+windowSize+","+sigma+","+Offset+")", ParamColor("ALMA Color", colorRed), ParamStyle("ALMA Style", styleLine|styleThick|styleNoLabel), maskDefault);  
_SECTION_END();

5 comments

1. sohel2020

good…

2. Xswingtrader

Great! Thanks a lot rmike!

3. demon

Thanks, this seems to be a good thing.

4. rakan

good tool thanks

5. tourist007

Its great average that will enhance profit for sure

Leave Comment

Please login here to leave a comment.

Back