PureBytes Links
Trading Reference Links
|
the following VB code
doesnt work why
Set amibroker = CreateObject("Broker.Application")
amibroker.Import(0, "stock.tmp", "ami.format")
amibroker.RefreshAll
I know the createobject function work
i can see all the symbols refreshing in ami when i run the program.
and these line are working to get a symbol list
c = amibroker.stocks.Count
Open "stock.lst" For Output As #1
For a = 1 To c - 1
Print #1, amibroker.stocks(a).ticker
Next a
Close #1 c = amibroker.stocks.Count
but i have a list of ascii data
example: "stock.tmp"
"AXP","7/2/2001",39.51,39.00,39.95,38.60,4617800
"BA","7/2/2001",56.36,56.60,57.22,56.30,3339400
"C","7/2/2001",53.48,52.95,53.70,52.31,8862300
"CAT","7/2/2001",51.96,50.05,52.25,50.05,2065100
"DAVE","7/2/2001",9.93,9.73,9.99,9.71,151600
with the file "ami.format"
$FORMAT Ticker, Date_MDY, Close, Open, High, Low, Volume
$SKIPLINES 0
$SEPARATOR ,
$CONT 1
$GROUP 255
$AUTOADD 1
$DEBUG 1
using the importer by hand the data will import
but using
amibroker.Import(0, "stock.tmp", "ami.format")
just doesn't work.
if this work I can update ami broker as fast as it can take to do a
standard import.
and in real time.
testing shows the dow 30 list can be done in under 3 sec ( a guess
it could be faster)
nick
|