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

Average Price Crossover for Amibroker (AFL)

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

Gives a choice of many moving averages to plot the crossover with the price.

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
TD DeMarker Plane
Submitted by extremist over 13 years ago
Buff Volume Weighted Moving Averages
Submitted by kaiji almost 15 years ago

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("Background");
SetChartOptions(0,chartShowArrows|chartShowDates);
priceTitle=StrFormat("---- {{NAME}} ---------- {{VALUES}}"); 
Title ="Averages" + priceTitle;

if( ParamToggle("Tooltip shows", "All Values|Only Prices" ) )
{
 ToolTip=StrFormat("Open: %g\nHigh:  %g\nLow:   %g\nClose:  %g (%.1f%%)\nVolume: "+NumToStr( V, 1 ), O, H, L, C, SelectedValue( ROC( C, 1 )));
}

SetChartBkColor(ParamColor("Outer panel color ",colorBlack)); // color of outer border 
SetChartBkGradientFill( ParamColor("Inner panel color upper half",colorBlack),ParamColor("Inner panel color lower half",colorBlack)); // color of inner panel
_SECTION_END();
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
_SECTION_BEGIN("Average");
P = ParamField("Field");
Type = ParamList("Type", "Weighted,Lagless-21,Hull-26,Linear
Regression-45,Exponential,Double Exponential,Tripple
Exponential,Wilders,Simple");
Periods = Param("Periods", 9, 2, 100 );
Displacement = Param("Displacement", 1, -50, 50 );
m = 0;

if( Type == "Weighted" ) 				m=  WMA( P, Periods );
if( Type == "Lagless-21"  )				m=  2*EMA(P, Periods)-EMA(EMA(P, Periods),
Periods); 
if( Type == "Hull-26"  )				m=  WMA(2*(WMA(P, Periods/2))-WMA(P, Periods) ,4
);
if( Type == "Linear Regression-45"  ) m=  LinearReg( P, Periods );
if( Type == "Exponential" ) 			m = EMA( P, Periods );
if( Type == "Double Exponential" ) 	m = DEMA( P, Periods );
if( Type == "Tripple Exponential" ) 	m = TEMA( P, Periods );
if( Type == "Wilders" ) 				m = Wilders( P, Periods );
if( Type == "Simple" ) 					m = MA( P, Periods );


Plot( m, _DEFAULT_NAME(), ParamColor("Color", colorWhite), styleThick, 0, 0,
Displacement );


//Plot Price
barcolor = IIf(C > m, ParamColor("Up Color",colorBrightGreen), IIf(C==m,colorRed, ParamColor("Dn Color",colorRed))); 
Plot( C, "Close", barcolor, ParamStyle("Style",styleThick+styleNoLabel) |
GetPriceStyle());

//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
_SECTION_BEGIN("Price");
Plot( C, "Close", ParamColor("Color", colorLightOrange ),
styleNoLine|styleNoRescale ); 
_SECTION_END();
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

1 comments

1. amitrandive

Thanks !!!

Leave Comment

Please login here to leave a comment.

Back