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

[amibroker] Re: AB tick bar analysis



PureBytes Links

Trading Reference Links

I think the reason is that IB does not provide a time stamp with the 
data it sends and AB has to use the computer clock. If that is the 
case the data never will be in sync. That is what I have noticed. My 
last bar close on one minute intraday charts is never the same as 
Scottrade or the EOD database from Yahoo. IB sends data before the 
open and after the close and that can get shifted into the AB charts 
depending on your computer clock. Try looking at a few bars either 
way and see if the open and close is the same on them. But then I 
guess when you are looking at really short term data even different 
data feeds may not be in sync.

I dumped the last 100 bars of DJI tick data from Scottrade. If you 
have access to IB INDU tick data you could compare them. I can send 
the file if that would help.

Barry

$DJI.B [100 bars]
Time, Date, Open, High, Low, Close, Volume

12:57:25, 12/24/2007, 13550.470000, 13550.470000, 13550.470000, 
13550.470000, 0
12:57:27, 12/24/2007, 13550.880000, 13550.880000, 13550.880000, 
13550.880000, 0
12:57:29, 12/24/2007, 13551.530000, 13551.530000, 13551.530000, 
13551.530000, 0
12:57:31, 12/24/2007, 13551.120000, 13551.120000, 13551.120000, 
13551.120000, 0
12:57:33, 12/24/2007, 13550.550000, 13550.550000, 13550.550000, 
13550.550000, 0
12:57:35, 12/24/2007, 13550.390000, 13550.390000, 13550.390000, 
13550.390000, 0
12:57:37, 12/24/2007, 13549.990000, 13549.990000, 13549.990000, 
13549.990000, 0
12:57:39, 12/24/2007, 13549.330000, 13549.330000, 13549.330000, 
13549.330000, 0
12:57:41, 12/24/2007, 13549.090000, 13549.090000, 13549.090000, 
13549.090000, 0
12:57:43, 12/24/2007, 13549.420000, 13549.420000, 13549.420000, 
13549.420000, 0
12:57:45, 12/24/2007, 13549.010000, 13549.010000, 13549.010000, 
13549.010000, 0
12:57:47, 12/24/2007, 13548.600000, 13548.600000, 13548.600000, 
13548.600000, 0
12:57:49, 12/24/2007, 13548.930000, 13548.930000, 13548.930000, 
13548.930000, 0
12:57:51, 12/24/2007, 13549.170000, 13549.170000, 13549.170000, 
13549.170000, 0
12:57:53, 12/24/2007, 13549.090000, 13549.090000, 13549.090000, 
13549.090000, 0
12:57:59, 12/24/2007, 13549.500000, 13549.500000, 13549.500000, 
13549.500000, 0
12:58:01, 12/24/2007, 13549.990000, 13549.990000, 13549.990000, 
13549.990000, 0
12:58:03, 12/24/2007, 13549.900000, 13549.900000, 13549.900000, 
13549.900000, 0
12:58:05, 12/24/2007, 13550.230000, 13550.230000, 13550.230000, 
13550.230000, 0
12:58:07, 12/24/2007, 13549.900000, 13549.900000, 13549.900000, 
13549.900000, 0
12:58:09, 12/24/2007, 13549.660000, 13549.660000, 13549.660000, 
13549.660000, 0
12:58:11, 12/24/2007, 13549.990000, 13549.990000, 13549.990000, 
13549.990000, 0
12:58:13, 12/24/2007, 13549.500000, 13549.500000, 13549.500000, 
13549.500000, 0
12:58:15, 12/24/2007, 13549.740000, 13549.740000, 13549.740000, 
13549.740000, 0
12:58:17, 12/24/2007, 13550.230000, 13550.230000, 13550.230000, 
13550.230000, 0
12:58:19, 12/24/2007, 13550.640000, 13550.640000, 13550.640000, 
13550.640000, 0
12:58:21, 12/24/2007, 13550.230000, 13550.230000, 13550.230000, 
13550.230000, 0
12:58:23, 12/24/2007, 13550.550000, 13550.550000, 13550.550000, 
13550.550000, 0
12:58:25, 12/24/2007, 13550.390000, 13550.390000, 13550.390000, 
13550.390000, 0
12:58:27, 12/24/2007, 13551.200000, 13551.200000, 13551.200000, 
13551.200000, 0
12:58:29, 12/24/2007, 13551.120000, 13551.120000, 13551.120000, 
13551.120000, 0
12:58:31, 12/24/2007, 13551.040000, 13551.040000, 13551.040000, 
13551.040000, 0
12:58:33, 12/24/2007, 13551.120000, 13551.120000, 13551.120000, 
13551.120000, 0
12:58:35, 12/24/2007, 13551.290000, 13551.290000, 13551.290000, 
13551.290000, 0
12:58:37, 12/24/2007, 13553.720000, 13553.720000, 13553.720000, 
13553.720000, 0
12:58:39, 12/24/2007, 13553.640000, 13553.640000, 13553.640000, 
13553.640000, 0
12:58:40, 12/24/2007, 13553.810000, 13553.810000, 13553.810000, 
13553.810000, 0
12:58:43, 12/24/2007, 13555.680000, 13555.680000, 13555.680000, 
13555.680000, 0
12:58:44, 12/24/2007, 13555.350000, 13555.350000, 13555.350000, 
13555.350000, 0
12:58:46, 12/24/2007, 13555.270000, 13555.270000, 13555.270000, 
13555.270000, 0
12:58:49, 12/24/2007, 13555.190000, 13555.190000, 13555.190000, 
13555.190000, 0
12:58:50, 12/24/2007, 13554.700000, 13554.700000, 13554.700000, 
13554.700000, 0
12:58:52, 12/24/2007, 13554.370000, 13554.370000, 13554.370000, 
13554.370000, 0
12:58:54, 12/24/2007, 13554.050000, 13554.050000, 13554.050000, 
13554.050000, 0
12:58:56, 12/24/2007, 13555.020000, 13555.020000, 13555.020000, 
13555.020000, 0
12:58:59, 12/24/2007, 13555.110000, 13555.110000, 13555.110000, 
13555.110000, 0
12:59:00, 12/24/2007, 13554.860000, 13554.860000, 13554.860000, 
13554.860000, 0
12:59:02, 12/24/2007, 13553.320000, 13553.320000, 13553.320000, 
13553.320000, 0
12:59:04, 12/24/2007, 13552.420000, 13552.420000, 13552.420000, 
13552.420000, 0
12:59:06, 12/24/2007, 13551.850000, 13551.850000, 13551.850000, 
13551.850000, 0
12:59:08, 12/24/2007, 13552.500000, 13552.500000, 13552.500000, 
13552.500000, 0
12:59:10, 12/24/2007, 13552.180000, 13552.180000, 13552.180000, 
13552.180000, 0
12:59:13, 12/24/2007, 13551.530000, 13551.530000, 13551.530000, 
13551.530000, 0
12:59:14, 12/24/2007, 13550.960000, 13550.960000, 13550.960000, 
13550.960000, 0
12:59:16, 12/24/2007, 13552.910000, 13552.910000, 13552.910000, 
13552.910000, 0
12:59:18, 12/24/2007, 13552.590000, 13552.590000, 13552.590000, 
13552.590000, 0
12:59:20, 12/24/2007, 13552.420000, 13552.420000, 13552.420000, 
13552.420000, 0
12:59:22, 12/24/2007, 13551.770000, 13551.770000, 13551.770000, 
13551.770000, 0
12:59:24, 12/24/2007, 13553.070000, 13553.070000, 13553.070000, 
13553.070000, 0
12:59:26, 12/24/2007, 13552.180000, 13552.180000, 13552.180000, 
13552.180000, 0
12:59:28, 12/24/2007, 13551.770000, 13551.770000, 13551.770000, 
13551.770000, 0
12:59:30, 12/24/2007, 13555.430000, 13555.430000, 13555.430000, 
13555.430000, 0
12:59:32, 12/24/2007, 13554.780000, 13554.780000, 13554.780000, 
13554.780000, 0
12:59:34, 12/24/2007, 13554.940000, 13554.940000, 13554.940000, 
13554.940000, 0
12:59:36, 12/24/2007, 13554.620000, 13554.620000, 13554.620000, 
13554.620000, 0
12:59:38, 12/24/2007, 13555.110000, 13555.110000, 13555.110000, 
13555.110000, 0
12:59:40, 12/24/2007, 13555.590000, 13555.590000, 13555.590000, 
13555.590000, 0
12:59:42, 12/24/2007, 13555.020000, 13555.020000, 13555.020000, 
13555.020000, 0
12:59:44, 12/24/2007, 13554.940000, 13554.940000, 13554.940000, 
13554.940000, 0
12:59:46, 12/24/2007, 13555.680000, 13555.680000, 13555.680000, 
13555.680000, 0
12:59:48, 12/24/2007, 13554.700000, 13554.700000, 13554.700000, 
13554.700000, 0
12:59:50, 12/24/2007, 13556.160000, 13556.160000, 13556.160000, 
13556.160000, 0
12:59:52, 12/24/2007, 13554.210000, 13554.210000, 13554.210000, 
13554.210000, 0
12:59:54, 12/24/2007, 13553.810000, 13553.810000, 13553.810000, 
13553.810000, 0
12:59:56, 12/24/2007, 13554.540000, 13554.540000, 13554.540000, 
13554.540000, 0
12:59:58, 12/24/2007, 13555.350000, 13555.350000, 13555.350000, 
13555.350000, 0
13:00:00, 12/24/2007, 13556.730000, 13556.730000, 13556.730000, 
13556.730000, 0
13:00:02, 12/24/2007, 13557.950000, 13557.950000, 13557.950000, 
13557.950000, 0
13:00:04, 12/24/2007, 13557.870000, 13557.870000, 13557.870000, 
13557.870000, 0
13:00:12, 12/24/2007, 13557.460000, 13557.460000, 13557.460000, 
13557.460000, 0
13:00:14, 12/24/2007, 13556.980000, 13556.980000, 13556.980000, 
13556.980000, 0
13:00:16, 12/24/2007, 13557.140000, 13557.140000, 13557.140000, 
13557.140000, 0
13:00:20, 12/24/2007, 13556.570000, 13556.570000, 13556.570000, 
13556.570000, 0
13:00:22, 12/24/2007, 13556.160000, 13556.160000, 13556.160000, 
13556.160000, 0
13:00:33, 12/24/2007, 13555.430000, 13555.430000, 13555.430000, 
13555.430000, 0
13:00:39, 12/24/2007, 13554.540000, 13554.540000, 13554.540000, 
13554.540000, 0
13:00:43, 12/24/2007, 13554.050000, 13554.050000, 13554.050000, 
13554.050000, 0
13:00:45, 12/24/2007, 13554.370000, 13554.370000, 13554.370000, 
13554.370000, 0
13:00:47, 12/24/2007, 13554.210000, 13554.210000, 13554.210000, 
13554.210000, 0
13:00:51, 12/24/2007, 13552.910000, 13552.910000, 13552.910000, 
13552.910000, 0
13:00:55, 12/24/2007, 13553.560000, 13553.560000, 13553.560000, 
13553.560000, 0
13:00:57, 12/24/2007, 13553.320000, 13553.320000, 13553.320000, 
13553.320000, 0
13:00:59, 12/24/2007, 13552.590000, 13552.590000, 13552.590000, 
13552.590000, 0
13:01:09, 12/24/2007, 13551.450000, 13551.450000, 13551.450000, 
13551.450000, 0
13:01:13, 12/24/2007, 13550.550000, 13550.550000, 13550.550000, 
13550.550000, 0
13:01:33, 12/24/2007, 13550.310000, 13550.310000, 13550.310000, 
13550.310000, 0
13:01:37, 12/24/2007, 13549.820000, 13549.820000, 13549.820000, 
13549.820000, 0
13:01:57, 12/24/2007, 13549.660000, 13549.660000, 13549.660000, 
13549.660000, 0
13:02:19, 12/24/2007, 13549.090000, 13549.090000, 13549.090000, 
13549.090000, 0
13:02:54, 12/24/2007, 13549.330000, 13549.330000, 13549.330000, 
13549.330000, 0

   --- In amibroker@xxxxxxxxxxxxxxx, "dbw451" <dbw451@xxx> wrote:
