Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
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
0 registered members (), 425 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 4 of 7 1 2 3 4 5 6 7
Re: Precise AssetMarketStart/End [Re: Zheka] #485698
04/15/22 09:28
04/15/22 09:28
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Thanks for the logs. Setting BarZone temporarily by script, as suggested, did not really work. BarZone is also internally used outside the script. So that was a bad advice in the manual.

We will think about a better solution for using local asset zones. Probably by automatically overriding BarZone when BR_ASSET is set. This will be implemented in the next beta version.

Re: Precise AssetMarketStart/End [Re: Zheka] #485700
04/15/22 12:49
04/15/22 12:49
Joined: Jul 2017
Posts: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 784
It would be great if market hours were set to AssetMarketStart/End in AssetMarketZone automatically, without having to dance around with StartMarket=AssetMarketStart, etc..

Any hints/confirmation on BR_ASSET working for FX and SPX500, but not for SPY?

Re: Precise AssetMarketStart/End [Re: Zheka] #485708
04/16/22 11:12
04/16/22 11:12
Joined: Apr 2008
Posts: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
Austria
Maybe SPY had no market time in the asset list?

You can check with is(NOSHIFT) if series are shifted or not.


Re: Precise AssetMarketStart/End [Re: Zheka] #485710
04/16/22 12:25
04/16/22 12:25
Joined: Jul 2017
Posts: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 784
Have a (closer) look at the log I provided - it prints AssetMarketStart/End set for the asset.

Upd: ! even if you set AssetMarketStart/End/Zone directly in the script, NOSHIFT is NOT getting set for SPY, but IS set for SPX500 and FX.


Last edited by Zheka; 04/16/22 12:49.
Re: Precise AssetMarketStart/End [Re: Zheka] #485758
04/19/22 10:23
04/19/22 10:23
Joined: Apr 2008
Posts: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
Austria
Maybe SPY has no bars outside its market hours? Then none of its bars would get the NOSHIFT.

Re: Precise AssetMarketStart/End [Re: Zheka] #485759
04/19/22 11:14
04/19/22 11:14
Joined: Jul 2017
Posts: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 784
Maybe yes - maybe no...log knows
Quote
[87: Tue 22-01-04 20:30] 477.88/478.32\477.71/478.25 -0.03 cls1=478.25000,Mark1Start=730,mark1end=1601, market=1, susp=0
[88: Tue 22-01-04 20:45] 478.26/478.48\477.91/478.38 -0.03 cls1=478.38000,Mark1Start=730,mark1end=1601, market=1, susp=0
[89: Tue 22-01-04 21:00c] 478.38/478.96\477.44/477.51 -0.03 cls1=477.51001,Mark1Start=730,mark1end=1601, market=0, susp=8

[90: Tue 22-01-04 21:15c] 477.51/477.65\477.25/477.34 -0.03 cls1=477.34000,Mark1Start=730,mark1end=1601, market=0, susp=8
[91: Tue 22-01-04 21:30c] 477.35/477.58\477.25/477.41 -0.03 cls1=477.41000,Mark1Start=730,mark1end=1601, market=0, susp=8
[92: Tue 22-01-04 21:45c] 477.42/477.48\477.28/477.48 -0.03 cls1=477.48001,Mark1Start=730,mark1end=1601, market=0, susp=8
[93: Tue 22-01-04 22:00c] 477.48/477.48\477.35/477.42 -0.03 cls1=477.42001,Mark1Start=730,mark1end=1601, market=0, susp=8

Re: Precise AssetMarketStart/End [Re: Zheka] #485760
04/19/22 11:41
04/19/22 11:41
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
A new version will be uploaded in short with a change in handling asset zone and market hours. BarZone will then be automatically set.

This will probably not solve your SPY problem, but simplify the script. If it then still does not work, please contact support with the script and asset list. We'll look into that.

