Can someone tell me why the following efs paints the last two bars with white background color instead of the bar with index -1 only?
- Clearpicks
- Clearpicks
PHP Code:
function preMain() {
setPriceStudy(true);
setStudyTitle("testing");
setShowCursorLabel(false);
setComputeOnClose();
}
function main() {
if ( getBarState() == BARSTATE_ALLBARS ) {
}
if ( getInterval() == 5 ) {
if ( getCurrentBarIndex() == -1 ) {
debugPrintln(getValue("Hour", 0, -1) + ":" + getValue("Minute", 0, -1));
setBarBgColor(Color.white);
}
}
}
Comment