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

[amibroker] Setting Ticker in script



PureBytes Links

Trading Reference Links

The script piece below switches to the non-default database.   This works
just great.  How do you select the ticker that is used for comparison
purposes?  It makes a big difference when dumping out data as to when data
starts as it apparently is tied to the last ticker used with that database.
I tried the set oStock statements below that does not seem to work.  A quick
google on this subject on the Amibroker group messages left me more confused
about this issue.  Manually switching the tickers showed a difference of
about 50,000 quotes across the database being exported (code not shown as
this works just fine except for setting of the ticker).

                                       

 if oAB.LoadDatabase("d:\program files\amibroker\AustraliaMetastock") = True
then                                       

        WScript.Echo( "successfully loaded new database" )                 

 end if 

WScript.Echo("Database path:  " + oAB.DataBasePath)

Set oAA = oAB.Analysis                                      

If oAA.LoadFormula("d:\program
files\amibroker\formulas\SCANS\dumpAustralia.afl") = True Then

   WScript.Echo("successfully loaded formula")

End If

          

Set oStocks =oAB.Stocks               ' optional: load settings

Set oStock = oStocks.Item("^AORD")    


Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.28/672 - Release Date: 2/6/2007 10:22 AM