[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Array logic



PureBytes Links

Trading Reference Links

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;




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Transfer from your equities account.  
Receive up to $1,000 from GFT. Click here to learn more.
http://us.click.yahoo.com/aZttyC/X_xQAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups - Join or create groups, clubs, forums &amp; communities. Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups - Join or create groups, clubs, forums &amp; communities. is subject to:
    http://docs.yahoo.com/info/terms/