Gamestudio Links
Zorro Links
Newest Posts
What are you working on?
by rayp. 01/22/22 00:55
Lapsa's very own thread
by Lapsa. 01/21/22 08:23
Generic, dynamically growing array
by 3run. 01/18/22 15:37
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 01/18/22 15:00
Bug in NumUp/Dn
by jcl. 01/17/22 12:23
Help with plotting Lookback in Trade Mode
by degenerate_762. 01/15/22 23:43
AUM Magazine
Latest Screens
Tactics of World War I
Hecknex World
Scheherazade's Journey
Paradox Vector
Who's Online Now
4 registered members (Zheka, ozgur, AndrewAMD, gamers), 165 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
kawjansen, Alex2052, AndreasTrader, spacenomad, coinpump
18731 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
missing tick() in the current incomplete bar #485068
01/14/22 08:51
01/14/22 08:51
Joined: Dec 2019
Posts: 36
ozgur Online OP
Newbie
ozgur  Online OP
Newbie

Joined: Dec 2019
Posts: 36
Script is below. It just prints time of tick() or run().
I used the latest beta version [2.45.7].

Code
void recentDataPrint(int type, int duration)
{
	int timestampNow = utm(wdate(NOW));
	
	var dateData = wdate(0);
	int timestampData = utm(dateData);
	
	if ((timestampNow - timestampData) < (duration * 60 * 60)) { // show up to x hour to prevent spamming message window
		printf("%s timestamp: %s \n", ifelse(type, "Bar", "Tick"), strdate("%d %b %y %H:%M:%S", dateData));
	}
}

void tick()
{
	recentDataPrint(0, 1);
}

void main()
{
	// History = "History\\Dukascopy\\*.t6";
	History = "History\\DukascopyT1\\*.t1";
	
	BarPeriod = 60;
	
	set(LOGFILE, TICKS);
	Verbose = 3;
	
	LookBack = 20;
}

void run()
{
	recentDataPrint(1, 2);
}


Log:

In summary, the script was run at 8:30 am.
run() is working as expected, waiting until 9:00 am.
tick() at the other hand were not run between 8:00 am and 8:30 am.

Code

_New 
Login 0 Oanda V20..
!account 101-004-9964544-001
!id segment 0 at UTC 01-14 08:30Bar timestamp: 14 Jan 22 08:30:17 

V 2.457 on Fri 22-01-14 11:30:16 (Zorro S Subscription)
Load AssetsFix
Warning 054: EUR/USD LotAmount 1000 -> 1.0
Warning 054: EUR/USD PIPCost 0.1000 -> 0.00007284!
!EUR/USD 01-05 12:30:18 to 01-14 08:30:18
!=> 01-14 08:00:55 to 01-14 08:29:20, 300 ticks
Load EUR/USD prices..
!EUR/USD 01-05 12:30:18 to 01-14 08:00:55
!=> 01-14 07:32:05 to 01-14 08:00:55, 300 ticks 129936 ticks
EUR/USD 64748 ticks read
161(73514) bars 2022-01-05..2022-01-14 generated
EUR/USD: 0..73513

Trade: _New EUR/USD 2022-01-14
Loading Data\_New_d.trd (V2.457)
Lookback 20 bars, 2022-01-13..2022-01-14

