function run()
{
set(PARAMETERS+FACTORS);
NumCores = -2; // use multiple cores (Zorro S only)
NumTrainCycles = 2;
BarPeriod=60;
assetList("AssetsCur.csv");
NumYears = 2;
LookBack = 451;
vars Price = series(price());
vars Trend = series(LowPass(Price,200));
Stop = 4*ATR(100);
vars MMI_Raw = series(MMI(Price,optimize(100,100,200)));
vars MMI_Smooth = series(LowPass(MMI_Raw,300));
if(falling(MMI_Smooth)) {
if(valley(Trend))
enterLong();
else if(peak(Trend))
enterShort();
}
}