We'd love to meet you and offer you the perfect solution

In this tutorial we will show you how to create a PaintBar indicator with EasyLanguage. This type of indicator is very useful, and at the same time the procedure to create it is very simple.

As you will know, in our examples and tutorials we often use the RSI indicator. So also, in this case, we will create a PaintBar indicator based on the relative strength index.

First af all, in the TradeStation EasyLanguage Editor Choose New - PaintBar

Paint Bar Chart TradeStation example 1

The reserved word to use the PaintBar in EasyLanguage is PlotPaintBar and has the following formula:

PlotPaintBar( BarHigh, BarLow [, BarOpen [, BarClose [, "<PlotName>"[, ForeColor[, Default[, Width]]]]]] );


Variables: Top(0), Bottom(0);

Top = BollingerBand(Close, 14, 2);
Bottom = BollingerBand(Close, 14, -2);

If ADX(14) < 25 Then
PlotPaintBar(Top, Bottom, "Area", Blue);


How PaintBar Algorithm works

To better understand how the algorithm that creates the PaintBars works, we will try to make a small change to the code.

We will increase the high by 0.05% and reduce the low by 0.05%. As you can see the algorithm modifies not only the color but also the body of the candle.

Example of EasyLanguage Code:

High_PB = High + (High*0.05);
Low_PB = Low - (Low*0.05);

Paint Bar Chart TradeStation example 2

Start To Learn EasyLanguage Today​ !!

We offer individual coaching program

First session is free

Your Information is safe with us. We respect your privacy! We will never share your data with anyone else.​

Paint Bar Chart TradeStation example 3

Another example of EasyLanguge Code could be to color candles based on the trend of the last five days. If in the last five days the price has gone up the candles will be green. Otherwise they will be red. It can be an alternative and exciting way to display a candlestick chart.


Variables: Top(0), Bottom(0);

Top = BollingerBand(Close, 14, 2);
Bottom = BollingerBand(Close, 14, -2);

If ADX(14) < 25 Then
PlotPaintBar(Top, Bottom, "Area", Blue);


Finally, we can use this PaintBar EasyLanguage indicator to draw an area in the chart.


Variables: Top(0), Bottom(0);

Top = BollingerBand(Close, 14, 2);
Bottom = BollingerBand(Close, 14, -2);

If ADX(14) < 25 Then
PlotPaintBar(Top, Bottom, "Area", Blue);



Leave a Reply