Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (flink, AndrewAMD), 656 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 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: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 784
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,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
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: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 784
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: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 784
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,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
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: 784
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 784
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