Is it Normal behavior for Tick Charts to have more Ticks than its meant too?
Is it Normal behavior for Tick Charts to have more Ticks than its meant too?
23 Nov 2018, 19:10
Hi when i run the below simple code with a T10 chart (or any other size) i always randomly get more ticks per bar than the 10 Ticks its meant to be???
I'm i missing something and this is normal behavior or is this a bug?
Platform - cTrader 3.3 Public Beta
Regards
private int _tickCount = 0; protected override void OnStart() { // Put your initialization logic here } protected override void OnBar() { _tickCount = 0; Print(Server.Time + " | Bar"); } protected override void OnTick() { _tickCount++; Print(Server.Time + " | Tick | TickCount = " + _tickCount); } protected override void OnStop() { // Put your deinitialization logic here }
Output from code:
23/11/2018 17:03:29.955 | cBot "New cBot (3)" was started successfully for EURUSD, t10.
23/11/2018 17:03:30.627 | 23/11/2018 17:03:30 | Tick | TickCount = 1
23/11/2018 17:03:30.705 | 23/11/2018 17:03:30 | Tick | TickCount = 2
23/11/2018 17:03:31.392 | 23/11/2018 17:03:31 | Tick | TickCount = 3
23/11/2018 17:03:31.752 | 23/11/2018 17:03:31 | Tick | TickCount = 4
23/11/2018 17:03:33.048 | 23/11/2018 17:03:33 | Tick | TickCount = 5
23/11/2018 17:03:33.048 | 23/11/2018 17:03:33 | Bar
23/11/2018 17:03:33.798 | 23/11/2018 17:03:33 | Tick | TickCount = 1
23/11/2018 17:03:33.986 | 23/11/2018 17:03:33 | Tick | TickCount = 2
23/11/2018 17:03:34.361 | 23/11/2018 17:03:34 | Tick | TickCount = 3
23/11/2018 17:03:35.595 | 23/11/2018 17:03:35 | Tick | TickCount = 4
23/11/2018 17:03:36.298 | 23/11/2018 17:03:36 | Tick | TickCount = 5
23/11/2018 17:03:36.642 | 23/11/2018 17:03:36 | Tick | TickCount = 6
23/11/2018 17:03:37.127 | 23/11/2018 17:03:37 | Tick | TickCount = 7
23/11/2018 17:03:37.455 | 23/11/2018 17:03:37 | Tick | TickCount = 8
23/11/2018 17:03:41.220 | 23/11/2018 17:03:41 | Tick | TickCount = 9
23/11/2018 17:03:41.580 | 23/11/2018 17:03:41 | Tick | TickCount = 10
23/11/2018 17:03:41.923 | 23/11/2018 17:03:41 | Tick | TickCount = 11
23/11/2018 17:03:44.611 | 23/11/2018 17:03:44 | Tick | TickCount = 12
23/11/2018 17:03:44.861 | 23/11/2018 17:03:44 | Tick | TickCount = 13
23/11/2018 17:03:46.798 | 23/11/2018 17:03:46 | Tick | TickCount = 14
23/11/2018 17:03:47.627 | 23/11/2018 17:03:47 | Tick | TickCount = 15
23/11/2018 17:03:48.642 | 23/11/2018 17:03:48 | Tick | TickCount = 16
23/11/2018 17:03:48.970 | 23/11/2018 17:03:48 | Tick | TickCount = 17
23/11/2018 17:03:48.970 | 23/11/2018 17:03:48 | Bar
23/11/2018 17:03:50.908 | 23/11/2018 17:03:50 | Tick | TickCount = 1
23/11/2018 17:03:51.767 | 23/11/2018 17:03:51 | Tick | TickCount = 2
23/11/2018 17:03:56.220 | 23/11/2018 17:03:56 | Tick | TickCount = 3
23/11/2018 17:03:59.798 | 23/11/2018 17:03:59 | Tick | TickCount = 4
23/11/2018 17:04:00.377 | 23/11/2018 17:04:00 | Tick | TickCount = 5
23/11/2018 17:04:03.220 | 23/11/2018 17:04:03 | Tick | TickCount = 6
23/11/2018 17:04:09.303 | 23/11/2018 17:04:09 | Tick | TickCount = 7
23/11/2018 17:04:09.896 | 23/11/2018 17:04:09 | Tick | TickCount = 8
23/11/2018 17:04:10.099 | 23/11/2018 17:04:10 | Tick | TickCount = 9
23/11/2018 17:04:10.521 | 23/11/2018 17:04:10 | Tick | TickCount = 10
23/11/2018 17:04:10.865 | 23/11/2018 17:04:10 | Tick | TickCount = 11
23/11/2018 17:04:11.974 | 23/11/2018 17:04:11 | Tick | TickCount = 12
23/11/2018 17:04:18.756 | 23/11/2018 17:04:18 | Tick | TickCount = 13
23/11/2018 17:04:19.787 | 23/11/2018 17:04:19 | Tick | TickCount = 14
23/11/2018 17:04:19.943 | 23/11/2018 17:04:19 | Tick | TickCount = 15
23/11/2018 17:04:19.959 | 23/11/2018 17:04:19 | Bar
23/11/2018 17:04:20.662 | 23/11/2018 17:04:20 | Tick | TickCount = 1
23/11/2018 17:04:22.865 | 23/11/2018 17:04:22 | Tick | TickCount = 2
23/11/2018 17:04:23.021 | 23/11/2018 17:04:23 | Tick | TickCount = 3
23/11/2018 17:04:24.381 | 23/11/2018 17:04:24 | Tick | TickCount = 4
23/11/2018 17:04:24.599 | 23/11/2018 17:04:24 | Tick | TickCount = 5
23/11/2018 17:04:24.787 | 23/11/2018 17:04:24 | Tick | TickCount = 6
23/11/2018 17:04:25.256 | 23/11/2018 17:04:25 | Tick | TickCount = 7
23/11/2018 17:04:27.162 | 23/11/2018 17:04:27 | Tick | TickCount = 8
23/11/2018 17:04:28.381 | 23/11/2018 17:04:28 | Tick | TickCount = 9
23/11/2018 17:04:28.724 | 23/11/2018 17:04:28 | Tick | TickCount = 10
23/11/2018 17:04:30.568 | 23/11/2018 17:04:30 | Tick | TickCount = 11
23/11/2018 17:04:40.896 | 23/11/2018 17:04:40 | Tick | TickCount = 12
23/11/2018 17:04:41.021 | 23/11/2018 17:04:41 | Tick | TickCount = 13
23/11/2018 17:04:41.193 | 23/11/2018 17:04:41 | Tick | TickCount = 14
23/11/2018 17:04:41.193 | 23/11/2018 17:04:41 | Bar
23/11/2018 17:04:41.412 | 23/11/2018 17:04:41 | Tick | TickCount = 1
23/11/2018 17:04:43.209 | 23/11/2018 17:04:43 | Tick | TickCount = 2
23/11/2018 17:04:43.584 | 23/11/2018 17:04:43 | Tick | TickCount = 3
23/11/2018 17:04:43.896 | 23/11/2018 17:04:43 | Tick | TickCount = 4
23/11/2018 17:04:49.349 | 23/11/2018 17:04:49 | Tick | TickCount = 5
23/11/2018 17:04:51.881 | 23/11/2018 17:04:51 | Tick | TickCount = 6
23/11/2018 17:04:52.021 | 23/11/2018 17:04:52 | Tick | TickCount = 7
23/11/2018 17:04:54.303 | 23/11/2018 17:04:54 | Tick | TickCount = 8
23/11/2018 17:04:54.474 | 23/11/2018 17:04:54 | Tick | TickCount = 9
23/11/2018 17:04:56.334 | 23/11/2018 17:04:56 | Tick | TickCount = 10
23/11/2018 17:04:56.709 | 23/11/2018 17:04:56 | Tick | TickCount = 11
23/11/2018 17:04:57.756 | 23/11/2018 17:04:57 | Tick | TickCount = 12
23/11/2018 17:04:59.881 | 23/11/2018 17:04:59 | Tick | TickCount = 13
23/11/2018 17:05:02.271 | 23/11/2018 17:05:02 | Tick | TickCount = 14
23/11/2018 17:05:02.631 | 23/11/2018 17:05:02 | Tick | TickCount = 15
23/11/2018 17:05:02.631 | 23/11/2018 17:05:02 | Bar
23/11/2018 17:05:07.271 | 23/11/2018 17:05:07 | Tick | TickCount = 1
23/11/2018 17:05:07.412 | 23/11/2018 17:05:07 | Tick | TickCount = 2
23/11/2018 17:05:09.974 | 23/11/2018 17:05:09 | Tick | TickCount = 3
23/11/2018 17:05:13.303 | 23/11/2018 17:05:13 | Tick | TickCount = 4
23/11/2018 17:05:13.959 | 23/11/2018 17:05:13 | Tick | TickCount = 5
23/11/2018 17:05:20.506 | 23/11/2018 17:05:20 | Tick | TickCount = 6
23/11/2018 17:05:20.849 | 23/11/2018 17:05:20 | Tick | TickCount = 7
23/11/2018 17:05:21.115 | 23/11/2018 17:05:21 | Tick | TickCount = 8
23/11/2018 17:05:21.334 | 23/11/2018 17:05:21 | Tick | TickCount = 9
23/11/2018 17:05:21.693 | 23/11/2018 17:05:21 | Tick | TickCount = 10
23/11/2018 17:05:31.709 | 23/11/2018 17:05:31 | Tick | TickCount = 11
23/11/2018 17:05:34.334 | 23/11/2018 17:05:34 | Tick | TickCount = 12
23/11/2018 17:05:34.349 | 23/11/2018 17:05:34 | Bar
23/11/2018 17:05:38.412 | 23/11/2018 17:05:38 | Tick | TickCount = 1
23/11/2018 17:05:38.615 | 23/11/2018 17:05:38 | Tick | TickCount = 2
23/11/2018 17:05:38.974 | 23/11/2018 17:05:38 | Tick | TickCount = 3
23/11/2018 17:05:39.740 | 23/11/2018 17:05:39 | Tick | TickCount = 4
23/11/2018 17:05:41.740 | 23/11/2018 17:05:41 | Tick | TickCount = 5
23/11/2018 17:05:44.209 | 23/11/2018 17:05:44 | Tick | TickCount = 6
23/11/2018 17:05:44.428 | 23/11/2018 17:05:44 | Tick | TickCount = 7
23/11/2018 17:05:45.740 | 23/11/2018 17:05:45 | Tick | TickCount = 8
23/11/2018 17:05:47.474 | 23/11/2018 17:05:47 | Tick | TickCount = 9
23/11/2018 17:05:47.849 | 23/11/2018 17:05:47 | Tick | TickCount = 10
23/11/2018 17:05:49.146 | 23/11/2018 17:05:49 | Tick | TickCount = 11
23/11/2018 17:05:49.349 | 23/11/2018 17:05:49 | Tick | TickCount = 12
23/11/2018 17:05:51.521 | 23/11/2018 17:05:51 | Tick | TickCount = 13
23/11/2018 17:05:51.521 | 23/11/2018 17:05:51 | Bar
23/11/2018 17:05:52.428 | 23/11/2018 17:05:52 | Tick | TickCount = 1
23/11/2018 17:05:55.459 | 23/11/2018 17:05:55 | Tick | TickCount = 2
23/11/2018 17:05:55.709 | 23/11/2018 17:05:55 | Tick | TickCount = 3
23/11/2018 17:05:56.709 | 23/11/2018 17:05:56 | Tick | TickCount = 4
23/11/2018 17:05:58.881 | 23/11/2018 17:05:58 | Tick | TickCount = 5
23/11/2018 17:05:59.240 | 23/11/2018 17:05:59 | Tick | TickCount = 6
23/11/2018 17:06:00.053 | 23/11/2018 17:06:00 | Tick | TickCount = 7
23/11/2018 17:06:02.834 | 23/11/2018 17:06:02 | Tick | TickCount = 8
23/11/2018 17:06:04.084 | 23/11/2018 17:06:04 | Tick | TickCount = 9
23/11/2018 17:06:04.303 | 23/11/2018 17:06:04 | Tick | TickCount = 10
23/11/2018 17:06:06.240 | 23/11/2018 17:06:06 | Tick | TickCount = 11
23/11/2018 17:06:06.490 | 23/11/2018 17:06:06 | Tick | TickCount = 12
23/11/2018 17:06:06.490 | 23/11/2018 17:06:06 | Bar
23/11/2018 17:06:10.303 | 23/11/2018 17:06:10 | Tick | TickCount = 1
23/11/2018 17:06:10.584 | 23/11/2018 17:06:10 | Tick | TickCount = 2
23/11/2018 17:06:11.053 | 23/11/2018 17:06:11 | Tick | TickCount = 3
23/11/2018 17:06:13.599 | 23/11/2018 17:06:13 | Tick | TickCount = 4
23/11/2018 17:06:13.865 | 23/11/2018 17:06:13 | Tick | TickCount = 5
23/11/2018 17:06:14.474 | 23/11/2018 17:06:14 | Tick | TickCount = 6
23/11/2018 17:06:17.474 | 23/11/2018 17:06:17 | Tick | TickCount = 7
23/11/2018 17:06:18.037 | 23/11/2018 17:06:18 | Tick | TickCount = 8
23/11/2018 17:06:22.865 | 23/11/2018 17:06:22 | Tick | TickCount = 9
23/11/2018 17:06:23.021 | 23/11/2018 17:06:23 | Tick | TickCount = 10
23/11/2018 17:06:26.021 | 23/11/2018 17:06:26 | Tick | TickCount = 11
23/11/2018 17:06:26.771 | 23/11/2018 17:06:26 | Tick | TickCount = 12
23/11/2018 17:06:27.162 | 23/11/2018 17:06:27 | Tick | TickCount = 13
23/11/2018 17:06:30.068 | 23/11/2018 17:06:30 | Tick | TickCount = 14
23/11/2018 17:06:30.068 | 23/11/2018 17:06:30 | Bar
23/11/2018 17:06:30.193 | 23/11/2018 17:06:30 | Tick | TickCount = 1
23/11/2018 17:06:31.318 | 23/11/2018 17:06:31 | Tick | TickCount = 2
23/11/2018 17:06:31.506 | 23/11/2018 17:06:31 | Tick | TickCount = 3
23/11/2018 17:06:34.787 | 23/11/2018 17:06:34 | Tick | TickCount = 4
23/11/2018 17:06:36.521 | 23/11/2018 17:06:36 | Tick | TickCount = 5
23/11/2018 17:06:36.865 | 23/11/2018 17:06:36 | Tick | TickCount = 6
23/11/2018 17:06:38.818 | cBot "New cBot (3)" was stopped for EURUSD, t10.
PanagiotisCharalampous
26 Nov 2018, 11:21
Hi GammaQuant,
This is normal. OnTick() is triggered on each incoming tick, Bid and Ask. Bars take into consideration only Bid prices.
Best Regards,
Panagiotis
@PanagiotisCharalampous