Any suggestions for setting Upper Limit of 10 and Lower Limit of 0 in the following efs will be appreciated.
--------------------------------
var xRatio;
function preMain(){
setPriceStudy(false);
setStudyTitle("TrendStregthIndex");
setShowTitleParameters(false);
setShowCursorLabel(true);
setCursorLabelName("TSI", 0);
setDefaultBarStyle(PS_SOLID, 0);
setDefaultBarFgColor(Color.green, 0);
setDefaultBarThickness(1, 0);
setPlotType(PLOTTYPE_LINE, 0);
}
var xRatio = null;
function main() {
xRatio = Math.abs((close() - (close(10)))/atr(10));
return xRatio;
}
--------------------------
Thanks in advance.
Regards,
BB
--------------------------------
var xRatio;
function preMain(){
setPriceStudy(false);
setStudyTitle("TrendStregthIndex");
setShowTitleParameters(false);
setShowCursorLabel(true);
setCursorLabelName("TSI", 0);
setDefaultBarStyle(PS_SOLID, 0);
setDefaultBarFgColor(Color.green, 0);
setDefaultBarThickness(1, 0);
setPlotType(PLOTTYPE_LINE, 0);
}
var xRatio = null;
function main() {
xRatio = Math.abs((close() - (close(10)))/atr(10));
return xRatio;
}
--------------------------
Thanks in advance.
Regards,
BB
Comment