Did a little tweaking optimizing the stop and running a WFO process. The code now looks like this:
Code:
function run()
{
	set(PARAMETERS);
	StartDate = 2002;
	BarPeriod = 1440;
	LookBack = 250;
	NumWFOCycles = 10;
	
	//edge trading logic
   int FastPeriod = 12;
   int SlowPeriod = 26;
	int SignalPeriod = 9;
	
	vars PriceClose = series(priceClose());
	MACD(PriceClose,FastPeriod,SlowPeriod,SignalPeriod);
	vars MainLine = series(rMACD);
	vars SignalLine = series(rMACDSignal);
	vars Hist = series(rMACDHist);
	
	Stop = ATR(100) * optimize(1.99,1,15,0.5,0); // Adaptive stop
	
		
	if(crossOver(SignalLine,MainLine))
			reverseLong(1);
	else if(crossUnder(SignalLine,MainLine))
		reverseShort(1);
	if(ReTrain) 
	{
  		UpdateDays = -1; 
  		SelectWFO = -1; 
	}	
}


And the results are as follows.
Code:
AUDUSD D1 MACD cross run..
Profit -165$  MI -2$  DD 338$  Capital 232$
Trades 132  Win 61%  Avg -16.4p  Bars 13
AR -11%  PF 0.86  SR -0.26  UI 223.3%  Error 48%
Generate Chart - please wait... ok



My aim to go around picking simple to a little complex systems and converting them to zorro scripts. I am sure if newbies come along they will find this useful and can learn by trying to converting the strategies themselves before they look at how I went about it.