Code:
void run()
{
	BarPeriod = 1440;
	NumYears = 1;
	LookBack = 0;
	if(is(EXITRUN)) printf("nStdDev: %.4f",sqrt(Moment(ThisAsset->pClose,NumBars,2)));
}



Be sure that this is what you need - it's the standard deviation of the price, not of the returns.