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

[amibroker] AB Problem with IIF command.



PureBytes Links

Trading Reference Links

Andreas,
   Easy solution is to do an AA explore between dates you wish to keep, Export
the results, Then Re-Import into a Clean DB. (Yeah it's big, But it works & 
is easy).

         ATB
          Michael.






At 12:29 AM 24/06/2004, you wrote:
>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.
>
>Make sense?
>
>Dave
>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 --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/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/