Can someone show a newcomer how to limit the number of decimal points the following script will display? This script just displays the bar range but, as written, I'm getting about 10 decimal places in the display.. Thanks
function preMain() {
setPriceStudy(true);
setStudyTitle("h-l");
setCursorLabelName("h-l", 0);
setDefaultBarStyle(PS_SOLID, 0);
setDefaultBarFgColor(Color.red, 0);
setDefaultBarThickness(1, 0);
setPlotType(PLOTTYPE_LINE, 0);
}
function main() {
return high()-low()+"";
}
function preMain() {
setPriceStudy(true);
setStudyTitle("h-l");
setCursorLabelName("h-l", 0);
setDefaultBarStyle(PS_SOLID, 0);
setDefaultBarFgColor(Color.red, 0);
setDefaultBarThickness(1, 0);
setPlotType(PLOTTYPE_LINE, 0);
}
function main() {
return high()-low()+"";
}
Comment