I'm trying to use the utility function getChartBG(), but I can't get anything useful from it. Here's the sample code:
function preMain() {
setPriceStudy(true);
setDefaultBarBgColor(Color.blue, 0);
}
function main() {
var BackGroundColor = getChartBG();
return BackGroundColor.toString(16);
}
It returns a value of ffffff. When I change the color from blue to red or anything else, it still returns that same value of ffffff.
When I try to test it using an if statement like this:
if (BackGroundColor = Color.red) return;
it returns true even though the background color is blue.
Can someone help?
function preMain() {
setPriceStudy(true);
setDefaultBarBgColor(Color.blue, 0);
}
function main() {
var BackGroundColor = getChartBG();
return BackGroundColor.toString(16);
}
It returns a value of ffffff. When I change the color from blue to red or anything else, it still returns that same value of ffffff.
When I try to test it using an if statement like this:
if (BackGroundColor = Color.red) return;
it returns true even though the background color is blue.
Can someone help?
Comment