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

RE: [amibroker] AddToComposite() function



PureBytes Links

Trading Reference Links

Martin

if you check for volume and it is zero, then fing the prior nonzero volume
day and use thr prices for that day

if (volume[barindex()]==0)
//find first bar with non-zero volume
Bar_Num=BarsSince(Volume!=0);
C=Ref(C,-Bar_Num);


I did not test this code ... but you get the idea


----- Original Message ----- 
From: "Martin Cooney" <martin@xxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, July 26, 2004 6:14 PM
Subject: [amibroker] data issues with zero volume days


> Hi All,
>
> The data I currently obtain from my data provider essentially lists
> prices for zero volume days as zero i,e High=0, Low=0, Close=0, Open=0.
>
> Unfortunately, when backtesting these values cause the system to cop a
> 100% loss etc which, you can well imagine, is not what I'd like to see
> happen. It also causes down spikes in graphing.
>
> Ideally, I'd like to 'fix' the zero value days with value of the
> previous day's Close.
>
> Does anyone else have/had this problem and some suggestions on an
> appropriate remedy ?
>
> Best Regards
> Martin
>
>
>
> Check AmiBroker web page at:
> http://www.amibroker.com/
>
> Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> Yahoo! Groups Links
>
>
>
>
>
>




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

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

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

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/