Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
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
4 registered members (AndrewAMD, Quad, EternallyCurious, 1 invisible), 726 guests, and 5 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
Suffering from error 111 #464855
03/15/17 15:01
03/15/17 15:01
Joined: Apr 2013
Posts: 35
J
Joaquin Offline OP
Newbie
Joaquin  Offline OP
Newbie
J

Joined: Apr 2013
Posts: 35
My script gives
Error 111: Crash in script: compramosSpread();

This error only happens after having run an optimization, with the "Train" option and then clicking on "Backtest".

If I comment out the lines
Code:
set(PARAMETERS);
DataSplit = 80;
NumWFOCycles = 10;



then the backtest works ok, no error is shown. I have looked for the obvious: errors in code, wrong array indexes or divisions by zero, but I think I don't have any of these...

I think the problem is in exceeding the stack size, and I think I know why.
This is the optimize line that makes the script fail:

Code:
int lookBacks[5] = {150,300,450,500,700};
LookBack = lookBacks[optimize(0,0,4,1)];



But if I change these lines with this, it doesn't crash:

Code:
int lookBacks[3] = {150,300,450};
LookBack = lookBacks[optimize(0,0,2,1)];



Do this make sense to you? Can I upsize the stack value in Zorro Trader?
I am only optimizing one parameter, with 3 possible values. Is it normal that with 5 possible values the stack gets full and makes the script crash?

Re: Suffering from error 111 [Re: Joaquin] #464861
03/15/17 17:25
03/15/17 17:25
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
You can not exceed the stack size this way, so the problem is somewhere else. But it's a hint that is seems to depend on the lookbacks value. Check for exceeding the length of a series somewhere.

The crash happens inside the compramosSpread function, so it should be easy to find which line it is, by placing watch or print(TO_FILE,..) statements in the function.


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