I just installed esignal 1086 and found out setDefaultBarBgColor() does not work correctly in esignal 1086. It seems it completely hides the candlestick bars so that the charts become unvisible.
Testing script and screenshot are attached. Look at the most left of the screenshot and only the left half part of the first bar is visible, which is another problem of setDefaultBarBgColor as in old esignal version (it sets bg color from the middle of current bar to the middle of the next bar instead of from the middle of two bars.
- Clearpicks
var d, d1;
var indexBgColor;
function preMain()
{
setPriceStudy(true);
}
function main()
{
if ( getBarState() == BARSTATE_ALLBARS ) {
indexBgColor = true;
}
if ( getBarState() == BARSTATE_NEWBAR ) {
var d = day(0);
if ( d != d1 ) {
d1 = d;
indexBgColor = ! indexBgColor;
if ( indexBgColor == true ) {
setDefaultBarBgColor(Color.RGB(200, 200, 200));
}
else {
setDefaultBarBgColor(Color.lightgrey);
}
}
}
}
Testing script and screenshot are attached. Look at the most left of the screenshot and only the left half part of the first bar is visible, which is another problem of setDefaultBarBgColor as in old esignal version (it sets bg color from the middle of current bar to the middle of the next bar instead of from the middle of two bars.
- Clearpicks
var d, d1;
var indexBgColor;
function preMain()
{
setPriceStudy(true);
}
function main()
{
if ( getBarState() == BARSTATE_ALLBARS ) {
indexBgColor = true;
}
if ( getBarState() == BARSTATE_NEWBAR ) {
var d = day(0);
if ( d != d1 ) {
d1 = d;
indexBgColor = ! indexBgColor;
if ( indexBgColor == true ) {
setDefaultBarBgColor(Color.RGB(200, 200, 200));
}
else {
setDefaultBarBgColor(Color.lightgrey);
}
}
}
}
Comment