Hello,
I am getting sick and tired of people who don't bother to read
appropriate vendor documents
and make up different theories without checking
facts.
Is it that hard to go to IB web site and check first
????
You are completely mixing different things.
There are THREE different areas:
1. streaming quotes from IB
2. backfill from IB
3. AddToComposite:
1. IB is NOT tick-by-tick data. They send
0.3 second streaming updates. These are not ticks!
Read this:
Ticks are sent ONLY by IQFeed and eSignal and on e-minis there
can be even 500 ticks per second (on very active moment)
and AmiBroker HANDLES THEM ALL - if you eSignal sends 500
ticks - the tick chart in AmiBroker will show 500 ticks.
If this happen in the same second - they all will have SAME
TIME STAMP.
Tick data are special because they VERY often have same time
stamp for multiple ticks. And the granularity
of timestamps has NOTHING to do with application being
tick aware or not.
For example IQFeed DTN app was having 1-minute timestamps but
still supporting ticks.
2. Backfill from IB
There is NO tick-by-tick backfill from IB. Again only IQFeed
and eSignal provide tick backfill.
Backfill from IB is limited to 1-second
bar interval only.
To use it in AB you would need to select "Tick" base
interval, but still it is limited to what
DATA VENDOR PROVIDES. In case of eSignal or IQFeed you would
get TRUE TICK-BY-TICK
backfill. In case of IB you would get 1-second bars. It is IB
limitation. Not AB. Understand???
Again, instead of making theories - READ THEIR
DOCS!
Quote from this page:
void
reqHistoricalData (TickerID id, const Contract &contract, String
endDateTime, String durationStr, long barSizeSetting String whatToShow, int
useRTH, int formatDate)
barSizeSetting - specifies the size of
the bars that will be returned (within IB/TWS limits). Valid values
include:
Bar
Size |
Parametric Value |
1 sec |
1 |
5 secs |
2 |
15 secs |
3 |
30 secs |
4 |
1 min. |
5 |
2 mins |
6 |
5 mins. |
7 |
15 mins |
8 |
30 mins |
9 |
1 hour |
10 |
1 day |
11 |
3. What is limited to 5 seconds bar
resolution are USER COMPOSITES PRODUCED BY ADDTOCOMPOSITE.
So you have completely mixed up 3 things. Next time read the
docs, and if you can't - ASK THE SUPPORT, before making your own wrong
theories.
Best regards, Tomasz Janeczko amibroker.com
----- Original Message -----
Sent: Tuesday, August 14, 2007 9:33
AM
Subject: Re: [amibroker] Re: Real time
indicators using GETRTDATA
Hi,
IB sends out data a lot faster than every 5seconds,
more like every 0.3seconds ( http://www.linnsoft.com/qa/a/108.htm
), just look at the time and sales window, seems to be moving a lot faster
that every 5 seconds?? I understand that it is snapshot data and not
true tick data, I understand their backfill data is not the same
resolution. I understand that IB doesnt send the time info, but if you are
capturing it in real time the best AB seems to be able to do is every 5
seconds. Why cant you just time stamp the data coming in using local system
time every 0.5seconds or something and thus increase the resolution of your
local data??
Do you see my point?? Or am I making a fool of
myself...??
On 8/14/07, R4
InvestGroup <R4.InvestGroup@xxxxxxxxx>
wrote:
James,
Is that correct?? Or am I totally off the mark
here...??
>> IB supply 5 second snapshot data. In other words 5 second OHLC bars which is not tick data. Tick data contain date, time, close, volume.
Now you can see the difference...
If you set your
database in AB to tick but you have 5 seconds data, AB unable
to produce tick resolution.
I can send you true tick to directly to
see the difference.
M.
On 8/14/07, R4
InvestGroup <
R4.InvestGroup@xxxxxxxxx > wrote:
James,
but it cant really go below 5 seconds can it? I've just switched
over to the profession edition so i'm trying to work it
out...
>> It is not as difficult as you think! AB is supporting tick data. In other words if you have tick data you will see every tick, trade as a different bar on chart.
IB does *not* support tick data, their finest data resolution is 5 second. That's all. You can't make shorter perdiods from IB data than 5 seconds.
Try to collect true tick data and you will see how it looks like.
M.
On 8/14/07, Graham <
kavemanperth@xxxxxxxxx> wrote:
AB just uses what data it is supplied with If your data supply
is 5 second then that is what AB will use.
--
Cheers Graham Kav AFL Writing Service http://www.aflwriting.com
On 14/08/07, james <jameswillia@xxxxxxxxx> wrote:
> > > Hi, > > I'm beginning to think
what I want to do is impossible in AB because its not really a tick
based real time charting program at all its a 5second real time
charting program so you cant really manipulate any data below the
5second resolution anyway because AB just amalgamates it together....
Is this correct?? > > Cheers,
James. > > > > > > On 8/14/07,
james <
jameswillia@xxxxxxxxx> wrote: > > Hi Tomasz or
anyone, > > > > I didn't realize the smallest time
period in AB was 5 seconds.... > > > > The formula
didn't seem to work setting the arrays to = 0 , as only the last value
ended up in the composite, I assume because of the reset in the
addtocomposite defaults, so I set the arrays to equal the composites
> > > > This seems to work ok except it gets
strange values in all fields when there is more than one tick / entry
in a five second time period in the original ticker..... any ideas??
eg if I look in quote editor in original ticker and there is only one
entry in a 5 second period in matches in the composite, if there is
more than one entry per 5 second in original ticker I get crazy values
in composite... > > > > Is it possible to match the
number of fields to the original, eg if there are 3 entries in a five
second period in the original ticker to have 3 entries in the
composite?? Any that way capture indivual trade sizes as well (up to
resolution that IB provides anyway).... > > >
> > > tn = Now(4); > > ltn = StaticVarGet(
"LastTimeNum"); > > > > if( ltn != tn ) > >
{ > > StaticVarSet( "LastTimeNum", tn ); >
> > > bidarray = Foreign("~BA_", "L" ); > >
bidarray[ BarCount - 1 ] = GetRTData("bid"); > > askarray =
Foreign("~BA_", "H" ); > > askarray[ BarCount - 1 ] =
GetRTData("ask"); > > > > sizearray =
Foreign("~BA_","V"); > > sizearray[ BarCount -1 ] =
GetRTData("tradevolume"); > > > > lastarray =
Foreign("~BA_","C"); > > lastarray[ BarCount -1 ] =
GetRTData("last"); > > > > AddToComposite(
lastarray, "~BA_","C", atcFlagDefaults | atcFlagEnableInIndicator );
> > AddToComposite( sizearray, "~BA_","V", atcFlagDefaults |
atcFlagEnableInIndicator ); > > AddToComposite( bidarray,
"~BA_", "L", atcFlagDefaults | atcFlagEnableInIndicator ); >
> AddToComposite( askarray, "~BA_", "H", atcFlagDefaults |
atcFlagEnableInIndicator ); > > } > > >
> > > Cheers, James. > > > > >
> On 8/13/07, Tomasz Janeczko <groups@xxxxxxxxxxxxx> wrote: >
>
> > > Hello, > > > > > >
You should call GetRTData for bid and ask and store using
AddToComposite: > > > > > > Appropriate code
should look as follows (I DID NOT TEST IT - I am writting off hand)
> > > - it will create 5 second bid/ask "bars". >
> > High will hold ask, Low will hold bid. > >
> > > > === Code that generates array > >
> > > > tn = Now(4); > > > ltn =
StaticVarGet( "LastTimeNum"+Name() ); > > > > >
> if( ltn != tn ) > > > { > > > >
> > StaticVarSet( "LastTimeNum"+Name(), tn ); > >
> > > > bidarray = 0; > > > bidarray[
BarCount - 1 ] = GetRTData("bid"); > > > > > >
askarray = 0; > > > askarray[ BarCount - 1 ] =
GetRTData("ask"); > > > > > > AddToComposite(
bidarray, "~BA_"+Name(), "X", atcFlagDefaults |
atcFlagEnableInIndicator ); > > > > > >
AddToComposite( askdarray, "~BA_"+Name(), "H", atcFlagDefaults |
atcFlagEnableInIndicator ); > > > } > >
> > > > ================ > > > To use them
somewhere lese use: > > > > > > askarray =
Foreign("~BA_"+Name()", "H" ); > > > > > >
bidarray = Foreign("~BA_"+Name()", "L" ); > > > >
> > > > > Best regards, > > > Tomasz
Janeczko > > > amibroker.com >
> > > > > ----- Original Message ----- > >
> From: james > > > To: amibroker@xxxxxxxxxxxxxxx > > > Sent:
Monday, August 13, 2007 3:19 AM > > > Subject: Re:
[amibroker] Re: Real time indicators using GETRTDATA > >
> > > > > > > Tomasz, > >
> > > > could you point me in the right direction in
how to code something to do this in real time, or is it impossible at
the moment?? > > > > > > Cheers,
James > > > > > > > > > On
8/13/07, treliff <
treliff@xxxxxxxxx> wrote: > > >
>
__._,_.___
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
SPONSORED LINKS
__,_._,___
|