Page 1 of 1

atr coming up zero

Posted: Aug 31 2012
by KhaosTrader
I entered this in a signal

Code: Select all

value7 = AvgTrueRange(14);
print ("Date = " +eldatetostring(Date)+
" yTime = " + numtostr(Time,0) +
" ATR VAL # = " + NumToStr(value7 ,0));


the value7 is always 0.... not sure why

Re: atr coming up zero

Posted: Aug 31 2012
by TJ
I entered this in a signal

Code: Select all

value7 = AvgTrueRange(14);
print ("Date = " +eldatetostring(Date)+
" yTime = " + numtostr(Time,0) +
" ATR VAL # = " + NumToStr(value7 ,0));


the value7 is always 0.... not sure why
a side note:

Always use a meaningful variable name; avoid generic names like value1, value2, condition1, etc.,

A good coding practice will save you lots of headache in debugging.

Re: atr coming up zero  [SOLVED]

Posted: Aug 31 2012
by KhaosTrader
i found the problem, i need to put more significant digits in the numtostring