ES 7.91 build 738
function preMain() {
setPriceStudy(true);
setStudyTitle("barcolor");
// setColorPriceBars does not maintain study color properties.
// depending on color settings (wick/outline/bg/etc) price bars may
// even "disappear" into the background. The mere existence of the
// function, when true, causes this behavior. When false, usage
// of setPriceBarColor triggers the behavior.
// This is clearly a bug... existing study color properties must be honored
// unless they are overriden by new default colors via EFS, etc.
setColorPriceBars(true);
}
function main() {
// just a simple condition for testing.
if (high(0) > high(-1))
{
// if setColorPriceBars(false) one would think this would have no affect. Not the case.
// And to add insult, study color properties are not honored!
// if setColorPriceBars(true) study color properties are not honored either.
// rem/unrem for testing
// setPriceBarColor(Color.magenta);
}
return null;
}
For testing you may need to "remove" instead of "reload". Reload produced inconsistent results for me (which suggests a different problem)
function preMain() {
setPriceStudy(true);
setStudyTitle("barcolor");
// setColorPriceBars does not maintain study color properties.
// depending on color settings (wick/outline/bg/etc) price bars may
// even "disappear" into the background. The mere existence of the
// function, when true, causes this behavior. When false, usage
// of setPriceBarColor triggers the behavior.
// This is clearly a bug... existing study color properties must be honored
// unless they are overriden by new default colors via EFS, etc.
setColorPriceBars(true);
}
function main() {
// just a simple condition for testing.
if (high(0) > high(-1))
{
// if setColorPriceBars(false) one would think this would have no affect. Not the case.
// And to add insult, study color properties are not honored!
// if setColorPriceBars(true) study color properties are not honored either.
// rem/unrem for testing
// setPriceBarColor(Color.magenta);
}
return null;
}
For testing you may need to "remove" instead of "reload". Reload produced inconsistent results for me (which suggests a different problem)
Comment