[141: Thu 22-01-13 14:00:00] 1.14599/1.14727\1.14587/1.14727 -0.00010.
[142: Thu 22-01-13 15:00:00] 1.14721/1.14822\1.14693/1.14745 -0.00010
[143: Thu 22-01-13 16:00:00c] 1.14743/1.14782\1.14480/1.14605 -0.00010
[144: Thu 22-01-13 17:00:00c] 1.14613/1.14724\1.14580/1.14661 -0.00010
[145: Thu 22-01-13 18:00:00c] 1.14654/1.14678\1.14558/1.14620 -0.00010
[146: Thu 22-01-13 19:00:00c] 1.14614/1.14670\1.14584/1.14595 -0.00010
[147: Thu 22-01-13 20:00:00c] 1.14594/1.14658\1.14585/1.14624 -0.00010
[148: Thu 22-01-13 21:00:00c] 1.14615/1.14630\1.14517/1.14530 -0.00010
[149: Thu 22-01-13 22:00:00c] 1.14534/1.14565\1.14519/1.14550 -0.00010
[150: Thu 22-01-13 23:00:00c] 1.14598/1.14610\1.14575/1.14600 -0.00010
[151: Fri 22-01-14 00:00:00c] 1.14586/1.14603\1.14561/1.14575 -0.00010
[152: Fri 22-01-14 01:00:00c] 1.14566/1.14594\1.14522/1.14574 -0.00010
[153: Fri 22-01-14 02:00:00c] 1.14572/1.14688\1.14571/1.14669 -0.00010
[154: Fri 22-01-14 03:00:00c] 1.14665/1.14720\1.14633/1.14720 -0.00010
[155: Fri 22-01-14 04:00:00c] 1.14717/1.14763\1.14697/1.14745 -0.00010
[156: Fri 22-01-14 05:00:00c] 1.14744/1.14773\1.14718/1.14742 -0.00010
[157: Fri 22-01-14 06:00:00c] 1.14744/1.14834\1.14744/1.14796 -0.00010
[158: Fri 22-01-14 07:00:00c] 1.14800/1.14814\1.14702/1.14706 -0.00010
Bar timestamp: 14 Jan 22 07:00:00 
Tick timestamp: 14 Jan 22 07:31:25 
Tick timestamp: 14 Jan 22 07:31:35 
Tick timestamp: 14 Jan 22 07:31:45 
Tick timestamp: 14 Jan 22 07:31:50 
Tick timestamp: 14 Jan 22 07:31:55 
Tick timestamp: 14 Jan 22 07:32:00 
Tick timestamp: 14 Jan 22 07:32:05 
Tick timestamp: 14 Jan 22 07:32:10 
Tick timestamp: 14 Jan 22 07:32:15 
Tick timestamp: 14 Jan 22 07:32:25 
Tick timestamp: 14 Jan 22 07:32:30 
Tick timestamp: 14 Jan 22 07:32:35 
Tick timestamp: 14 Jan 22 07:32:40 
Tick timestamp: 14 Jan 22 07:33:00 
Tick timestamp: 14 Jan 22 07:33:05 
Tick timestamp: 14 Jan 22 07:33:15 
Tick timestamp: 14 Jan 22 07:33:25 
Tick timestamp: 14 Jan 22 07:33:30 
Tick timestamp: 14 Jan 22 07:33:35 
Tick timestamp: 14 Jan 22 07:33:40 
Tick timestamp: 14 Jan 22 07:33:45 
Tick timestamp: 14 Jan 22 07:33:50 
Tick timestamp: 14 Jan 22 07:33:55 
Tick timestamp: 14 Jan 22 07:34:05 
Tick timestamp: 14 Jan 22 07:34:10 
Tick timestamp: 14 Jan 22 07:34:25 
Tick timestamp: 14 Jan 22 07:34:30 
Tick timestamp: 14 Jan 22 07:34:40 
Tick timestamp: 14 Jan 22 07:34:45 
Tick timestamp: 14 Jan 22 07:34:50 
Tick timestamp: 14 Jan 22 07:34:55 
Tick timestamp: 14 Jan 22 07:35:15 
Tick timestamp: 14 Jan 22 07:35:25 
Tick timestamp: 14 Jan 22 07:35:30 
Tick timestamp: 14 Jan 22 07:35:35 
Tick timestamp: 14 Jan 22 07:35:40 
Tick timestamp: 14 Jan 22 07:35:45 
Tick timestamp: 14 Jan 22 07:35:50 
Tick timestamp: 14 Jan 22 07:35:55 
Tick timestamp: 14 Jan 22 07:36:00 
Tick timestamp: 14 Jan 22 07:36:05 
Tick timestamp: 14 Jan 22 07:36:10 
Tick timestamp: 14 Jan 22 07:36:15 
Tick timestamp: 14 Jan 22 07:36:25 
Tick timestamp: 14 Jan 22 07:36:30 
Tick timestamp: 14 Jan 22 07:36:35 
Tick timestamp: 14 Jan 22 07:36:40 
Tick timestamp: 14 Jan 22 07:36:45 
Tick timestamp: 14 Jan 22 07:36:50 
Tick timestamp: 14 Jan 22 07:36:55 
Tick timestamp: 14 Jan 22 07:37:00 
Tick timestamp: 14 Jan 22 07:37:05 
Tick timestamp: 14 Jan 22 07:37:10 
Tick timestamp: 14 Jan 22 07:37:15 
Tick timestamp: 14 Jan 22 07:37:20 
Tick timestamp: 14 Jan 22 07:37:25 
Tick timestamp: 14 Jan 22 07:37:30 
Tick timestamp: 14 Jan 22 07:37:40 
Tick timestamp: 14 Jan 22 07:37:45 
Tick timestamp: 14 Jan 22 07:37:50 
Tick timestamp: 14 Jan 22 07:37:55 
Tick timestamp: 14 Jan 22 07:38:10 
Tick timestamp: 14 Jan 22 07:38:15 
Tick timestamp: 14 Jan 22 07:38:20 
Tick timestamp: 14 Jan 22 07:38:25 
Tick timestamp: 14 Jan 22 07:38:30 
Tick timestamp: 14 Jan 22 07:38:40 
Tick timestamp: 14 Jan 22 07:38:45 
Tick timestamp: 14 Jan 22 07:38:55 
Tick timestamp: 14 Jan 22 07:39:00 
Tick timestamp: 14 Jan 22 07:39:15 
Tick timestamp: 14 Jan 22 07:39:25 
Tick timestamp: 14 Jan 22 07:39:30 
Tick timestamp: 14 Jan 22 07:39:35 
Tick timestamp: 14 Jan 22 07:39:55 
Tick timestamp: 14 Jan 22 07:40:00 
Tick timestamp: 14 Jan 22 07:40:05 
Tick timestamp: 14 Jan 22 07:40:10 
Tick timestamp: 14 Jan 22 07:40:15 
Tick timestamp: 14 Jan 22 07:40:20 
Tick timestamp: 14 Jan 22 07:40:25 
Tick timestamp: 14 Jan 22 07:40:35 
Tick timestamp: 14 Jan 22 07:40:40 
Tick timestamp: 14 Jan 22 07:40:45 
Tick timestamp: 14 Jan 22 07:40:50 
Tick timestamp: 14 Jan 22 07:41:00 
Tick timestamp: 14 Jan 22 07:41:10 
Tick timestamp: 14 Jan 22 07:41:15 
Tick timestamp: 14 Jan 22 07:41:20 
Tick timestamp: 14 Jan 22 07:41:25 
Tick timestamp: 14 Jan 22 07:41:35 
Tick timestamp: 14 Jan 22 07:41:40 
Tick timestamp: 14 Jan 22 07:41:45 
Tick timestamp: 14 Jan 22 07:41:50 
Tick timestamp: 14 Jan 22 07:41:55 
Tick timestamp: 14 Jan 22 07:42:00 
Tick timestamp: 14 Jan 22 07:42:05 
Tick timestamp: 14 Jan 22 07:42:15 
Tick timestamp: 14 Jan 22 07:42:45 
Tick timestamp: 14 Jan 22 07:42:50 
Tick timestamp: 14 Jan 22 07:43:00 
Tick timestamp: 14 Jan 22 07:43:05 
Tick timestamp: 14 Jan 22 07:43:20 
Tick timestamp: 14 Jan 22 07:43:25 
Tick timestamp: 14 Jan 22 07:43:30 
Tick timestamp: 14 Jan 22 07:43:35 
Tick timestamp: 14 Jan 22 07:43:40 
Tick timestamp: 14 Jan 22 07:43:50 
Tick timestamp: 14 Jan 22 07:43:55 
Tick timestamp: 14 Jan 22 07:44:00 
Tick timestamp: 14 Jan 22 07:44:05 
Tick timestamp: 14 Jan 22 07:44:10 
Tick timestamp: 14 Jan 22 07:44:15 
Tick timestamp: 14 Jan 22 07:44:20 
Tick timestamp: 14 Jan 22 07:44:25 
Tick timestamp: 14 Jan 22 07:44:30 
Tick timestamp: 14 Jan 22 07:44:35 
Tick timestamp: 14 Jan 22 07:45:00 
Tick timestamp: 14 Jan 22 07:45:10 
Tick timestamp: 14 Jan 22 07:45:15 
Tick timestamp: 14 Jan 22 07:45:25 
Tick timestamp: 14 Jan 22 07:45:30 
Tick timestamp: 14 Jan 22 07:45:35 
Tick timestamp: 14 Jan 22 07:45:40 
Tick timestamp: 14 Jan 22 07:45:50 
Tick timestamp: 14 Jan 22 07:45:55 
Tick timestamp: 14 Jan 22 07:46:05 
Tick timestamp: 14 Jan 22 07:46:10 
Tick timestamp: 14 Jan 22 07:46:20 
Tick timestamp: 14 Jan 22 07:46:25 
Tick timestamp: 14 Jan 22 07:46:50 
Tick timestamp: 14 Jan 22 07:46:55 
Tick timestamp: 14 Jan 22 07:47:00 
Tick timestamp: 14 Jan 22 07:47:10 
Tick timestamp: 14 Jan 22 07:47:20 
Tick timestamp: 14 Jan 22 07:47:25 
Tick timestamp: 14 Jan 22 07:47:30 
Tick timestamp: 14 Jan 22 07:47:35 
Tick timestamp: 14 Jan 22 07:47:45 
Tick timestamp: 14 Jan 22 07:47:50 
Tick timestamp: 14 Jan 22 07:47:55 
Tick timestamp: 14 Jan 22 07:48:00 
Tick timestamp: 14 Jan 22 07:48:05 
Tick timestamp: 14 Jan 22 07:48:15 
Tick timestamp: 14 Jan 22 07:48:20 
Tick timestamp: 14 Jan 22 07:48:35 
Tick timestamp: 14 Jan 22 07:48:45 
Tick timestamp: 14 Jan 22 07:48:50 
Tick timestamp: 14 Jan 22 07:48:55 
Tick timestamp: 14 Jan 22 07:49:00 
Tick timestamp: 14 Jan 22 07:49:05 
Tick timestamp: 14 Jan 22 07:49:10 
Tick timestamp: 14 Jan 22 07:49:15 
Tick timestamp: 14 Jan 22 07:49:20 
Tick timestamp: 14 Jan 22 07:49:30 
Tick timestamp: 14 Jan 22 07:49:35 
Tick timestamp: 14 Jan 22 07:49:40 
Tick timestamp: 14 Jan 22 07:49:50 
Tick timestamp: 14 Jan 22 07:49:55 
Tick timestamp: 14 Jan 22 07:50:00 
Tick timestamp: 14 Jan 22 07:50:05 
Tick timestamp: 14 Jan 22 07:50:10 
Tick timestamp: 14 Jan 22 07:50:15 
Tick timestamp: 14 Jan 22 07:50:20 
Tick timestamp: 14 Jan 22 07:50:25 
Tick timestamp: 14 Jan 22 07:50:30 
Tick timestamp: 14 Jan 22 07:50:40 
Tick timestamp: 14 Jan 22 07:50:45 
Tick timestamp: 14 Jan 22 07:50:50 
Tick timestamp: 14 Jan 22 07:50:55 
Tick timestamp: 14 Jan 22 07:51:00 
Tick timestamp: 14 Jan 22 07:51:05 
Tick timestamp: 14 Jan 22 07:51:10 
Tick timestamp: 14 Jan 22 07:51:20 
Tick timestamp: 14 Jan 22 07:51:25 
Tick timestamp: 14 Jan 22 07:51:30 
Tick timestamp: 14 Jan 22 07:51:35 
Tick timestamp: 14 Jan 22 07:51:40 
Tick timestamp: 14 Jan 22 07:51:45 
Tick timestamp: 14 Jan 22 07:51:50 
Tick timestamp: 14 Jan 22 07:51:55 
Tick timestamp: 14 Jan 22 07:52:00 
Tick timestamp: 14 Jan 22 07:52:05 
Tick timestamp: 14 Jan 22 07:52:10 
Tick timestamp: 14 Jan 22 07:52:20 
Tick timestamp: 14 Jan 22 07:52:25 
Tick timestamp: 14 Jan 22 07:52:35 
Tick timestamp: 14 Jan 22 07:52:40 
Tick timestamp: 14 Jan 22 07:52:45 
Tick timestamp: 14 Jan 22 07:52:50 
Tick timestamp: 14 Jan 22 07:52:55 
Tick timestamp: 14 Jan 22 07:53:00 
Tick timestamp: 14 Jan 22 07:53:05 
Tick timestamp: 14 Jan 22 07:53:10 
Tick timestamp: 14 Jan 22 07:53:15 
Tick timestamp: 14 Jan 22 07:53:20 
Tick timestamp: 14 Jan 22 07:53:25 
Tick timestamp: 14 Jan 22 07:53:35 
Tick timestamp: 14 Jan 22 07:53:40 
Tick timestamp: 14 Jan 22 07:53:50 
Tick timestamp: 14 Jan 22 07:54:00 
Tick timestamp: 14 Jan 22 07:54:05 
Tick timestamp: 14 Jan 22 07:54:10 
Tick timestamp: 14 Jan 22 07:54:15 
Tick timestamp: 14 Jan 22 07:54:20 
Tick timestamp: 14 Jan 22 07:54:25 
Tick timestamp: 14 Jan 22 07:54:30 
Tick timestamp: 14 Jan 22 07:54:35 
Tick timestamp: 14 Jan 22 07:54:45 
Tick timestamp: 14 Jan 22 07:54:50 
Tick timestamp: 14 Jan 22 07:55:00 
Tick timestamp: 14 Jan 22 07:55:15 
Tick timestamp: 14 Jan 22 07:55:25 
Tick timestamp: 14 Jan 22 07:55:30 
Tick timestamp: 14 Jan 22 07:55:35 
Tick timestamp: 14 Jan 22 07:55:40 
Tick timestamp: 14 Jan 22 07:55:45 
Tick timestamp: 14 Jan 22 07:55:50 
Tick timestamp: 14 Jan 22 07:55:55 
Tick timestamp: 14 Jan 22 07:56:00 
Tick timestamp: 14 Jan 22 07:56:05 
Tick timestamp: 14 Jan 22 07:56:10 
Tick timestamp: 14 Jan 22 07:56:30 
Tick timestamp: 14 Jan 22 07:57:00 
Tick timestamp: 14 Jan 22 07:57:05 
Tick timestamp: 14 Jan 22 07:57:10 
Tick timestamp: 14 Jan 22 07:57:20 
Tick timestamp: 14 Jan 22 07:57:25 
Tick timestamp: 14 Jan 22 07:57:40 
Tick timestamp: 14 Jan 22 07:57:45 
Tick timestamp: 14 Jan 22 07:57:50 
Tick timestamp: 14 Jan 22 07:57:55 
Tick timestamp: 14 Jan 22 07:58:05 
Tick timestamp: 14 Jan 22 07:58:10 
Tick timestamp: 14 Jan 22 07:58:15 
Tick timestamp: 14 Jan 22 07:58:20 
Tick timestamp: 14 Jan 22 07:58:25 
Tick timestamp: 14 Jan 22 07:58:30 
Tick timestamp: 14 Jan 22 07:58:35 
Tick timestamp: 14 Jan 22 07:58:40 
Tick timestamp: 14 Jan 22 07:58:45 
Tick timestamp: 14 Jan 22 07:58:50 
Tick timestamp: 14 Jan 22 07:58:55 
Tick timestamp: 14 Jan 22 07:59:05 
Tick timestamp: 14 Jan 22 07:59:10 
Tick timestamp: 14 Jan 22 07:59:15 
Tick timestamp: 14 Jan 22 07:59:20 
Tick timestamp: 14 Jan 22 07:59:25 
Tick timestamp: 14 Jan 22 07:59:30 
Tick timestamp: 14 Jan 22 07:59:35
Tick timestamp: 14 Jan 22 07:59:40 
Tick timestamp: 14 Jan 22 07:59:45 
Tick timestamp: 14 Jan 22 07:59:50 
Tick timestamp: 14 Jan 22 07:59:55 
Tick timestamp: 14 Jan 22 08:00:00 

