PureBytes Links
Trading Reference Links
|
Could someone write a piece of sample code using static variable?
I was doing sth like:
for (i=0; i<barCount; i++) {
statVar[i] = StaticVarGet("statVar");
if (statVar[i] == 0) // first time
{
statVar[i] = 1;
} else {
statVar[i] = statVar[i]+1;
}
StaticVarSet("statVar", statVar[i]);
}
This seems to generate random results.
Thanks.
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|