PureBytes Links
Trading Reference Links
|
<SPAN
class=409032514-23062004>Without trying this myself (sorry, won't do that!), I
bet you need to loop downwards, so the previously deleted bars don't effect
which ones get deleted after that. If you think carefully about what bars you
need to delete, step by step through the loop, you could actually always delete
bar j. That would be the 100th bar from the end the first iteration, then the
99th, 98th etc.
<SPAN
class=409032514-23062004>
<SPAN
class=409032514-23062004>Make sense?
<SPAN
class=409032514-23062004>
<SPAN
class=409032514-23062004>Dave
<BLOCKQUOTE
>I
have written the following in VBS to be able to delete the last 100 quotes
of the entire database. Reason for this is the partial pollution of my
database with Lycos EOD quotes.The code works well, except it does not
delete all the quotations but only half of them and leaves dataholes
instead. Maybe sopmebody can help?TIA
Andreas>>>>>>>>>>>>>>>>>>ToDelete
= 100set ABO = createObject( "Broker.Application"
)ABO.LoadDatabase("d:\money\amibroker\test")set ABStocks =
ABO.StocksAmount = ABStocks.count()for i = 0 to Amount
-1 set StockName=
ABStocks(i) Days=
StockName.quotations.count() If ToDelete > Days then
ToDelete = Days Start = Days -
ToDelete for j = Start to Days
-1
StockName.Quotations.Remove(j)
next
nextAmiBroker.RefreshAll()WScript.Echo( "Finished Database"
)
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Sponsor
ADVERTISEMENT
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 the Yahoo! Terms of Service.
|