>
> My AB tick charts always seem to be different than charts created 
by other
> traders.  I have always attributed this to my real-time quote 
source being
> Interactive Brokers.  I know IB sends out quote data as time based 
snapshots
> rather than every tick.  However recently I've determined that my 
AB tick
> charts are different than other charting software charts also based 
on IB
> data.  Since today was a short and slow pre-holiday trading day, I 
decided
> to use the time to compare an AB tick chart with a MarketDelta (i.e.
> Investor/RT) tick chart.  I ran both charting packages using the 
same IB
> TWS.  AB was setup with a single 10t candle chart of the Mar 08 YM 
futures
> contract.  The chart also has a 10 period SMA and a colored volume
> indicator.  The chart was intentionally kept simple to minimize 
AB's CPU
> usage.  By monitoring AB's CPU usage, I could see that it would 
fluctuate
> between 1% and 5%.  So in other words, CPU usage should not be an 
issue in
> AB's charting since it's no way near 50% (i.e. my real-time chart 
refresh
> interval is set to 0).
> 
>  
> 
> I do not know Investor/RT very well, so I use the default 
settings.  The
> Investor/RT CPU usage vacillates between 0% and 1%.  The 10t chart 
is the
> same: Mar 08 YM 10t candle chart, 10 SMA, and colored volume.
> 
>  
> 
> I let both programs run through the trading day to collect data 
from the
> same IB TWS.  Next I decided on a small time slice from 11:00am EST 
to
> 11:10am EST to evaluate the differences between the charts.  The 
first thing
> I could easily notice is that Investor/RT has more bars than AB.  
AB created
> 14 10t bars and Investor/RT created 22 10t bars between 11:00am and 
11:10am.
> Next I noted the timestamp, OHLC and volume of each tick bar for 
both charts
> in a spreadsheet.  The total volume between the two charts was 
pretty much
> equivalent (it's difficult to align the two charts exactly).
> 
>  
> 
> The thing I find suspect is AB's timestamps.  All my AB timestamps 
are a
> multiple of 5 seconds where Investor/RT's timestamps look random.  
I know
> that if AB's CPU usage is high it will throttle down chart refresh
> intervals, but that should not be the case here with such low CPU
> utilization.
> 
>  
> 
> This leads to my questions:
> 
>  
> 
> 1.	Does anyone know why AB would produce less tick bars than
> Investor/RT using the same data feed?  
> 2.	Does anyone know why AB would be aggregating ticks to a time 
slice
> that is a multiple of five?  Are there settings to control this?
> 3.	Are AB tick charts and tick data collection dependant on the 
chart
> refresh interval?  In other words would a 10t chart with a chart 
refresh
> interval of 0 be different than a 10t chart with a refresh interval 
of 3
> seconds?
> 
>  
> 
> For reference, below are snapshots of the 10t charts, the 
spreadsheet I
> created, and my AB settings.
> 
>  
> 
> Thanks,
> 
>  
> 
> David
> 
>  
> 
> A snapshot of each chart is below:
> 
>  
> 
> 
> 
>  
> 
>  
> 
> 
> 
>  
> 
>  
> 
>  
> 
> Tick bar data:
> 
>  
> 
> 
> AmiBroker - Mar 08 YM - 12/24/2007 10t
> 
>  
> 
>  
> 
> 
> Time
> 
> Open
> 
> High
> 
> Low
> 
> Close
> 
> Volume
> 
> 
> 11:00:35
> 
> 13619
> 
> 13620
> 
> 13619
> 
> 13620
> 
> 25
> 
> 
> 11:00:55
> 
> 13619
> 
> 13619
> 
> 13616
> 
> 13618
> 
> 32
> 
> 
> 11:02:00
> 
> 13618
> 
> 13620
> 
> 13617
> 
> 13260
> 
> 42
> 
> 
> 11:02:55
> 
> 13619
> 
> 13620
> 
> 13619
> 
> 13619
> 
> 15
> 
> 
> 11:03:35
> 
> 13619
> 
> 13619
> 
> 13617
> 
> 13618
> 
> 21
> 
> 
> 11:04:20
> 
> 13617
> 
> 13620
> 
> 13617
> 
> 13618
> 
> 29
> 
> 
> 11:06:00
> 
> 13617
> 
> 13619
> 
> 13617
> 
> 13618
> 
> 14
> 
> 
> 11:06:40
> 
> 13618
> 
> 13621
> 
> 13618
> 
> 13620
> 
> 48
> 
> 
> 11:07:35
> 
> 13621
> 
> 13622
> 
> 13620
> 
> 13622
> 
> 67
> 
> 
> 11:08:05
> 
> 13621
> 
> 13624
> 
> 13621
> 
> 13624
> 
> 25
> 
> 
> 11:08:50
> 
> 13622
> 
> 13624
> 
> 13621
> 
> 13622
> 
> 46
> 
> 
> 11:09:25
> 
> 13622
> 
> 13626
> 
> 13622
> 
> 13625
> 
> 41
> 
> 
> 11:09:50
> 
> 13624
> 
> 13626
> 
> 13623
> 
> 13624
> 
> 45
> 
> 
> 11:10:35
> 
> 13622
> 
> 13625
> 
> 13622
> 
> 13624
> 
> 54
> 
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
> 
> Investor/RT - Mar 08 YM - 12/24/2007 10t
> 
>  
> 
>  
> 
> 
> 11:00:02
> 
> 13618
> 
> 13620
> 
> 13618
> 
> 13620
> 
> 13
> 
> 
> 11:00:42
> 
> 13620
> 
> 13620
> 
> 13617
> 
> 13617
> 
> 24
> 
> 
> 11:00:49
> 
> 13617
> 
> 13618
> 
> 13616
> 
> 13617
> 
> 14
> 
> 
> 11:01:20
> 
> 13617
> 
> 13617
> 
> 13617
> 
> 13617
> 
> 29
> 
> 
> 11:02:02
> 
> 13618
> 
> 13620
> 
> 13618
> 
> 13619
> 
> 24
> 
> 
> 11:02:57
> 
> 13619
> 
> 13620
> 
> 13619
> 
> 13619
> 
> 12
> 
> 
> 11:03:26
> 
> 13619
> 
> 13619
> 
> 13618
> 
> 13618
> 
> 15
> 
> 
> 11:03:55
> 
> 13617
> 
> 13618
> 
> 13617
> 
> 13618
> 
> 23
> 
> 
> 11:04:30
> 
> 13619
> 
> 13620
> 
> 13617
> 
> 13619
> 
> 18
> 
> 
> 11:06:23
> 
> 13619
> 
> 13621
> 
> 13619
> 
> 13620
> 
> 12
> 
> 
> 11:06:33
> 
> 13619
> 
> 13621
> 
> 13620
> 
> 13621
> 
> 30
> 
> 
> 11:06:59
> 
> 13620
> 
> 13621
> 
> 13620
> 
> 13621
> 
> 51
> 
> 
> 11:07:33
> 
> 13620
> 
> 13622
> 
> 13620
> 
> 13622
> 
> 30
> 
> 
> 11:07:56
> 
> 13622
> 
> 13623
> 
> 13621
> 
> 13622
> 
> 20
> 
> 
> 11:08:12
> 
> 13623
> 
> 13624
> 
> 13623
> 
> 13623
> 
> 19
> 
> 
> 11:08:50
> 
> 13624
> 
> 13624
> 
> 13621
> 
> 13622
> 
> 27
> 
> 
> 11:09:19
> 
> 13622
> 
> 13626
> 
> 13622
> 
> 13626
> 
> 19
> 
> 
> 11:09:32
> 
> 13626
> 
> 13626
> 
> 13624
> 
> 13625
> 
> 28
> 
> 
> 11:09:51
> 
> 13625
> 
> 13625
> 
> 13623
> 
> 13623
> 
> 16
> 
> 
> 11:10:20
> 
> 13623
> 
> 13625
> 
> 13622
> 
> 13625
> 
> 42
> 
> 
> 11:10:33
> 
> 13623
> 
> 13625
> 
> 13623
> 
> 13625
> 
> 22
> 
> 
> 11:10:50
> 
> 13625
> 
> 13625
> 
> 13624
> 
> 13626
> 
> 23
> 
>  
> 
>  
> 
>  
> 
> Here are my AB settings for the test:
>




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/