Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (dr_panther, Quad, AndrewAMD, 7th_zorro), 947 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Error 111 - Crash in Script #449434
03/20/15 13:34
03/20/15 13:34
Joined: Feb 2015
Posts: 45
Italy
forexcoder Offline OP
Newbie
forexcoder  Offline OP
Newbie

Joined: Feb 2015
Posts: 45
Italy
Hi everyone.
What kind of error is this?

Attached Files Zorro_error.JPG
Re: Error 111 - Crash in Script [Re: forexcoder] #449435
03/20/15 13:38
03/20/15 13:38
Joined: Sep 2013
Posts: 64
Spain
yosoytrader Offline
Junior Member
yosoytrader  Offline
Junior Member

Joined: Sep 2013
Posts: 64
Spain
maybe an error in the script coding, can you post the script?

Re: Error 111 - Crash in Script [Re: yosoytrader] #449436
03/20/15 14:46
03/20/15 14:46
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
One of the worst thing, because dubugging in Zorro is "old-style" this have helped me: http://zorro-trader.com/manual/

Re: Error 111 - Crash in Script [Re: MatPed] #449439
03/20/15 17:18
03/20/15 17:18
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Originally Posted By: The Mighty Manual

Error 111: Crash in ...

A function in the script crashed due to a wrong operation, such as a division by zero or a wrong array index. The current run is aborted (which can cause subsequent errors, f.i. inconsistent series calls). See Troubleshooting about how to fix bugs in your script and deal with crashes.

Re: Error 111 - Crash in Script [Re: jcl] #449471
03/21/15 11:12
03/21/15 11:12
Joined: Feb 2015
Posts: 45
Italy
forexcoder Offline OP
Newbie
forexcoder  Offline OP
Newbie

Joined: Feb 2015
Posts: 45
Italy
Thanks all. That is the code:
#define D1 (1440/BarPeriod)//
#define W1 (7200/BarPeriod)//
#define MN1 (30240/BarPeriod)//

Stop = 4*ATR(100);
Trail = 4*ATR(100);
LookBack = 100;
BarPeriod = 60;//
Hedge = 1;
TimeFrame = D1;
vars PriceD1 = series(price());//
TimeFrame = W1;
vars PriceW1 = series(price());
TimeFrame = MN1;
vars PriceMN1 = series(price());

void direzioneLong()
{
if (PriceD1[0]>PriceD1[1])
enterLong();
}

void direzioneShort()
{
if (PriceD1[0]>PriceD1[1])
enterShort();
}
int run()
{

if (PriceMN1[0]>PriceMN1[1] and PriceW1[0]>PriceW1[1] and PriceD1[0]<PriceD1[1])
direzioneLong();
if (PriceMN1[0]<PriceMN1[1] and PriceW1[0]<PriceW1[1] and PriceD1[0]>PriceD1[1])
direzioneShort();
}

Re: Error 111 - Crash in Script [Re: forexcoder] #449474
03/21/15 12:33
03/21/15 12:33
Joined: Sep 2013
Posts: 64
Spain
yosoytrader Offline
Junior Member
yosoytrader  Offline
Junior Member

Joined: Sep 2013
Posts: 64
Spain
Hi forexcoder, I defined the vars arrays as global - outside the run() - and initialized inside the run()
Moreover I get error because of not enough bars to compute the ATR.
Why not use the script skeletons taught in the workshops?
Hope this helps.





#define D1 (1440/BarPeriod)//
#define W1 (7200/BarPeriod)//
#define MN1 (30240/BarPeriod)//

vars PriceD1;
vars PriceW1;
vars PriceMN1;

void direzioneLong()
{
if (PriceD1[0]>PriceD1[1])
enterLong();
}

void direzioneShort()
{
if (PriceD1[0]>PriceD1[1])
enterShort();
}



void run()
{



LookBack = 100;
BarPeriod = 60;
Hedge = 1;

TimeFrame = D1;
PriceD1 = series(price());

TimeFrame = W1;
PriceW1 = series(price());

TimeFrame = MN1;
PriceMN1 = series(price());

Stop = 4*ATR(100);
Trail = 4*ATR(100);

if (PriceMN1[0]>PriceMN1[1] and PriceW1[0]>PriceW1[1] and PriceD1[0]<PriceD1[1])
direzioneLong();
if (PriceMN1[0]<PriceMN1[1] and PriceW1[0]<PriceW1[1] and PriceD1[0]>PriceD1[1])
direzioneShort();
}

Re: Error 111 - Crash in Script [Re: yosoytrader] #449495
03/22/15 11:00
03/22/15 11:00
Joined: Feb 2015
Posts: 45
Italy
forexcoder Offline OP
Newbie
forexcoder  Offline OP
Newbie

Joined: Feb 2015
Posts: 45
Italy
Thanks very much yosoytrader.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1