F2011B / ami2py

Python Package for reading an amibroker database
MIT License
20 stars 6 forks source link

Unable to get latest quote accurately using get_fast_symbol_data() #4

Open helpme1 opened 2 years ago

helpme1 commented 2 years ago

I tried to get the latest quotes using get_fast_symbol_data(). However, the results returned is not accurate. You may try to see if you can reproduce the problem.

Code looks something like this;

from ami2py import AmiDataBase, SymbolEntry
db_path = 'C:/Program Files/AmiBroker/test_database'
db = AmiDataBase(db_path)
data = db.get_fast_symbol_data("SPCE")
latest_quote = data[-1]
F2011B commented 1 year ago

I tried to get the latest quotes using get_fast_symbol_data(). However, the results returned is not accurate. You may try to see if you can reproduce the problem.

Code looks something like this;

from ami2py import AmiDataBase, SymbolEntry
db_path = 'C:/Program Files/AmiBroker/test_database'
db = AmiDataBase(db_path)
data = db.get_fast_symbol_data("SPCE")
latest_quote = data[-1]

I cannot reproduce the error, I compared the data in Amibroker with the data given back by python. However, I have writen a new test and committed that to the master.