Re: Precise AssetMarketStart/End [Re: Zheka] #485771
04/20/22 16:28
04/20/22 16:28
Joined: Jul 2017
Posts: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 784
I just tested the new version and found several problems, but let's take it one by one.
Code
function run() {
	
	set(LOGFILE);
	NumYears=1;
	Verbose=3;
   
      BarPeriod=15;
	
	BarZone=ET;		
	StartWeek=71800;
	EndWeek=51701;
		
BarMode = BR_WEEKEND+BR_NOSHIFT+BR_LOCAL+BR_LEISURE;

MaxLong=-1;

#ifndef first	
	asset("EUR/USD");	  
	
	       AssetMarketZone=ET;	
		AssetMarketStart = 1800;
		AssetMarketEnd = 1701;	
	 
	  vars prcI= series(priceC(0)); 
	  vars opnI= series(priceO(0));
	
	   printf("# opn1=%.5f,cls1=%.5f,Mark1Start=%i,mark1end=%i, market=%i,susp=%i,noshift=%i",opnI[0],prcI[0],AssetMarketStart,AssetMarketEnd,market(ET,0),suspended(), is(NOSHIFT));
#endif
	
#ifdef second	
	asset("SPY");	
	
	AssetMarketZone=ET;	
	AssetMarketStart = 0730;
	AssetMarketEnd = 1601;	
	
	vars prc= series(priceC(0));
	vars opn= series(priceO(0));
	printf("# opn2=%.2f,cls2=%.2f, mark2start=%i,mark2end=%i, market=%i,susp=%i,noshift=%i",opn[0],prc[0],AssetMarketStart,AssetMarketEnd,market(ET,0),suspended(), is(NOSHIFT));	
#endif	
/*	
	LifeTime=8;
	//if (ltod(ET,0)>AssetMarketEnd-1)
	if (prc[0]>prc[1]) enterLong();

*/	
}
doesn't work:
Code
[92: Mon 22-01-03 22:00] 1.12981/1.12993\1.12969/1.12974 -0.00004 opn1=1.12981,cls1=1.12974,Mark1Start=1800,mark1end=1701, market=1,susp=0,noshift=0
[93: Mon 22-01-03 22:30c] 1.12975/1.12977\1.12943/1.12943 -0.00004 opn1=1.12975,cls1=1.12943,Mark1Start=1800,mark1end=1701, market=0,susp=8,noshift=0
[94: Mon 22-01-03 22:45c] 1.12943/1.12962\1.12943/1.12954 -0.00004 opn1=1.12943,cls1=1.12954,Mark1Start=1800,mark1end=1701, market=0,susp=8,noshift=0
[95: Mon 22-01-03 23:00c] 1.12954/1.12965\1.12951/1.12955 -0.00004 opn1=1.12954,cls1=1.12955,Mark1Start=1800,mark1end=1701, market=0,susp=8,noshift=0
[96: Mon 22-01-03 23:15] 1.12955/1.12978\1.12955/1.12977 -0.00004 opn1=1.12955,cls1=1.12977,Mark1Start=1800,mark1end=1701, market=1,susp=0,noshift=0
1830(start)-1701(end) - works; 1900-1801 - works, but any AssetMarketEnd>1801 - doesn't work.
Other combinations like 1600(start)-1501(end) do not work either.

Last edited by Zheka; 04/20/22 16:39.
Re: Precise AssetMarketStart/End [Re: Zheka] #485784
04/21/22 11:12
04/21/22 11:12
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Yes, this was indeed a bug. It is supposedly fixed in the latest beta - please check it out.

Re: Precise AssetMarketStart/End [Re: Zheka] #485786
04/21/22 14:10
04/21/22 14:10
Joined: Jul 2017
Posts: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 784
One thing is fixed, but another appeared..

[99: Tue 22-01-04 00:00] 1.12994/1.13020\1.12982/1.13020 -0.00004 opn1=1.12994,cls1=1.13020,Mark1Start=2000,mark1end=1901, market=1,susp=0,noshift=0
[100: Tue 22-01-04 00:15c] 1.13020/1.13066\1.13014/1.13064 -0.00004 opn1=1.13020,cls1=1.13064,Mark1Start=2000,mark1end=1901, market=0,susp=8,noshift=0 <--noshift should be set here
[101: Tue 22-01-04 00:30c] 1.13064/1.13069\1.13039/1.13041 -0.00004 opn1=1.13020,cls1=1.13064,Mark1Start=2000,mark1end=1901, market=0,susp=8,noshift=1
[102: Tue 22-01-04 00:45c] 1.13041/1.13055\1.13040/1.13048 -0.00004 opn1=1.13020,cls1=1.13064,Mark1Start=2000,mark1end=1901, market=0,susp=8,noshift=1
[103: Tue 22-01-04 01:00c] 1.13048/1.13064\1.13040/1.13057 -0.00004 opn1=1.13020,cls1=1.13064,Mark1Start=2000,mark1end=1901, market=0,susp=8,noshift=1
[104: Tue 22-01-04 01:15] 1.13057/1.13089\1.13055/1.13085 -0.00004 opn1=1.13057,cls1=1.13085,Mark1Start=2000,mark1end=1901, market=1,susp=0,noshift=0


Aren't fixes tested at all??


It now works with SPY, but NOSHIFT "ends" 1 bar earlier than market opens:

[53: Tue 22-01-04 12:00c] 479.56/479.63\479.41/479.41 -0.03 opn2=477.76,cls2=477.60, mark2start=730,mark2end=1601, market=0,susp=9,noshift=1
[54: Tue 22-01-04 12:15c] 479.40/479.45\479.27/479.27 -0.03 opn2=477.76,cls2=477.60, mark2start=730,mark2end=1601, market=0,susp=9,noshift=1
[55: Tue 22-01-04 12:30] 479.27/479.33\478.65/478.75 -0.03 opn2=479.27,cls2=478.75, mark2start=730,mark2end=1601, market=1,susp=1,noshift=0 <-- this bar is outside of market hours, yet price series get shifted
[56: Tue 22-01-04 12:45] 478.72/479.05\478.72/478.95 -0.03 opn2=478.72,cls2=478.95, mark2start=730,mark2end=1601, market=1,susp=1,noshift=0


Last edited by Zheka; 04/21/22 14:22.
Page 4 of 7 1 2 3 4 5 6 7

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