Volume Weighted Moving Average code (VWMA)  [SOLVED]

Questions about MultiCharts and user contributed studies.
User avatar
StefanoSF
Posts: 116
Joined: 19 Aug 2012
Location: San Francisco
Has thanked: 23 times
Been thanked: 30 times
Contact:

Volume Weighted Moving Average code (VWMA)

Postby StefanoSF » 23 Jan 2017

Maybe someone can help me. In this months issue(2/17) of Stocks and Commodities there is a trading strategy which use Volume Weighted Moving Average to id breakouts.

I have searched hi and low for the MC or EL VWMA code and can't find one that works correctly. I've tried writing it myself with no success.

If someone has a running version, could you share?

User avatar
CrazyNasdaq
Posts: 264
Joined: 02 Sep 2009
Location: ITALY
Has thanked: 78 times
Been thanked: 80 times

Re: Volume Weighted Moving Average code (VWMA)  [SOLVED]

Postby CrazyNasdaq » 24 Jan 2017

Maybe this code can help you

Code: Select all

inputs:
Lunghezza(20);

vars:
PMi( 0 ),
Vi( 0 ),
PMvi( 0 ),
Sum.PMVi( 0 ),
Sum.Vi( 0 ),
VWMA( 0 );

 PMi = avgPrice;
 Vi = volume;
 PMvi = Pmi * Vi;
 Sum.PMVi = summation(PMVi, lunghezza);
 Sum.Vi = summation(Vi, lunghezza);
 VWMA = Sum.PMVi / Sum.Vi;
 
 
PLot1(vwma, "VWMA");
These users thanked the author CrazyNasdaq for the post (total 2):
LRPasyx

User avatar
StefanoSF
Posts: 116
Joined: 19 Aug 2012
Location: San Francisco
Has thanked: 23 times
Been thanked: 30 times
Contact:

Re: Volume Weighted Moving Average code (VWMA)

Postby StefanoSF » 24 Jan 2017

Grazie. :D

User avatar
CrazyNasdaq
Posts: 264
Joined: 02 Sep 2009
Location: ITALY
Has thanked: 78 times
Been thanked: 80 times

Re: Volume Weighted Moving Average code (VWMA)

Postby CrazyNasdaq » 24 Jan 2017

Prego !!


Return to “MultiCharts”