Here's the script.
Code:
function run() {
  if (is(INITRUN)) {
    StartDate = 20110101;
    EndDate = 20121231;
    BarPeriod = 60;
    Weekend = 1;
    LookBack = 600;
    Hedge = 2;
    DataSplit = 85;
    set(TESTNOW);
    set(PARAMETERS+FACTORS);
    NumOptCycles = 2;
    set(LOGFILE);
  }

  while(asset(loop("EUR/USD", "USD/JPY", "GBP/USD"))) {
    vars Price = series(price());

    var v0 = optimize(200, 20, 500);
    var v1 = optimize(v0, v0, 600);

    Margin = max(OptimalF, 0.001) * 250.;

    vars S0 = series(LowPass(Price, v0));
    vars S1 = series(LowPass(Price, v1));

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

    if (crossOver(S0, S1)) {
      exitShort();
      enterLong();
    }
    if (crossOver(S1, S0)) {
      exitLong();
      enterShort();
    }

  }
}



Here is a train+test timing breakdown.

Code:
w0 & w1
18s Train O1 cycle
24s Train O2 cycle
 1s Compute FACTORS & Test
---
43s Total

w2
18s W[1]:O[1]
25s W[1]:O[2]
18s W[2]:O[1]
25s W[2]:O[2]
 1s Compute FACTORS & Test
---
87s Total


What's Zorro doing?

At least with this script, the training time depends on the number of WFO Cycles. Keeping everything else the same,
Code:
NumWFOCycles = 1 takes  43s
NumWFOCycles = 2 takes  87s
NumWFOCycles = 3 takes 111s
NumWFOCycles = 4 takes 128s
NumWFOCycles = 5 takes 142s


Linear fit: Base Training time is 31 seconds and each WFO Cycle adds 24 seconds.

Last edited by GPEngine; 06/03/15 05:27. Reason: I meant TRAINing time