PureBytes Links
Trading Reference Links
|
> Nick wrote:
>Thank you for getting back to me David and Graham. All of your
suggestions were applied and the program works great!
--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxx> wrote:
>
> You have these statements like this
> SVS = IIf(Filter = (EV < Volumeamount), EV, 0 );
> remove the 'filter='
> SVS = IIf(EV < Volumeamount, EV, 0 );
>
> In this statement, if HighClose == Lowclose then you will get a
divide by
> zero which gives error
> << maybe check this with explorations to see if this occurs
> EV = abs(Todayclose-yesterdayclose)/(HighClose-Lowclose)*Volume;
> change to, using Nz which convert null values to zero
> EV = nz(abs(Todayclose-yesterdayclose)/(HighClose-Lowclose)*Volume);
>
> together with the Cum as mentioned before
>
> --
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://www.aflwriting.com
>
>
> On 23/02/07, dbw451 <dbw451@xxx> wrote:
> >
> > Nick, use the Cum function instead of the loop to calculate SVS_VF:
> >
> >
> >
> > SVS_VF = Cum(SVS);
> >
> >
> >
> > I think the first value of SVS (i.e. SVS[0]) must be NULL which is
causing
> > your calculation to sum as NULL.
> >
> >
> >
> > Regards,
> >
> >
> >
> > David
> >
> >
> > ------------------------------
> >
> > *From:* amibroker@xxxxxxxxxxxxxxx
[mailto:amibroker@xxxxxxxxxxxxxxx] *On
> > Behalf Of *NickCivit
> > *Sent:* 02/22/2007 6:28 PM
> > *To:* amibroker@xxxxxxxxxxxxxxx
> > *Subject:* [amibroker] Array logic
> >
> >
> >
> > 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 & 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 & communities. is subject to:
http://docs.yahoo.com/info/terms/
|