[159: Fri 22-01-14 08:00:00c] 1.14712/1.14729\1.14610/1.14666 -0.00010
Bar timestamp: 14 Jan 22 08:00:00 

Bar 160 continued until 09:00:00

End of lookback period at 08:31:17Tick timestamp: 14 Jan 22 08:31:17 
Tick timestamp: 14 Jan 22 08:31:21 
Tick timestamp: 14 Jan 22 08:31:25
Tick timestamp: 14 Jan 22 08:31:38 
Tick timestamp: 14 Jan 22 08:31:42 
Tick timestamp: 14 Jan 22 08:31:47 
Tick timestamp: 14 Jan 22 08:31:50 
Tick timestamp: 14 Jan 22 08:31:59 
Tick timestamp: 14 Jan 22 08:32:08 

[Stop] at 08:32
Logout.. ok



Last edited by ozgur; 01/14/22 08:54.
Re: missing tick() in the current incomplete bar [Re: ozgur] #485071
01/14/22 12:15
01/14/22 12:15
Joined: Jul 2000
Posts: 27,696
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,696
Frankfurt
Thanks for the report. We'll look into that. Maybe the Dukascopy lookback history did not contain the most recent ticks, or something like that.

Re: missing tick() in the current incomplete bar [Re: ozgur] #485089
01/17/22 18:50
01/17/22 18:50
Joined: Dec 2019
Posts: 36
ozgur Online OP
Newbie
ozgur  Online OP
Newbie

Joined: Dec 2019
Posts: 36
Thanks for your initial feedback.

I actually connected to Oanda. Then I tried connecting to FXCM and got the same behaviour.

Dukascopy is just historical data. I removed all history from History folder and got the same behaviour.

Last edited by ozgur; 01/17/22 18:50.
Re: missing tick() in the current incomplete bar [Re: ozgur] #485091
01/18/22 10:59
01/18/22 10:59
Joined: Jul 2000
Posts: 27,696
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,696
Frankfurt
Yes. The reason was that when a bar extended into the live period, it got only live ticks. This will be fixed in the next update.


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1