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

[amibroker] offtopic: Searching for yahoo ticker for gold



PureBytes Links

Trading Reference Links

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 = 100

set ABO = createObject( "Broker.Application" )

ABO.LoadDatabase("d:\money\amibroker\test")
set ABStocks = ABO.Stocks
Amount = 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
    
next

AmiBroker.RefreshAll()
WScript.Echo( "Finished Database" )



------------------------ 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/