Functions by Category Functions by Alphabetical list
SetBarBackground ([Bar]/[Column],[color]) |  |
This function sets the color of the background for a spefic bar. You can set specific bars during iteration, or you can pass in a column. Color can be any color constant, or result from the color function. Example: SetBarBackground(90,Blue); #Set bar 90 background color to blue.
#This example sets the first 30 bar's background color
SetChartOption('key',0);
PlotPrice('Candle');
for my $c (BarsBack+1..BarsBack+10) {
SetBarBackground($c,Ppurple); #set the first 10 bars to pastel purple
}
for my $c (BarsBack+11..BarsBack+20) {
SetBarBackground($c,Pblue); #set the next 10 bars to pastel blue
}
for my $c (BarsBack+21..BarsBack+30) {
SetBarBackground($c,Pgreen);#set the next 10 bars to pastel green
}
#Set the bar background to pastel green if the close is above the 50 bar moving average
SetBarBackground(If(Close>EMA(Close,50),1,0),Pgreen);
Related functions: PlotPrice , PlotColumn , PlotFixedLine , PlotSetScale , PlotLine , PlotText , PlotFixedLine , PlotCandlestick , PlotTellTale , PlotPAC , PlotBand , PlotGrid , DrawLine , DrawText , DrawRectangle , DrawFilledRectangle , SetChartOption , Color , Dashes , Dots , Vline , SetBarColor , ChartInputSlider , ChartInputCombobox
|