Zorro bugs & errors

Posted By: Mithrandir77

Zorro bugs & errors - 09/10/14 20:04

I have searched and didn't find any thread to report with bugs or errors in the code so I decided to start this one.

I was digging in indicators.c when I spotted a possibly error in the implementation of the ATRS indicator:

Code:
// Simple ATR based on SMA
var ATRS(int Period)
{
	Period = max(1,Period);
	var vATRS =  0;
	for(g_count = 0; g_count < Period; g_count++)
		vATRS = priceHigh(g_count)-priceLow(g_count);
	return vATRS/Period;
}



Shouldn't it be inside the for

Code:
vATRS += priceHigh(g_count)-priceLow(g_count);



? because in the present version it is not adding up the ATRanges, only the last one is returned.
Posted By: jcl

Re: Zorro bugs & errors - 09/11/14 06:48

Thanks! This looks indeed like a bug. Apparently no one has used the ATRS so far. - You can report bugs in the Bug forum, which is both for Gamestudio and for Zorro.
Posted By: Mithrandir77

Re: Zorro bugs & errors - 09/11/14 21:24

Thanks for your answer, I have already posted in Bug Hunt concerning this.
© 2024 lite-C Forums