Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 959 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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