The Vertical Line Time Indicator [Free Code]

UPDATED: Saturday 14 November 2020
Tradestation Free Indicator: Vertical Line Time

Here’s a free TradeStation indicator that uses the new drawing object classes to plot vertical lines at any time you want.

I use the indicator to mark the 3 most important times of the trading day:

  1. Open of the Emini day session at 8:30am Chicago time (CST)
  2. Close of the 11am window for a reversal, and
  3. Close of the Emini day session at 3:15pm

You can adjust the indicator inputs to plot the 3 lines at any time or switch any of the lines off.

Here’s what the indicator looks like on my tick charts

image of tradestation free indicator that plots 3 vertical lines on an intra-day chart
Vertical Line Time indicator on an Emini Tick Chart

I’ve set up the “Vertical Line Time” indicator to plot 2 grey vertical dashed lines, one at the Open and one at the Close. In addition, I like to keep track of the reversal window – most intra-day reversals happen before 11am. So I plot a red vertical dashed line at 11am, to mark the close of that window.

The code uses the new EasyLanguage drawing object classes

image of tradestation easylanguage code snippet with drawing object classes
Screenshot of the TradeStation EasyLanguage Code

This new version of the code uses the ‘DrawVerticalLine’ method, part of the new EasyLanguage drawing object classes. This new TradeStation functionality allows you more control over drawing objects such as: horizontal lines, vertical lines, trend lines, text, rectangles and ellipses. The code snippet above shows you how to declare the drawing objects and then call multiple vertical lines.

The advantage of this new method is that vertical lines are drawn top to bottom

image of vertical line indicator showing line is plotted from top to bottom of chart
Vertical Lines are Plotted Top to Bottom of Chart

The original code for plotting vertical lines used the extended trend lines method. The disadvantage of this was that lines could only be plotted in the price bars panel. Using the new drawing objects method, these vertical lines extend from the top of the price bar panel to the bottom of any additional indicator panels. This is useful if you have signals generated in the indicator panels below and you want them to extend upwards into the price bars panel.

Here are the vertical line indicator inputs

image of the tradestation free indicator vertical line inputs
Screenshot of the Inputs

The indicator can plot 3 vertical lines (1, 2 and 3). Each line has the same inputs:

  • True/False to turn each vertical line on and off
  • Time input to trigger each vertical line, and
  • Color input to change the vertical line color

Check the bottom of this page for a full listing of all the TradeStation color inputs. To change the style and weight of the lines you’ll have to edit the code itself. The line styles you can use include: solid, dotted, dashed, dashed2 and dashed3. The line weights you can use are the integers from 0 to 6.

And here are a couple of installation tips you might need

Patrick McG. had a problem installing the indicator:

I entered the code from the website and while the vertical line is plotted on the chart, an extra panel is also created on the bottom of the chart (similar to sinewave_2 and momentum_2). Do you know how to remove this extra panel?

This is easily fixed. Just change the indicator settings by going: Format Indicator > Scaling tab > Select “Scale on Same Axis as Underlying Data”.

Martin S. had a problem with date and time stamp labels showing on all his vertical lines:

In your video the lines were clean, without time and date stamps. Applying your indicator on my end generated the lines perfectly, but included labels that may obscure the price bars as well as being visually distracting. Do you know how to turn this information off?

Not such an easy fix. You have to change the default for all vertical lines and this is how: Open any chart > Drawing > Vertical Line > Click anywhere on your chart > Right click the vertical line drawn, select Format Vertical Line > Labels > Untick ‘Show Labels’ and tick ‘Set as Default’ > OK > Right click the vertical line, select Remove Vertical Line.

Then you’ll have to re-apply the Vertical Line Time indicator to your charts.

Vertical Line Time Indicator for TradeStation & NinjaTrader

Download the TradeStation free indicator Vertical Line Time below. You can also get a NinjaTrader NinjaScript version of the original code from the Downloads section of Scott Daggett’s site here. And you can still download the original code for TradeStation using trend lines method here.


Click this link for more free indicator code.