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 of all, in the TradeStation EasyLanguage Editor Choose New – PaintBar
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);
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);
More from Finance Strategy System
Why should you use the Hull Moving Average? This article shows you the pros and cons of this fantastic indicator and how to use it with graphical examples. There are many...
Download for free the MTF MACD MT4 indicator and learn how to use it. This fantastic indicator will show the trend of 4 different time frames. The MACD is an excellent trend...