Re: Free RealTime Data NOW Nest ODIN Trade Tiger Google Yahoo to AmiBroker, Fcharts M
Thanks. So VWAP data is comma seperated whereas in NEST it is tabs.
In this case we should be able to import it into AB as it is. Maybe only the last comma needs to be remove.
Is the data table in charts also similar?
Now you know why I need them in an array....!
Which thread will send them to Ami ? Thread B or Will there be thread C. May be silly question, but I have not studied threads.
Edit-
There will be no need to do any more changes except bug fixes. If you are able to do it, I will try to construct GUI around it rather than doing it in Autoit.
Thread B ( spawned from main ) reads O/H/L/C and sends to AB.
I have some work piled up now so i am not doing it. Just finalizing fixes to release final build.
But instead, we can make the js script much faster.
Also you can try to export data from AB as 1 min candles and then import it back again to convert DB. I dunno if we can do this from an application
https://groups.yahoo.com/neo/groups/amibroker/conversations/topics/116071
Quote Editor is very fast but there is no API for bulk deletion of quotes. Check this Java Script --
Thanks for this. i can use it as reference to understand AB api for future.
(Example delete overlapping bars in AB for backfill )
On first view, i think can be easily optimized. There are two problems
1. Small issue - I dont know Windows SH. But anyway, i assume that all com calls are repeated as they run. Problem is that there are some unnecessary duplicate com calls
ex oStock.Quotations.Count is called in loop. You can instead do it once per scrip and store its value in a var. Another example - oStock.Ticker called twice for log
2. Big issue - It seems that the quotes recieved from AB is sorted ( since we break if a quote is after DayDeleteUpto in code )
If so, we can get HUGE performance improvement (if quotes to be deleted are much less than no of quotes in DB) by a very simple change of using binary search.
Binary search is very simple - Instead of iterating one by one you look at middle and go left or right recursively.
Look it up in google - its very simple.
Try to fix it. I will do it if needed later.
Right now this script is unusable for me with 1-2 year 1min data for 2 scrips + 1 sec data for less than a month.
Edit - Binary search wont solve performance if we delete all db data. Then it will be same, probably worse. To delete all data, its probably best to try to use some script within AB. In our case we only need to delete todays quote for which binary search is perfect.
Alternately, since we remove data from end, iterate backwards - this should be faster than binary search for our use case as will start from last bar today and Exit as soon as we get last candle of yesterday