atr coming up zero  [SOLVED]

Questions about MultiCharts and user contributed studies.
KhaosTrader
Posts: 186
Joined: 10 May 2012
Has thanked: 14 times
Been thanked: 11 times

atr coming up zero

Postby KhaosTrader » 31 Aug 2012

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

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: atr coming up zero

Postby TJ » 31 Aug 2012

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.

KhaosTrader
Posts: 186
Joined: 10 May 2012
Has thanked: 14 times
Been thanked: 11 times

Re: atr coming up zero  [SOLVED]

Postby KhaosTrader » 31 Aug 2012

i found the problem, i need to put more significant digits in the numtostring


Return to “MultiCharts”