Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (TipmyPip, AndrewAMD, dBc, clonman), 18,621 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
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: 594
Austria
Petra Offline
Support
Petra  Offline
Support

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

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


Moderated by  Petra 

Gamestudio download | 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