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
1 registered members (AndrewAMD), 559 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
simple crash code #477398
06/22/19 12:12
06/22/19 12:12
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
Hi,

which is a wrong in this code?
Code
void run(){
  
  StartDate 	= 20190210;
  EndDate     = 2019;
  BarPeriod 	= 15;

  LookBack    = 200;
  Capital     = 10000;

  Stop = 10*ATRS(100);
  TakeProfit =4*ATRS(76) ;
  assetList("History\\AssetsGP.csv");
  asset("EUR/USD");

  NumYears = 1;
  Hedge = 2;          // allow long + short
  LifeTime = 20;      // = prediction horizon
  OrderDelay = 60;
  set(TICKS);  
  set(STEPWISE);
  enterLong(1);
}


afer click on the test, zorro crash without any warning

Re: simple crash code [Re: Grat] #477399
06/22/19 12:59
06/22/19 12:59
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
https://manual.zorro-project.com/asset.htm

Setting TICKS when the asset was already loaded, is no good idea, the ticks were not created and it will crash.

Re: simple crash code [Re: Grat] #477404
06/22/19 18:37
06/22/19 18:37
Joined: May 2015
Posts: 390
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 390
Czech Republic
you have true, thanks


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1