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

Optimum Moving Averrage for Amibroker (AFL)
Lars
over 12 years ago
Amibroker (AFL)

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

This is a special Moving Average especially for sideway markets!

Similar Indicators / Formulas

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

Indicator / Formula

Copy & Paste Friendly
price = ParamField("field");
n = Param("periods",35);
SA=MA(Price,n);
v1=(StDev(Price,n))^2;

Ca=Null;
Ca[n]=sa[n];

for(i=n+1; i<BarCount;i++){
v2[i]=(CA[i-1]-SA[i])^2;
k[i]=IIf(V2[i]<V1[i],0,1-V1[i]/V2[i]);
CA[i]=CA[i-1]+K[i]*(SA[i-1]-CA[i-1]);
}
Plot(Ca,"OMA("+WriteVal(n,1.0)+")",colorYellow,styleThick);
Col = IIf(BarsSince(Ref(Ca,-1)>Ca)>BarsSince(Ref(Ca,-1)<Ca),colorBrightGreen,colorRed);
Plot(C,"",Col,styleBar);

2 comments

1. Rakesh Kumar

Dear Lars

Thanks for the formula. It is one of the best.

2. docbraun

Hi, is there by anychance convert this code to Metastock? Tks a lot…

Leave Comment

Please login here to leave a comment.

Back