Advertisements
ads banner

Text EasyLanguage Tutorial – How to (Auto) Add Text with Custom Indicator

Do you want to know how to add text EasyLanguage on the chart with TradeStation automatically?

This EasyLanguage tutorial is made for you! Follow step by step what we will show you and you will be able to create a beautiful indicator that will automatically insert the text on your graphics.

To do this we will use the reserved word in easylanguage “Test_New”.

Advertisements
ads banner

The indicator will follow the trend of a 14-period RSI and will signal the OverBought and OverSold areas.

Insert the Lenght for the RSI calculation – 14 is the standard value

The RSI_Value contains the RSI calculations

This is the calculation formula for the RSI – 14 periods

The condition is simple; when RSI is under 30 the indicator adds the text

Value1 is the variable that contains the text
Text_New is the EasyLanguage Reserved Word:

Value1 = Text_New(BarDate, BarTime, Price, “MyText”)

In this example we’re using:
BarDate = Date — Actual date
BarTime = Time — Actual time
Price = Low — Add text at Low Price for oversold and at High Price for OverBought

 

Text_SetColor(Text_ID, Color)

With the Reserved Word Text_SetColor you could choose the color.

Text_SetStyle(Text_ID, Horiz, Vert)

With the Reserved Word Text_SetStyle you could choose the horizontal and vertical placement settings for the text object.

Horizontal:
0 = To the right of the bar
1 = To the left of the bar
2 = To the center of the bar

Vertical:
0 = Beneath the price
1 = Above the price
2 = Centered on the price




MORE FREE EASYLANGUAGE TUTORIALS HERE

How to avoid unnecessary text repetitions

The RSI indicator can remain overbought or oversold for numerous bars. The indicator will then add the text in each bar, creating a useless repetition.

To avoid this problem we will have to create an additional filter. For example, we will add the text only when the RSI changes from normal to oversold or overbought.

unnecessary text EasyLanguage repetions in tradestation
tradestation add text auto indicator auto

With these modifications, the text is added only when the change passes from normal to oversold or overbought.

 

Advertisements
ads banner

More from Finance Strategy System




- Advertisement -

Related Articles