Easy question

Posted By: Tuguldur717

Easy question - 12/14/17 14:51

Hi all. How can i display value of standart deviation of usdjpy(1 year data) by zorro test?
Posted By: jcl

Re: Easy question - 12/15/17 12:47

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.
© 2024 lite-C Forums