Sorry for the confusion. I stumbled upon good results thinking I was using MACD formula. Turns out I was only using partial formula.
The mistake just goes to show how uncomplicated a script needs to be to give good back testing results even on a line chart.