Is it possible to have yesterday's bars a different color from today's?
As an example, I would like yesterday to print black...
As an example, I would like yesterday to print black...
function preMain() {
setPriceStudy(true);
setShowCursorLabel(false);
}
var CurDay = null;
function main() {
//if (getBarState() == BARSTATE_NEWBAR && getCurrentBarIndex() == 0) {
// setBar(Bar.BgColor, -1, Color.grey);
//}
if (CurDay == null) {
var vDate = new Date();
CurDay = vDate.getDate();
}
if (getBarState() == BARSTATE_NEWBAR && getDay() != CurDay) {
setBarBgColor(Color.grey);
}
return;
}
Comment