#include <profile.c>
function run(){
if(Train){
StartDate = 20190131;
EndDate = 20200731;
NumWFOCycles = 3;
} else {
StartDate = 20200627;
}
BarPeriod = 60;
LookBack = 700;
NumTotalCycles = 6;
assetList("AssetsFXCMLite");
while(loop(Assets)){
asset(Loop1);
while(algo(loop("TRND","CNTR"))){
if(Algo == "TRND"){
tradeTrend();
}
if(Algo == "CNTR"){
tradeCounterTrend();
}
}
}
if(is(EXITRUN))
plotHistogram("Profits",Balance/PIPCost,100,1,RED);
}