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

Smoothed Sensitive MA for Amibroker (AFL)

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

This moving average is sensitive and reacts quickly to significant price movements, while remaining indifferent to small price moves.

Smoothed Sensitive MA is triple weighted for price changes.

The parameter "Periods"is used as both
1. the lookback period for price change,
zCC=abs(P-Ref(P,-Periods));

and also as
2. the number of periods to be averaged
zSSMA=Sum(zCC*zCC*zCC*P,Periods)/Sum(zCC*zCC*zCC,Periods);

Alternatively, you could modify the script to use two separate parameters for values for 1 and 2.

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("Smoothed Sensitive MA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 125, 2, 300, 1);
zCC=abs(P-Ref(P,-Periods));
zSSMA=Sum(zCC*zCC*zCC*P,Periods)/Sum(zCC*zCC*zCC,Periods);
Plot( zSSMA, "SSMA", ParamColor( "Color", colorCycle ), ParamStyle("Style") ); 
_SECTION_END();

1 comments

1. TN2023

Hello,

Thanks for the code! Is there a way to create a buy/sell signal filter using Analysis when the price line crosses with SSMA?

Leave Comment

Please login here to leave a comment.

Back