Volume Wave Trading System

Volume Wave Trading System
 

//www.aflcode.com
_SECTION_BEGIN("Volume Wave V.1.0");
percent = Param("Change %",1,0.1,3,0.1);
barcomplete = BarIndex() < LastValue(BarIndex());
j = Zig(C,percent);
Vw[0] = 0;
for(i = 3; i < BarCount; i++)
{
if (j[i]>j[i-1] AND j[i-1]<j[i-2] AND barcomplete[i]) Vw[i]=V[i];
else
{
if (j[i]<j[i-1] AND j[i-1]>j[i-2] AND barcomplete[i]) Vw[i]=V[i];
else
Vw[i] =V[i]+Vw[i-1];
}
}
SetBarFillColor( IIf(j>Ref(j,-1),colorDarkGreen,colorDarkRed) ); 
PlotOHLC(0,Vw,0,Vw,"Volume Wave",IIf(j>Ref(j,-1),colorLime,colorRed) , ParamStyle("Histogram style", styleHistogram|styleThick | styleNoLabel, maskHistogram ) ) ;
_SECTION_END();

Leave a Reply

Your email address will not be published. Required fields are marked *