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
4 registered members (7th_zorro, Quad, VoroneTZ, 1 invisible), 623 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Error 060 Out of memory #483027
04/25/21 07:15
04/25/21 07:15
Joined: Oct 2017
Posts: 56
Munich
K
kalmar Offline OP
Junior Member
kalmar  Offline OP
Junior Member
K

Joined: Oct 2017
Posts: 56
Munich
Hi all,

I have 10 years of minute data for 600 tickers. I was trying to look for gaps in quotes with a script below. But as expected I get the "Error 060: Out of memory". I wonder if it is possible to clean memory in the script, e.g. after 10 symbols are done? I was of course reducing # of assets and/or reducing period (e.g. 100 symbols for 2 years works), but I would like to avoid this manual work. Thank you.

Code
function run()
{
    StartDate = 20100101;
    EndDate = 20201231;

	BarPeriod = 1;	
	LookBack = 0;

	string filename = "Stocks_gaps.csv"; 

	if(is(INITRUN)) // specifying the header in the first run
	{
		char header[500];
		sprintf(header, "Asset, UTCDate, DoW, Time, Gap_Minutes, \n");
		file_delete(filename);
		file_append(filename, header);
	}

    assetList("AssetsMyStonks100.csv");
    History = "*_us_stock.t6"; 	
    Detrend = NOPRICE; // prevents that asset and price data is checked and outliers are removed
    while(asset(loop(Assets)))
            {	
            var tdiff = (wdate() - wdate(1));	// time difference in days of the last consecutive bars
            if(tdiff > (BarPeriod/1440)*2 && dow() == dow(1)) 
                    {	
                        char line[500];
                        sprintf(line, "%s, %d-%02d-%02d, %i, %02d:%02d, %i, \n", 
                                    Asset, year(), month(), day(), dow(), hour(), minute(),minutesAgo(1));
                        file_append(filename, line);
                    }
            }	
}

Re: Error 060 Out of memory [Re: kalmar] #483060
04/29/21 06:23
04/29/21 06:23
Joined: Apr 2008
Posts: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
Austria
Use this command: set(CACHE). Its still undocumented but works for me so far.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1