Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
basik85278
by basik85278. 04/28/24 08:56
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Quad, AndrewAMD), 722 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
StartDate causing excessive lookback period #488007
12/26/23 08:13
12/26/23 08:13
Joined: Dec 2019
Posts: 53
ozgur Offline OP
Junior Member
ozgur  Offline OP
Junior Member

Joined: Dec 2019
Posts: 53
Tested in Version 2.6 (output also same in 2.53).
Below are a couple of iterations of the same code, commenting out/in StartDate and MinutesPerDay.

Code
void run()
{
	Verbose 	= 3;
	BarPeriod 	= 60;
	LookBack 	= 10000;
	
	StartDate 	= 20110624;
	EndDate 	= 20110625;
	NumYears    	= 3;
	MinutesPerDay 	= 1440;
}

Log:
Quote

testlb compiling............
EUR/USD 1849709 ticks read
12233(17621) bars 2009-06-21..2011-06-26 generated
Test: testlb EUR/USD 2011..2013



Code
void run()
{
	Verbose 	= 3;
	BarPeriod 	= 60;
	LookBack 	= 10000;
	
	// StartDate 	 = 20110624;
	EndDate 	= 20110625;
	NumYears    	= 3;
	MinutesPerDay	= 1440;
}

Log:
Quote
testlb compiling...........
EUR/USD 1105694 ticks read
15054(21716) bars 2009-01-02..2011-06-26 generated
Test: testlb EUR/USD 2009..2011



Code
void run()
{
	Verbose 	= 3;
	BarPeriod 	= 60;
	LookBack 	= 10000;
	
	// StartDate 	 = 20110624;
	EndDate 	= 20110625;
	NumYears    	= 3;
	// MinutesPerDay = 1440;
}

Log:
Quote
testlb compiling...........
EUR/USD 1105694 ticks read
15054(21716) bars 2009-01-02..2011-06-26 generated
Test: testlb EUR/USD 2009..2011



Code
void run()
{
	Verbose 	= 3;
	BarPeriod 	= 60;
	LookBack 	= 10000;
	
	StartDate 	= 20110624;
	EndDate 	= 20110625;
	NumYears    	= 3;
	// MinutesPerDay = 1440;
}

Log:
Quote
testlb compiling...........
Error 047: EUR/USD no 2004 history (History\EURUSD_2004.t6)
EUR/USD 3243025 ticks read
39196(56756) bars 2005-01-03..2011-06-26 generated
Test: testlb EUR/USD 2011..2013


I understand Zorro is trying to estimate max Lookback with MinutesPerDay parameter but there seems to be an inconsistent behaviour when StartDate is used.

Thanks.

Re: StartDate causing excessive lookback period [Re: ozgur] #488008
12/26/23 13:46
12/26/23 13:46
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
When you give a start date, the lookback period is before that start date. You can check the lookback start when you assume a year has 252 trading days, and a day has 6 bars.

Re: StartDate causing excessive lookback period [Re: ozgur] #488011
12/26/23 22:31
12/26/23 22:31
Joined: Dec 2019
Posts: 53
ozgur Offline OP
Junior Member
ozgur  Offline OP
Junior Member

Joined: Dec 2019
Posts: 53
Yeah I see but comparing Case 3 and Case 4 in the above example, there is only 1 day difference between StartDate and EndDate however required lookback period jumps 4 years back suddenly.

Looking at all cases above, the MinutesPerDay parameter seems to be defaulted to some value other than 360 if StartDate isn't defined.

Re: StartDate causing excessive lookback period [Re: ozgur] #488037
01/02/24 12:01
01/02/24 12:01
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
"Default" means that it has this value unless you explicitely set a different value. When no start date is defined, the first date is NumYears in the past. If a start date is defined, the first date is the startdate minus the lookback period. If you have a 4 years lookback period, then the first date is 4 years before the start date, even if you test only one day.

Re: StartDate causing excessive lookback period [Re: ozgur] #488045
01/02/24 21:40
01/02/24 21:40
Joined: Dec 2019
Posts: 53
ozgur Offline OP
Junior Member
ozgur  Offline OP
Junior Member

Joined: Dec 2019
Posts: 53
I see now. In other words NumYears is inclusive of Lookback. Thanks.


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