function preMain() {
setPriceStudy(true);
setStudyTitle("day");
}
function main() {
if(getDay()%2 == 1)
setPriceBarColor(Color.RGB(0,0,255));
if(getDay()%2 == 0)
setPriceBarColor(Color.RGB(255,0,0));
return null;
}
draws the price bars red on the even numbered days of the month and blue on the odd numbered days of the month.
However, and this happens with another efs I have with setPriceBarColor, when the chart and efs load, all bars are blue. Until I adjust the width of the chart, the red bars do not show up.
Is this a bug, or am I doing something else wrong?
setPriceStudy(true);
setStudyTitle("day");
}
function main() {
if(getDay()%2 == 1)
setPriceBarColor(Color.RGB(0,0,255));
if(getDay()%2 == 0)
setPriceBarColor(Color.RGB(255,0,0));
return null;
}
draws the price bars red on the even numbered days of the month and blue on the odd numbered days of the month.
However, and this happens with another efs I have with setPriceBarColor, when the chart and efs load, all bars are blue. Until I adjust the width of the chart, the red bars do not show up.
Is this a bug, or am I doing something else wrong?
Comment