#include <profile.c>
function run()
{
StartDate = 2010;
EndDate = 2018;
BarPeriod = 1440; // 1 day
BarZone = WET; // Western European midnight
Weekend = 1; // don't merge Friday and Sunday bars
// NumWFOCycles = 5;
asset("EUR/USD");
//set(RULES+TESTNOW);
NumTrainCycles = 2;
if(TrainCycle == 1) set(RULES);
else if(TrainCycle == 2) set(PARAMETERS);
else if(TrainCycle == 0) set(RULES|PARAMETERS|FACTORS);
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();
}