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

Re: [amibroker] How to get 100 symbols' streaming bid/ask data using GetRTdata()?



PureBytes Links

Trading Reference Links

Simply you don't need to do that at all.
You are approaching from wrong end.

GetRTData function gives CURRENT value of bid/ask - no need to
use any endless loops - it gives all the current data form RT quote window.

>From your two last e-mails it seems that you want to
store bid/asks to build historical database by collecting them every 0.2 seconds
- this is NOT the task AFL at all.

Instead go, download IB API and write C++ standalone program that will
do that and store bid/ask data in the database. Then you can use ODBC plugin
to access from AFL level (http://www.amibroker.com/odbc.html)

For what is worth: Bid/asks from IB are snapshots anyway - this makes them
pretty useless if you collect history and perform "backtest".
It is like using random data. (what you get is just few picked bid/ask
records that do not really tell real story). IB/TWS feed has been designed by IB
to refresh DISPLAY GRID in TWS, not to perform historical analysis.

Read what IB staff have to say about it:
http://www.interactivebrokers.com/cgi-bin/discus/board-auth.pl?file=/2/37364.html

Quote from Ernie IB QA:
"The quotes that you see on the TWS and are currently seeing from the API will, in all likelihood, will be the best you?re going to 
get over an internet connection. The catch in that sentence is the word CURRENTLY. To even the most seasoned trader, the quotes will 
appear to be every tick ? but that?s as fast as the HUMAN EYE and brain can register. Where the excellent quotes you're getting will 
lose their high marks, are when a computer program puts them under the microscope.
======================================================================================================

Our system and TWS makes no effort to hold on to and ensure the delivery of data.
================================================================
Whatever the default buffers you have for memory, processor, TCP (I have no idea, anymore what the threshold is) is all you will get 
to ensure that you get a given tick of market data. This is a good thing, in that you will rarely see a stale tick.

It's not such a good thing if you want to go back and look at what the market was doing after whichever guy said something on the 
news that caused everyone to do something silly"

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "jasonsun503" <jasonsun503@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Thursday, May 10, 2007 2:01 AM
Subject: [amibroker] How to get 100 symbols' streaming bid/ask data using GetRTdata()?


> If I use endless loop, like " for(;;)", the CPU and net work will be
> very busy. The AFL does not have sleep() or pause() function....
>
> Another thought will be run a automation script to automatically scan
> all symbols each 0.2 seconds (if we are using IB data feed)
>
> I appreciate all suggestions anybody can give.
>
> many thanks
>
>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
> Yahoo! Groups Links
>
>
>
>
> 



Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/