This must be simple but I can't figure it out. As an example, the chart attached shows the EFS study has painted bars for those that make 3 higher highs or 3 lower lows in a row. But how do I NOT color all the other bars (shown grey) and keep the standard candle colors for those: red for down and green for up?
Here's the EFS code:
function preMain() {
setPriceStudy(true);
setStudyTitle("0Test, 3 in a Row");
setShowCursorLabel(false);
setDefaultPriceBarColor( Color.grey);
//setComputeOnClose();
}
function main() {
if (low(-3) > low(-2) && low(-2) > low(-1) && low(-1) > low(0)){
setPriceBarColor(Color.brown);
}
if (high(-3) < high(-2) && high(-2) < high(-1) && high(-1) < high(0)){
setPriceBarColor(Color.olive);
}
return null;
}
Here's the EFS code:
function preMain() {
setPriceStudy(true);
setStudyTitle("0Test, 3 in a Row");
setShowCursorLabel(false);
setDefaultPriceBarColor( Color.grey);
//setComputeOnClose();
}
function main() {
if (low(-3) > low(-2) && low(-2) > low(-1) && low(-1) > low(0)){
setPriceBarColor(Color.brown);
}
if (high(-3) < high(-2) && high(-2) < high(-1) && high(-1) < high(0)){
setPriceBarColor(Color.olive);
}
return null;
}
Comment