So I tried converting a very simple straight forward EA this evening. Its called MACD Cross AUDD1. You can follow this link to download and EA and read the rules with the MetaEditor and see if I did everything the way it should be done.
This is the script I came up with following the rules.
Code:
function run()
{
	StartDate = 2002;
	BarPeriod = 1440;
	LookBack = 150;
	//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 = 30*PIP; // simple Stop
	TakeProfit = 120*PIP;
	
	if(crossOver(SignalLine,MainLine))
			enterLong();
	else if(crossUnder(SignalLine,MainLine))
		enterShort();
}



These are the results my testing produced.
Code:
AUDUSD D1 MACD cross compiling.................
BackTest: AUDUSD D1 MACD cross AUD/USD 2002..2013
Profit -111$  MI -1$  DD 138$  Capital 76$
Trades 233  Win 20%  Avg -6.2p  Bars 2
AR -14%  PF 0.76  SR -0.49  UI 343.7%  Error 48%