setPriceBarColor()

ICE Data Services -

setPriceBarColor()  Utility Functions 


This function sets price bar color for the current bar. Used in conjunction with setColorPriceBars() and setDefaultPriceBarColor().

 
Syntax

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

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()