HOW TO CREATE – AUTO TRENDLINES INDICATOR – TRADESTATION
01-EasyLanguage-Trendlines-TradeStation-Multicharts

Share This Post

Share on facebook
Share on linkedin
Share on twitter
Share on email

In this tutorial, we’ll create an Indicator that automatically draws TrendLines in TradeStation.

Firstly, we calculate the maximum and the minimum of the last X candles or days.

This is only an example, you can create your trendline indicator simply replacing the HighestHigh and LowestLow value.

In EasyLanguage is possible to determine the Min-Max with two functions:

HighestHigh = Highest(High,BackHigh);
LowestLow = Lowest(Low,BackLow);

Drawing TrendLines by hand could be a boring activity. With TradeStation, you can create a Trendline Indicator that automated the process.

TLID = TL_New(StartDate, StartTime, StartValue, EndDate, EndTime, EndValue);

TLID is a variable that contains the TrendLine ID. This is a unique identifier and is useful if you will draw many trendlines in your chart.

TL_New is a reserved word that uses six parameters to draw a new trendline.

Inputs:
BackHigh (20),
BackLow (20);

Vars:
TL_HIGH(1),
TL_LOW(2),
HighestHigh(0),
LowestLow(0);

HighestHigh = Highest(High,BackHigh);
LowestLow = Lowest(Low,BackLow);

If lastbaronchart or lastbaronchartEX then

Begin
TL_HIGH = TL_New(Date[BackHigh], Time[BackHigh], HighestHigh, Date, Time, HighestHigh);

TL_LOW = TL_New(Date[BackHigh], Time[BackHigh], LowestLow, Date, Time, LowestLow);

End;

01-Trendlines-TradeStation-Multicharts

TrendLine Indicator Tradestation

Very simple! Do you like to personalize the TrendLines?

You can choose the color, the size, and the style.

TradeStation EasyLanguage TrendLine Indicator Code:

Inputs:
BackHigh (20),
BackLow (20),
TL_HIGH_COLOR(DarkGreen),
TL_LOW_COLOR(DarkRed),
TL_HIGH_SIZE(2),
TL_LOW_SIZE(2),
TL_HIGH_STYLE(2),
TL_LOW_STYLE(2);

Vars:
TL_HIGH(1),
TL_LOW(2),
HighestHigh(0),
LowestLow(0),
TimeStorage(0);

HighestHigh = Highest(High,BackHigh);
LowestLow = Lowest(Low,BackLow);

If lastbaronchart or lastbaronchartEX then

UpdateTrendLine

Begin

TL_HIGH = TL_New(Date[BackHigh], Time[BackHigh], HighestHigh, Date, Time, HighestHigh);
TL_SetColor(TL_HIGH,TL_HIGH_COLOR);
TL_SetSize(TL_HIGH,TL_HIGH_SIZE);
TL_SetStyle(TL_HIGH,TL_HIGH_STYLE);

TL_LOW = TL_New(Date[BackHigh], Time[BackHigh], LowestLow, Date, Time, LowestLow);
TL_SetColor(TL_LOW,TL_LOW_COLOR);
TL_SetSize(TL_LOW,TL_LOW_SIZE);
TL_SetStyle(TL_LOW,TL_LOW_STYLE);
End;

01-EasyLanguage-Trendlines-TradeStation-Multicharts

With the TradeStation TrendLine Indicator in Easyanguage you have to refresh the chart (Ctrl+R) when you want to redraw the trendlines.

 

Resources:

INVESTOPEDIA

 

MORE FROM FINANCE STRATEGY SYSTEM

ATR CALCULATOR for STOP LOSS INDICATOR

Bollinger Bands Indicator Volatility Breakout and Squeeze

SMOOTHING RSI INDICATOR with EMA

Market Correlation | Stock Market – Bond – Commodities

BOLLINGER BANDS – BANDWIDTH

NAAIM Exposure Index || What is and How Use It

The VIX Essential Tutorial || S&P500 Implied Volatility Index

Breakout and Pullback in Technical Analysis

Parabolic SAR Indicator – Technical Analysis Tutorial

Gold Trading Strategy with Stochastic Indicator

Subscribe To Our Newsletter

Get updates and learn from the best

Recent Posts

Eurusd Chart Technical Analysis || 2020

In this page, we study Eurusd using a lot of technical analysis indicators and strategies. Eurusd Analysis using RSI Indicator Today we analyze the Eurusd

Donate

My name is Luca. I grew up in Italy. I have a degree in law and I’m an independent trader since 2007. 

I’m a systematic trader and sometimes, I trade using options strategies with US ETFs and Stocks.

I have built hundreds of automated trading systems and indicators for TradeStation, MultiCharts and MetaTrader.

I started this blog in 2017 to share what I learned in the financial market.

Follow us on :-

WhatsApp us whatsapp