The reason of the crash was a size requirement for the output array.

Only one element of the fastSingular output array is used and it is unknown what that element really contains, as there is no documentation or source code. So it's up to you what you do with that SSA function. From the original EA above I assume that the output contains the basic trend of the price series. The alerts are triggered by that signal.

Anyway here's the complete code for the SSA implementation:
Code:
#define SSALag			25
#define SSANumberOfComputations	2
#define SSAPeriodNormalization	10
#define SSANumberOfBars 	300

void __stdcall fastSingular(double* sourceArray,int arraySize, int lag, int numberOfComputationLoops, double* destinationArray);
API(fastSingular,libSSA)

// helper function to reverse a series
vars reverse(vars Data)
{
	vars Reversed = series();
	int i;
	for(i=0; i<LookBack; i++)
		Reversed[i] = Data[LookBack-i-1];
	return Reversed;
}


function run()
{
	LookBack = SSANumberOfBars;
	StartDate = 20121001;
	EndDate = 20130101;

	vars close = series(priceClose());
	var ma = SMA(close,SSAPeriodNormalization);
	var dev = StdDev(close,SSAPeriodNormalization,1);
	vars no = series((close[0]-ma)/max(dev,0.000001));
	
	var out[SSANumberOfBars];
	fastSingular(reverse(no),SSANumberOfBars,SSALag,SSANumberOfComputations,out);
	
	plot("Normalized",no[0],NEW,RED);
	plot("SSA",out[0],AXIS2,BLUE);
	set(PLOTPRICE+PLOTNOW);
}



The fastSingular function expects the series in reverse order, that's why we need the additional "reverse" function for reversing a series. The blue line in the chart is the SSA output.