I am using a ATR indicator and would like to display more than the 2 decimal places that show up. The chart for the GBP shows up with 4 but my indicator only shows up with 2. How can I make this into 4 decimals for the indicator?
PHP Code:
var vATR = null;
var fpArray = new Array();
function preMain() {
var x;
setStudyTitle("ATR Stop");
setCursorLabelName("ATR Stop", 0);
setDefaultBarFgColor(Color.blue, 0);
setPlotType(PLOTTYPE_LINE,0);
setDefaultBarThickness(2,0);
x=0;
fpArray[x] = new FunctionParameter("Length", FunctionParameter.NUMBER);
with(fpArray[x]){
setLowerLimit(1);
setDefault(15);
}
x++;
fpArray[x] = new FunctionParameter("Symbol", FunctionParameter.NUMBER);
with(fpArray[x]){
setDefault("");
}
x++;
fpArray[x] = new FunctionParameter("Interval", FunctionParameter.NUMBER);
with(fpArray[x]){
setDefault("");
}
}
function main(Length,Symbol,Interval) {
if(getBuildNumber()<689)
return;
if(Symbol==null) Symbol=getSymbol();
if(Interval==null) Interval=getInterval();
vSymbol=Symbol+","+Interval;
if (vATR == null) vATR = atr(Length,sym(vSymbol));
/********************************************
Insert your code following this text block
Use vATR.getValue(0) for your code
*********************************************/
return vATR.getValue(0);
}
Comment