Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (degenerate_762, Nymphodora), 1,012 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
AssetMarketStart/End do not work in 2.45.6 #484997
01/06/22 15:33
01/06/22 15:33
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
trading.h:
Code
int	nMarketZone,nStartMarket,nEndMarket; // from asset list
variables.h:
Code
#define AssetMarketStart g->asset->nMarketStart   #define AssetMarketEnd g->asset->nMarketEnd
just renaming the #defs in variables.h crashes Zorro.

Re: AssetMarketStart/End do not work in 2.45.6 [Re: Zheka] #485008
01/07/22 15:06
01/07/22 15:06
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Yes, that was a wrong header file. The next beta version, due tomorrow, will contain the right one.

Re: AssetMarketStart/End do not work in 2.45.6 [Re: Zheka] #485027
01/10/22 14:02
01/10/22 14:02
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
This script:
Code
function run() {
	
	set(LOGFILE);
			
	BarMode = BR_ASSET;		
	AssetMarketZone=ET;	
	AssetMarketStart = 1000;
	AssetMarketEnd = 1700;
	
	vars prc= series(priceC(0));
	
	printf("# cls =%.5f",prc[0]);	
}
produces this output:
Code
[44: Wed 17-01-04 12:00] (1.04315) cls =1.04315
[45: Wed 17-01-04 13:00] (1.04339) cls =1.04339
[46: Wed 17-01-04 14:00] (1.04393) cls =1.04393
  [47: Wed 17-01-04 15:00] (1.04622) cls =1.04622  <--1000ET
....
[52: Wed 17-01-04 20:00] (1.04665) cls =1.04665
[53: Wed 17-01-04 21:00] (1.04864) cls =1.04864
  [54: Wed 17-01-04 22:00] (1.04904) cls =1.04904  <--1700ET
[55: Wed 17-01-04 23:00] (1.04872) cls =1.04872
[56: Thu 17-01-05 00:00] (1.04970) cls =1.04970
[57: Thu 17-01-05 01:00] (1.05406) cls =1.05406
So, BR_ASSET does not prevent series from shifting outside AssetMarketStart/End.

If it does work - pls provide a snippet demoing correct use.

Last edited by Zheka; 01/10/22 14:03.
Re: AssetMarketStart/End do not work in 2.45.6 [Re: Zheka] #485032
01/10/22 17:34
01/10/22 17:34
Joined: Apr 2008
Posts: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
Austria
I think you need first select an Asset when you want to use AssetMarket variables.

The Oanda asset lists now have AssetMarketZone and market hours, check them out.

Re: AssetMarketStart/End do not work in 2.45.6 [Re: Zheka] #485033
01/10/22 21:28
01/10/22 21:28
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
I tried before posting - it does not work either.

Normally Asset is set from the asset box - if not from asset()...isn't it?

Last edited by Zheka; 01/10/22 22:36.
Re: AssetMarketStart/End do not work in 2.45.6 [Re: Zheka] #485035
01/11/22 08:45
01/11/22 08:45
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
The asset needs not be selected because the default asset is then used. A test script:

Code
void run()
{
   set(PLOTNOW);
   StartDate = 20210102;
   EndDate = 20210110;
   BarPeriod = 15;
   LookBack = 0;
   setf(BarMode,BR_FLAT|BR_ASSET); 

   asset("EUR/USD");
   AssetMarketZone = EST;
   AssetMarketStart = 930;
   AssetMarketEnd = 1630;
   if(is(NOSHIFT))
     plot("Mkt closed",1,NEW|LINE,RED);
}


Also check the exe file date of your beta version. If you downloaded it last weekend, download it again. There was a faulty version on Friday, although it had probably no effect on BR_ASSET.

Re: AssetMarketStart/End do not work in 2.45.6 [Re: Zheka] #485038
01/11/22 09:52
01/11/22 09:52
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
Yes, it works in the version downloaded now.


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