This works, no idea why, Zorro 2.25


// Strategy template ///////////////////////

function run()
{
StartDate = 2007;
EndDate = 2018;
BarPeriod = 60; // 1 day
BarZone = WET; // Western European midnight
Weekend = 1; // don't merge Friday and Sunday bars
NumWFOCycles = 5;

assetList("P:\\AssetsCur.csv");
asset("EUR/USD");


NumTrainCycles = 2;
if(TrainCycle == 0) set(RULES|PARAMETERS); // Test or Trade mode
else if(TrainCycle == 2) set(PARAMETERS);
else if(TrainCycle == 1) set(RULES);

if(Train) Hedge = 2; // for training, allow long + short
LifeTime = 3; // one week
MaxLong = MaxShort = -1;

int nTr=optimize(50,10,100);

if(adviseLong(PATTERN+FAST+2+RETURNS,0,
priceHigh(2),priceLow(2),priceClose(2),
priceHigh(1),priceLow(1),priceClose(1),
priceHigh(1),priceLow(1),priceClose(1),
priceHigh(0),priceLow(0),priceClose(0)) > nTr)
enterLong();

if(adviseShort() > nTr)
enterShort();

PlotWidth = 600;
PlotHeight1 = 300;
//plotTradeProfile(40);
//plotWFOCycle(Equity,0);
//plotWFOProfit();
}

Last edited by danatrader; 05/29/20 21:52.