setPriceBarColor() Utility Functions
This function sets price bar color for the current bar. Used in conjunction with setColorPriceBars() and setDefaultPriceBarColor().
Syntax
Parameters
setPriceBarColor( color [, wickColor] [, bThin] [, bHollow] )
Parameters
Parameter: | Description: | Default: |
color | the color to use | n/a |
wickColor | [Optional] The color for the candle wick | n/a |
bThin | [Optional] Set thin wick (true or false) | n/a |
bHollow | [Optional] Set hollow candle (true or false) | n/a |
Notes
Code Examples
See Also
Starting with version 11 the most current realtime bar will not be colored if this function is used in conjunction with setComputeOnClose().
Code Examples
function main(){ var myVar; ...... if(myVar > 0){ setPriceBarColor(Color.green); } else{ setPriceBarColor(Color.red, 0); } return (myVar); }
See Also
setDefaultPriceBarColor()
setColorPriceBars()