Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (M_D), 1,430 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Zorro bugs & errors #445469
09/10/14 20:04
09/10/14 20:04
Joined: Nov 2013
Posts: 123
Mithrandir77 Offline OP
Member
Mithrandir77  Offline OP
Member

Joined: Nov 2013
Posts: 123
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.

Re: Zorro bugs & errors [Re: Mithrandir77] #445482
09/11/14 06:48
09/11/14 06:48
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
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.

Re: Zorro bugs & errors [Re: jcl] #445506
09/11/14 21:24
09/11/14 21:24
Joined: Nov 2013
Posts: 123
Mithrandir77 Offline OP
Member
Mithrandir77  Offline OP
Member

Joined: Nov 2013
Posts: 123
Thanks for your answer, I have already posted in Bug Hunt concerning this.


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1