Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Trading Journey
by howardR. 04/24/24 20:04
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 766 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Zorro high memory usage #465837
05/14/17 20:22
05/14/17 20:22
Joined: Apr 2017
Posts: 106
3
3dgamelight Offline OP
Member
3dgamelight  Offline OP
Member
3

Joined: Apr 2017
Posts: 106
Zorro uses more than 1GB of RAM when the asset function get called more than once per bar.
I use Wine and I do not know if this problem happens on Windows.
Could someone help me to workaround this issue for getting price data for other assets?

Code:
#define ENABLE_ERROR 1

function run()
{
	int i;
	
	set(PARAMETERS+FACTORS);  // generate and use optimized parameters and factors
	BarPeriod = 60;	// 1 hour bars
	StartDate = 2005;
	NumWFOCycles = 10; // activate WFO
	
	if(ReTrain) {
		UpdateDays = -1;	// update price data from the server 
		SelectWFO = -1;	// select the last cycle for re-optimization
		reset(FACTORS);	// don't generate factors when re-training
	}
	
	if(ENABLE_ERROR) {
		for(i = 0; asset(Assets[i]); i++);
	}
	
	while(asset(loop(Assets))) {
		var dummy = optimize(1, 0.5, 1.5);
		if(random() > 0) {
			enterLong();
		} else {
			enterShort();
		}
	}
}


Re: Zorro high memory usage [Re: 3dgamelight] #465849
05/15/17 07:53
05/15/17 07:53
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
There is no workaround. When you load price data, it must be stored at some place, and that's the computer memory. For reducing the data, you can either use a shorter simulation period, or split the portfolio into groups of assets that you test separately.


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