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
2 registered members (flink, AndrewAMD), 656 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Strength of the strategy - crash #472459
04/29/18 08:18
04/29/18 08:18
Joined: Feb 2018
Posts: 236
Italy
tradingest Offline OP
Member
tradingest  Offline OP
Member

Joined: Feb 2018
Posts: 236
Italy
Hi all,

I have the script below, but after Train I execute the Test but the script crash. Why?
Where is the error?

I want to try the Train with 1 broker and Test with others broker to test the strength of the strategy.
The BarPeriod is 1440, the result should be the same regardless of the broker.

Code:
void run()
{
  StartDate = 2010;
  EndDate = 2017;
  BarPeriod = 1440;
  LookBack = 150;
  TradesPerBar = 2;
  WFOCycle = 2;
  if(Train) Hedge = 2;
  set(RULES|TESTNOW);
  
// generate price series
  vars H = series(priceHigh()), 
    L = series(priceLow()),
    C = series(priceClose());


// generate some signals from H,L,C in the -100..100 range
  var Signals[2]; 
  Signals[0] = (LowPass(H,1000)-LowPass(L,1000))/PIP;
  Signals[1] = 100*FisherN(C,100);

  
// train and trade the signals 
  Stop = 4*ATR(100); 
  TakeProfit = 4*ATR(100);
  if(adviseLong(DTREE,0,Signals,2) > 0)
    enterLong();
  if(adviseShort(DTREE,0,Signals,2) > 0)
    enterShort();
}



thanks in advance

Last edited by tradingest; 04/29/18 08:19.
Re: Strength of the strategy - crash [Re: tradingest] #472531
05/03/18 11:13
05/03/18 11:13
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
I see no direct crash in your script, but "WFOCycle = 2;" looks wrong. You probably meant "NumWFOCycles"?


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