There is a function setBarBgColor( color [, series] [, yMin] [, yMax] )
to set the background color between ymax and ymin. However it only works on the bar on which the main is being executed.
How can I paint the background color between ymin and ymax for some old bars. For example, on 60min chart, I would like to calculate the overnight high and low (denoted as OH and OL) and paint the background of the overnight bars between OH and OL to lightgrey. Because OH and OL are finalized only when all overnight bars have been processed, therefore it seems I have to use setBar(Bar.BgColor, barindex, value) to set the background color of old bars. However setBar does not accept ymax and ymin as the y-axis parameters. If I don't want the script being self-reloaded once so that it can calculate OH and OL in the first run and paint the background in the second run, is there existing efs function similar to setBarBgColor( color [, series] [, yMin] [, yMax] ) but working on older bars?
- Clearpicks
to set the background color between ymax and ymin. However it only works on the bar on which the main is being executed.
How can I paint the background color between ymin and ymax for some old bars. For example, on 60min chart, I would like to calculate the overnight high and low (denoted as OH and OL) and paint the background of the overnight bars between OH and OL to lightgrey. Because OH and OL are finalized only when all overnight bars have been processed, therefore it seems I have to use setBar(Bar.BgColor, barindex, value) to set the background color of old bars. However setBar does not accept ymax and ymin as the y-axis parameters. If I don't want the script being self-reloaded once so that it can calculate OH and OL in the first run and paint the background in the second run, is there existing efs function similar to setBarBgColor( color [, series] [, yMin] [, yMax] ) but working on older bars?
- Clearpicks
Comment