Seer logo - advanced backtesting for stock, futures and forex trading systems using using technical analysis indicators, charts, money management and position sizing
Functions by Category Functions by Alphabetical list

SetBarColor ([Bar]/[Column],[color])

Usable in an seer chart object

This function sets the color for a specific bar. You can set specific bars during iteration, or you can pass in a column. Both examples below do the same thing.

The bar color is only set for plots using the function PlotPrice .

Color can be any color constant, or result from the color function.

Example:

#Color the price bars when the RSI is above 70 or below 30. 
PlotPrice('Bar'); 
foreach my $c (BarsBack..NumberOfBars) {
  #Set the bar color to orange for all bars 
  #where the 14 bar RSI is above 70 
  SetBarColor($c,Orange) if Value(RSI(14),$c)>70; 
  #Set the bar color to pink for all bars 
  #where the 14 bar RSI is below 30 
  SetBarColor($c,Pink) if Value(RSI(14),$c)<30; 
  }

#Color the price bars when the RSI is above 70 or below 30. 
PlotPrice('Bar'); 
SetBarColor(If(RSI(14)>70,1,0),Orange);
SetBarColor(If(RSI(14)<30,1,0),Pink); 

Related functions:

PlotPrice , PlotColumn , PlotFixedLine , PlotSetScale , PlotLine , PlotText , PlotFixedLine , PlotCandlestick , PlotTellTale , PlotPAC , PlotBand , PlotGrid , DrawLine , DrawText , DrawRectangle , DrawFilledRectangle , SetChartOption , Color , Dashes , Dots , Vline , SetBarBackground , ChartInputSlider , ChartInputCombobox

© 2008 seer trading systems ltd
feedback FAQ legal privacy