I thought I had my problem solved from a previous post
but still
having trouble. I am obviously new,but am trying hard to learn.I saw a
formula in a book I read and thought I'd give it a try. I have most of
it working but I can not total the array properly. When I run an
exploration the SVS_VF column is blank. If it was working properly it
should show a running total of volume. Not sure what I am doing wrong
any help appreciated.
thank you
Nick C.
_SECTION_BEGIN("Effective Volume");
/* Create date: 13 Feb 2007
The Close Price of the current bar is greater than the Close Price of
1 bar ago */
TodayClose = Close;
TodayLow=Low;
yesterdayclose=Ref(Close,-1);
HighClose=Max(TodayClose,YesterdayClose);
LowClose=Min(TodayLow,YesterdayClose);
EV = abs(Todayclose-yesterdayclose)/(HighClose-Lowclose)*Volume;
VolumeAmount = 10000;
SVS = IIf(Filter = (EV < Volumeamount), EV, 0 );
SVS=IIf(TodayClose > YesterdayClose,SVS,-SVS);
LVS = IIf(Filter = (EV > VolumeAmount), EV, 0 );
Lvs = IIf(TodayClose > YesterdayClose,LVS,-LVS);
SVS_VF=SVS;
LVS_VF = LVS;
for(i=1;i<BarCount;i++)
{
SVS_VF[i] = SVS_vf[i-1] + SVS[i];
}
_Section_End();
/*_SECTION_BEGIN("Small Volume");
SetChartOptions(0,chartShowDates);
//SetChartOptions(0,0,chartGrid30|chartGrid70);
periods = Param( "Periods", 15, 1, 200, 1 );
Plot( SVS,"Small Volume", ParamColor( "Color", colorCycle ),
ParamStyle("Style") );
_SECTION_END();
_SECTION_BEGIN("LargeVol");
SetChartOptions(0,chartShowDates);
//SetChartOptions(0,0,chartGrid30|chartGrid70);
periods = Param( "Periods", 15, 1, 200, 1 );
Plot( LVS,"LargeVol", ParamColor( "Color", colorCycle
),
ParamStyle("Style") );
_SECTION_END();*/
AddColumn( Open, "Open " );
AddColumn( Close, "Close " );
AddColumn( Volume, "Volume " );
AddColumn( EV, "EVVolume " );
AddColumn( SVS, "SVS " );
AddColumn( Svs_VF, "SVS_VF " );
AddColumn( LVS, "LVS " );
AddColumn( LVS_VF, "LVS_VF " );
Filter=1;