Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, Quad, EternallyCurious, 1 invisible), 726 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Zorro 2.40.8 - BarOffset problem #484182
09/18/21 14:44
09/18/21 14:44
Joined: Apr 2021
Posts: 19
S
simonkrebs Offline OP
Newbie
simonkrebs  Offline OP
Newbie
S

Joined: Apr 2021
Posts: 19
I have a problem with the new Zorro version 2.40.8.
BarOffset no longer works as expected.

I have set:
BarPeriod = 1440;
BarOffset = 17*60;

With Zorro 2.35.9 this worked fine and shifts the trading time, but since the update Zorro always skips several days. The issue disappears when I comment out BarOffset.

Is the error known?

Re: Zorro 2.40.8 - BarOffset problem [Re: simonkrebs] #484183
09/18/21 15:40
09/18/21 15:40
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Sure. Bars are skipped when they have no prices, depending on your BarMode setting. Check the log and your history. But if you cannot find the reason of the problem, you can contact Support with the files and they'll look into it.

Re: Zorro 2.40.8 - BarOffset problem [Re: simonkrebs] #484184
09/18/21 16:18
09/18/21 16:18
Joined: Apr 2021
Posts: 19
S
simonkrebs Offline OP
Newbie
simonkrebs  Offline OP
Newbie
S

Joined: Apr 2021
Posts: 19
I have set BarMode to BR_FLAT. When executing the same code with Zorro 2.35.9 no bars are skipped. So I assume it‘s a bug.

Re: Zorro 2.40.8 - BarOffset problem [Re: simonkrebs] #484185
09/18/21 17:36
09/18/21 17:36
Joined: Apr 2021
Posts: 19
S
simonkrebs Offline OP
Newbie
simonkrebs  Offline OP
Newbie
S

Joined: Apr 2021
Posts: 19
Please compare the sample output from Zorro 2.35.9 vs. 2.40.8.

Zorro 2.40.8:

2021-7-19: price=34.91
2021-7-25: price=30.33
2021-7-31: price=30.21
2021-8-6: price=28.30
2021-8-12: price=26.24
2021-8-18: price=29.07
2021-8-24: price=26.71
2021-8-30: price=25.59
2021-9-5: price=24.94
2021-9-11: price=27.06
2021-9-17: price=25.18


Zorro 2.35.9:

2021-9-2: price=24.77
2021-9-3: price=24.94
2021-9-4: price=24.94
2021-9-5: price=24.94
2021-9-6: price=24.94
2021-9-7: price=25.55
2021-9-8: price=25.51
2021-9-9: price=26.05
2021-9-10: price=27.06
2021-9-11: price=27.06
2021-9-17: price=25.18

Here is my sample code:

Code
#define ASSETLIST "AssetsALP-VIX"

function run()
{
	set(PLOTNOW+PRELOAD+COMMONSTART+LOGFILE);
	LookBack = 0;
	BarMode = BR_WEEKEND+BR_FLAT+BR_MARKET+BR_SLEEP+BR_LOGOFF;
	BarPeriod = 1440;
	BarOffset = 17*60; //shift the bar begin to 17:00 server time / 19:00 local time
	StartDate = ifelse(Live,NOW,20180101); 
	EndDate = NOW;

	Capital = 10000;
	NumCores = -2;
	
	if(is(INITRUN)) assetList(ASSETLIST); 
	if(Live) brokerCommand(SET_PRICETYPE, 2);
	
	BarOffset = 17*60; //Shift bar start/end by x hours
	
	asset("VXX");
	printf("\n%d-%d-%d: price=%.2f",year(),month(),day(),priceClose());
	
	
}

Last edited by simonkrebs; 09/18/21 17:37.
Re: Zorro 2.40.8 - BarOffset problem [Re: simonkrebs] #484187
09/18/21 20:24
09/18/21 20:24
Joined: Apr 2008
Posts: 586
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 586
Austria
Bars must be inside market hours. Not outside.

Read this: https://manual.zorro-project.com/barmode.htm


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