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

KTS - Moving Volume Weighted Average Price (MVWAP) 5x20 for Amibroker (AFL)

Rating:
4 / 5 (Votes 2)
Tags:
amibroker, mvwap, cross, moving average, volume

The Moving Volume Weighted Average Price (MVWAP) is a special type of price average indicator which takes into account volume; this provides a much more accurate snapshot of the average price.

This formula shows buy/sell signal based on the cross of a 5 day MVWAP and 20 day MVWAP. The formula also contains many other variables for different periods and conditions using the MVWAP indicator. Please see the code.

Screenshots

Indicator / Formula

Copy & Paste Friendly

Can be apply within price chart or in a separate window

_SECTION_BEGIN("Name");

GfxSetOverlayMode(1);
GfxSelectFont("Tahoma", Status("pxheight")/8 );
GfxSetTextAlign( 6 );// center alignment
GfxSetTextColor(colorRed);
GfxSetBkMode(0); // transparent
GfxTextOut( Name(), Status("pxwidth")/2, Status("pxheight")/12 );
GfxSelectFont("Tahoma", Status("pxheight")/18 );
GfxSetTextColor(colorGrey40);
GfxTextOut( " Kulotskyman Trading ", Status("pxwidth")/2, Status("pxheight")/4 );

_SECTION_END();


_SECTION_BEGIN("MVWAP");
MVWAPAverage_TOGGLE = ParamToggle("MVWAP","Off|On",1);
MVWAP5 		= MA(C*V,5)/ MA(V,5);
MVWAP20 	= MA(C*V,20)/ MA(V,20);
MVWAP50 	= MA(C*V,50)/ MA(V,50);
MVWAP100 	= MA(C*V,100)/ MA(V,100);
MVWAP200 	= MA(C*V,200)/ MA(V,200);
MVWAP250 	= MA(C*V,250)/ MA(V,250);

MVWAPCross520					=	MVWAP5>MVWAP20;
MVWAPCross520D					=	MVWAP5<MVWAP20;
MVWAPCross520B					=	Cross(MVWAP5,MVWAP20);
MVWAPCross520S					=	Cross(MVWAP20,MVWAP5);
MVWAPCross520Buybars 			= 	BarsSince(MVWAPCross520B);
MVWAPCross520Sellbars 			= 	BarsSince(MVWAPCross520S);
MVWAPCross520Since 				=	IIf(MVWAPCross520,MVWAPCross520Buybars,MVWAPCross520Sellbars);
MVWAPCross520_Status			=	WriteIf(MVWAPCross520,"Bullish ",WriteIf(MVWAPCross520D,"Bearish ","N/A "));
MVWAPCross520_Color				=	IIf(MVWAPCross520,colorGreen,colorRed);

MVWAPCross2050					=	MVWAP20>MVWAP50;
MVWAPCross2050D					=	MVWAP20<MVWAP50;
MVWAPCross2050B					=	Cross(MVWAP20,MVWAP50);
MVWAPCross2050S					=	Cross(MVWAP50,MVWAP20);
MVWAPCross2050Buybars 			= 	BarsSince(MVWAPCross2050B);
MVWAPCross2050Sellbars 			= 	BarsSince(MVWAPCross2050S);
MVWAPCross2050Since 			=	IIf(MVWAPCross2050,MVWAPCross2050Buybars,MVWAPCross2050Sellbars);
MVWAPCross2050_Status			=	WriteIf(MVWAPCross2050,"Bullish ",WriteIf(MVWAPCross2050D,"Bearish ","N/A "));
MVWAPCross2050_Color			=	IIf(MVWAPCross2050,colorGreen,colorRed);

MVWAPCross50100					=	MVWAP50>MVWAP100;
MVWAPCross50100D				=	MVWAP50<MVWAP100;
MVWAPCross50100B				=	Cross(MVWAP50,MVWAP100);
MVWAPCross50100S				=	Cross(MVWAP100,MVWAP50);
MVWAPCross50100Buybars 			= 	BarsSince(MVWAPCross50100B);
MVWAPCross50100Sellbars	 		= 	BarsSince(MVWAPCross50100S);
MVWAPCross50100Since 			=	IIf(MVWAPCross50100,MVWAPCross50100Buybars,MVWAPCross50100Sellbars);
MVWAPCross50100_Status			=	WriteIf(MVWAPCross50100,"Bullish ",WriteIf(MVWAPCross50100D,"Bearish ","N/A "));
MVWAPCross50100_Color			=	IIf(MVWAPCross50100,colorGreen,colorRed);

MVWAPCross50200					=	MVWAP50>MVWAP200;
MVWAPCross50200D				=	MVWAP50<MVWAP200;
MVWAPCross50200B				=	Cross(MVWAP50,MVWAP200);
MVWAPCross50200S				=	Cross(MVWAP200,MVWAP50);
MVWAPCross50200Buybars 			= 	BarsSince(MVWAPCross50200B);
MVWAPCross50200Sellbars	 		= 	BarsSince(MVWAPCross50200S);
MVWAPCross50200Since 			=	IIf(MVWAPCross50200,MVWAPCross50200Buybars,MVWAPCross50200Sellbars);
MVWAPCross50200_Status			=	WriteIf(MVWAPCross50200,"Bullish ",WriteIf(MVWAPCross50200D,"Bearish ","N/A "));
MVWAPCross50200_Color			=	IIf(MVWAPCross50200,colorGreen,colorRed);

MVWAPCross50250					=	MVWAP50>MVWAP250;
MVWAPCross50250D				=	MVWAP50<MVWAP250;
MVWAPCross50250B				=	Cross(MVWAP50,MVWAP250);
MVWAPCross50250S				=	Cross(MVWAP250,MVWAP50);
MVWAPCross50250Buybars 			= 	BarsSince(MVWAPCross50250B);
MVWAPCross50250Sellbars	 		= 	BarsSince(MVWAPCross50250S);
MVWAPCross50250Since 			=	IIf(MVWAPCross50250,MVWAPCross50250Buybars,MVWAPCross50250Sellbars);
MVWAPCross50250_Status			=	WriteIf(MVWAPCross50250,"Bullish ",WriteIf(MVWAPCross50250D,"Bearish ","N/A "));
MVWAPCross50250_Color			=	IIf(MVWAPCross50250,colorGreen,colorRed);

if(MVWAPAverage_TOGGLE==1)
{
	Plot(MVWAP5,"MVWAP5",colorRed,styleThick);
	Plot(MVWAP20,"MVWAP20",colorBlue,styleThick);
	//Plot(MVWAP50,"MVWAP50",colorLime,styleThick);
	Plot(MVWAP100,"MVWAP100",colorGold,styleThick);
	//Plot(MVWAP200,"MVWAP200",colorTurquoise,styleThick);
	//Plot(MVWAP250,"MVWAP250",colorPaleGreen,styleThick);
}

_SECTION_END();

Buy=MVWAPCross520B;
PlotShapes(shapeUpArrow*Buy,colorGreen);
Sell=MVWAPCross520S;
PlotShapes(shapeDownArrow*Sell,colorRed);

3 comments

1. hunaidbh

Thanx a lot brother

2. bebo

WELL done , thanx

3. pragnesh224

So many times even mvwap5<mvwap20,
mvwap5 Crossed andclosed below mvwap20,
but it doesn’t give sell signal and continue to hold buy signal,
Why?
May i know the reason?

Leave Comment

Please login here to leave a comment.

Back