Top
ArticleCity.comArticle Categories Build Algo Trading Strategies With Tradestation

Build Algo Trading Strategies With Tradestation

Photo from Unsplash

Originally Posted On: https://kjtradingsystems.com/tradestation.html

 

What Is Tradestation Automated Software?

I’ll keep it really simple here.  Tradestation is a software tool to analyze and trade the markets (stock, futures, crypto, options, forex).  This encompasses a lot of things – chart and indicator visualization, backtesting and strategy coding, and of course automated trading.  Tradestation can be your one stop shop – market data, analysis tools and brokerage trading.

Tradestation is the leading software platform for the testing and automation of algorithmic trading strategies.  Tradestation was one of the first trading software platforms available to the public (back when it was called Omega Research).  With Tradestation you can build, test, deploy and automate just about any algo trading strategy you desire.

​Even today, Tradestation continues to lead the pack with trading software.  I have used it for over 15 years, and I still use it every single day.  Tradestation is my preferred choice.  And Tradestation is the preferred choice of my readers, too.

What Is A Tradestation Automated Trading System?

Tradestation allows you to create trading strategies.  Maybe you want to buy when the market closes at the high of the last 10 bars, for example.  You simply program that (some code examples are shown below), and then you can automate it with a few mouse clicks.  With automation, Tradestation will monitor your market, and when the strategy conditions are met, it will automatically place trades for you.  It truly is like having an assistant always ready to execute your trades!

​Algo trading can be fun and rewarding, but it is not easy.  I give you some tips for successful algo trading here.

How Much Does Tradestation Cost?

Tradestation probably costs less than you think!  This great software is included in many brokerage accounts at no cost, except for market data.  A Tradestation rep (see my rep’s contact info below) can can give all the details you need, but the costs to use this powerful software are pretty small relative to the trading systems you can create with it.

But as they say – “wait, it gets even better!”

KJ Trading Systems is proud to partner with TradeStation to offer you 100% reimbursement of the costs of the Strategy Factory Workshop through a special rebate plan.


Simply sign up for The Strategy Factory Workshop, fund a new account and receive a 20% rebate on all commission costs** – up to the full purchase price of my Strategy Factory workshop!

Yes, you read it correctly – my highly rated workshop, including one on one e-mail support from me, can be absolutely FREE after commission rebates!

Tradestation Rebate** – How It Works:

1.  Sign up and pay for one of my upcoming workshops.

2.  Click here to open a Tradestation account, with rebate already built in:
https://www.tradestation.com/promo/kjtrading/

3.  Fund the account at Tradestation. If you are already a Tradestation client, check with our Tradestation rep listed below for eligibility.

4.  Start collecting 20% commission rebates.  These will be credited to your Tradestation account once per month, automatically.

5.  Enjoy the rebates until the course fee is fully paid off!

That’s it!   I have used the rebate program myself (to buy a trading computer), and I can confirm the rebate system works exactly as advertised.

**Valid while offer lasts.  Some account exclusions may apply.  Contact Kevin for more details. Tradestation is not available in all countries – check with Tradestation to ensure you can open an account where you live.  Not all account types will qualify (please check with Tradestation first).  If you are an existing Tradestation client, please check first with our Tradestation rep (contact info below) to see what rebates, if any, you may qualify for. Does not apply to “Tradestation’s 1/2 price forever” promotion.

For more information about the reimbursement program or to get more details about TradeStation, please contact my Account Executive:

Peter Albino | Sr. Account Executive | TradeStation
120 S. Riverside Plaza, Suite 1650 | Chicago, IL 60606
Direct: (888) 735-1222 | Local: (312) 803-3860  |UK Phone (0808) 234-1049 x 3860 | Fax: (954) 652-5403
E-Mail: [email protected] | www.TradeStation.com

What Is A Tradestation Strategy?

Within the Trade Station software platform, the user can apply Tradestation strategies to a chart.  These strategies control the buying and selling of the chart instrument.  Many traders refer to these trading strategies as “algos” or “trading algorithms.”  The strategies are simply detailed rules for entering and exiting the market, and are created by the user.  Tradestation also includes many strategies with the platform, and users can purchase or find 3rd party strategies on the Internet.

The premise behind Tradestation strategies is that the user will first properly test the strategy using historical data, to ensure profitability.  This test is commonly referred to as a backtest.

It is possible to develop many Tradestation strategies that work. Yet, not every Tradestation strategy will be profitable in backtest.  Plus, not every historically successful strategy will continue to be profitable in the future.  There is a common saying in trading – “past performance is not indicative of future results.” This is applicable to all Tradestation strategies.

I have been a proud user of Tradestation for over 15 years.  Most of my Strategy Factory students also use Tradestation.  It is the best software tool to help you develop automated and algorithmic trading strategies.

​Here is a quick guide to some helpful Tradestation info, created by the folks at Tradestation: https://kjtradingsystems.com/tradestation-resources.html​

What Is Backtesting In Tradestation?

Backtesting is historically testing a strategy on market data.  Tradestation makes it easy to do.

​Imagine you have an idea for the markets.  Let’s say you notice that Gold tends to rise every Tuesday.  You’ve seen this the past month, and it has risen consistently.  So, you think this might be a nice trade to do on future Tuesdays.

But one month of results is pretty flimsy.  That’s where Tradestation can help.  Using Tradestation Easy Language, you can easily program your “buy Tuesday” strategy, apply it to a chart of Gold, and in seconds you’ll see how it has performed the past 1, 5, 10 or even 20 years!

Easy Language code:

If dayofweek(date)=1 then buy next bar at market;  //buy market open on Tuesday
If dayofweek(date)=2 then sell next bar at market;  //sell (exit) market open on Wednesday

What you have just done is backtested your strategy – you have performed an historical test of your algo, to see how it performed.

If it performed poorly over the test, you’d probably just throw it away.  Why trade something that has not worked in the past?

On the other hand, if it performed well over your test period, you may decide it is worth trading.  Now, just because it worked historically does NOT mean it will continue to perform, but if you learn a proper strategy building approach (like the approach I teach!) you can skew the odds of success in your favor a bit.

By the way, that buy Tuesday idea, sell Wednesday is not so hot for Gold:

Picture
Of course, this is a really simple example.  One feature you might want to add to that strategy is a stop loss.  Like everything else with Tradestation, you can customize it to your desires.  For instance, some people like dollar based stops, and some people like Average True Range based stops.  I actually compare the two in this article.

What Is Tradestation Easy Language?

Tradestation uses 2 languages to program strategies, Easy Language and Object Oriented Easy Language.

Most traders utilize what is called “Easy Language.”  Easy Language has been around since the inception of Tradestation, and includes many keywords, functions and capabilities today’s algo trader needs.  The best part about the language is that it truly is “easy.”  I’ll show you some example below of how simple it really is.

The other Tradestation language is called Object Oriented Easy Language (OOEL), and has high powered capabilities that many modern programmers desire.  OOEL expands the capabilities of Tradestation to new levels.

Do I Need A Large Account To Fund A Tradestation Account?

There are minimum account funding requirements, but they are pretty reasonable.  You will want to ask your Tradestation rep for details.

One thing to beware of though – if you try trading with an underfunded account, you run a high chance of getting wiped out.  It is called “Risk Of Ruin” and you need to avoid this!!

What Does An Example Tradestation Easy Language Strategy Code Look Like?

Here is how “easy” Easy Language is…

Let’s say if the market closes at a 10 bar high close, you want to buy at the market at the next bar open.  Conversely, if the market hits a 12 bar low close, you want to reverse and sell short.

Here is the Easy Language for that strategy:

if close=highest(close,10) then buy next bar at market;
if close=lowest(close,12) then sellshort next bar at market;

When you look at some other trading languages, you might have to write 10-50 lines of code to implement the same strategy.  Truly “Easy Language!”

Obviously, the example is pretty simple, and you can create algos that are a lot more complicated.  But even with those complicated algos, the programming platform commands and structure helps keep things simple for you.

The big benefit in this is that you do not have to spend time programming – you can spend time developing, building and testing strategies!

By the way, here is what the strategy above looks like for Crude Oil, which literally took me about 1 minute (with a 30 second break!) to code and create a Strategy Performance report for…Picture

Do You Have Any Free Tradestation Algo Strategies?

Yes!  If you want a free mini S&P algo – one that you could start trading today, just go here and sign up for my free newsletter.  The Easy Language code is fully disclosed, and you can analyze it, modify it or do whatever you desire!

What Is A Tradestation Indicator?

Up to this point, I’ve discussed Tradestation strategies – code that you can backtest and see performance statistics for.  Plus, it is code you can automate to place trades for you.

Tradestation also allows you to program indicators.  Indicators in Tradestation allow you to visualize patterns, averages, etc on a chart.  Here is an example of a 8 bar moving average indicator on our Crude Oil chart.Picture
​Using Tradestation indicators, you can visualize many different concepts and calculations on a chart.  This can help you understand what your strategies are doing, and can help you create better algo trading systems.

What Does An Example Tradestation Easy Language Indicator Code Look Like?

Here is the code for the moving average indicator:

Plot1(average(close,8),”Avg”);

Notice the simplicity, once again, of Easy Language!

Do You Have Any Free Tradestation Indicators?

Yes, here are some very useful indicators (ones I have on every automated chart I am running).

Can You Teach Me Tradestation Easy Language Programming

Of course!  I teach the Easy Language programming you need to know in my Strategy Factory workshop.

Here is a video which describes my approach to Easy Language instruction in my course – as of Jan 2020, Easy Language instruction and support is included at no additional cost.

​In case you are wondering about the instruction I provide, here is the first video in my Easy Language Programming Module (25 video lessons):

Can You Use Tradestation To Analyze The Markets?

Absolutely!  Transform your trading with award-winning, fully customizable charting, back-testing and analysis capabilities for stocks, options, futures, crypto and forex. And stay up to the minute with TradeStation’s research and news capabilities.Charting – Simply stunning charts — combined with the features and flexibility that serious traders need in an ever-changing market.

Strategy Back Testing and Optimization – Create, back-test and optimize your own custom trading strategy using on historical data and then analyze its performance to validate your trading ideas.

Walk Forward Optimizer – TradeStation’s new Walk Forward Optimizer aids in the mitigation of this problem by performing a set of “walk-forward” performance tests against as-yet-unseen market data, thereby simulating the unpredictability of trading a strategy under real market conditions.

OptionStation Pro – All-new OptionStation Pro is a fast, fluid and intuitive options trading platform from TradeStation. The more precisely you can visualize the options market, the more precisely you can execute. That’s why it’s packed with features like these:

Portfolio Maestro – If you trade multiple symbols and strategies, TradeStation Portfolio Maestro is a highly sophisticated tool that provides portfolio-level performance reporting, risk assessment and optimization for virtually any combination of symbols and strategies.

Research – The TradeStation Research Window, featuring Reuters fundamental data, gives you the tools to fully evaluate any equity. Check a stock’s valuation, profitability, financial strength, capitalization, and quarterly results. Plus, take a look at the industry comparison to measure the stock against its peers.

News – TradeStation’s News window gives you full-text news stories throughout the trading day – so you can stay on top of events that can influence stock prices and movements.

Can You Use Tradestation To Execute Trades?

Of course!  There are quite a few ways to enter and track both simulated and real money account trades in Tradestation.  With the software, you get professional-grade tools for placing trades – from stress-free simulated trading to the powerful, single-click Matrix trading and analysis window to fully automated trading.

Strategy and Trade Automation – With TradeStation Chart Analysis and RadarScreen, you can easily set your strategy or indicator to automate your trading thus reducing the delays that occur in discretionary manual market entry and exit. THIS IS WHAT I PRIMARILY USE AS AN ALGO TRADER.

Simulator – Test your trading ideas in real time in today’s market – without risking your own money

Matrix – Market-depth, advanced order entry, and order tracking – all in one window.

Order Bar – Trade any security – stocks, options, futures or forex – all through a single, intuitive interface

Chart Trading  – TradeStation’s new Chart Trading feature allows discretionary traders to intuitively place and edit orders directly on a chart in real time.

Quick Trade Bar – The Quick Trade Bar is a simple, fast order-entry tool allowing you to interact with the current market more efficiently.
Market Depth – Place trades directly from the Market Depth display.

OptionStation Pro – All-new OptionStation Pro is a fast, fluid and intuitive options trading platform from TradeStation. The more precisely you can visualize the options market, the more precisely you can execute. That’s why it’s packed with features like these:

Basket Trading – Place a single order for an entire basket of stocks or futures.

TradeManager – Manage your positions like the professionals do – TradeManager lets you easily view and manage your orders and positions in real time.

TradeManager Analysis – An objective and balanced view of your trading performance, helping you to view trends and identify where you are strongest.

Trade Allocation Tool – Institutional traders and investment advisors can place equity trades and view and allocate them among client accounts within TradeStation.

Can You Use Tradestation To Customize My Algo Trading?

With Easy Language (which really is easy!) and the Strategy Network, you can produce your own trading strategies.  Combined with the instruction I give you in the Strategy Factory Workshop, with Tradestation you will be on the road to developing your own way of hopefully defeating the markets!

​You can do some neat things with the power of Tradestation, including esoteric concepts like equity curve trading.  Whatever you can program, Tradestation can pretty much handle!

Tradestation Or NinjaTrader?

What’s better, Tradestation or NinjaTrader?  Well, I have owned both for many years, so I think I am in a unique position to comment on this.

First, I like Tradestation more, but a lot of that might be because I have used Tradestation so long, it just feels natural to me.  It is great for building algo strategies quickly.  NinjaTrader has its own programming language, which to me seems a lot more complicated, but it is very capable.

I heard it once described like this: “Tradestation was built by programmers for traders, and NinjaTrader was created by programmers for programmers.”

Second, Tradestation can be free with a brokerage account, if you take enough trades per month or meet other requirements.  NinjaTrader can be leased yearly or can be purchased for $1500 (at the time of writing) for a lifetime license.

Third, with Tradestation you are more or less tied to the Tradestation brokerage, not necessarily a bad thing.  There are ways to send orders to non-Tradestation brokers, which is something I do.  With NinjaTrader, there are a few brokerage choices, but you are encouraged to join Ninja’s own brokerage.

I think you can succeed in algo trading with either platform.  Many of my students use Tradestation, in part because of the terrific rebate program I have (detailed at top of page), but Ninja users can still build algo strategies using my Strategy Factory process and principles.

Just to give you a quick comparison of Tradestation versus Ninjatrader 8, here is an example from my “Entry and Exit Confessions” book.

***************************************************************************
Here is the strategy, in Tradestation Easy Language code:

Var: openloss(1000); //allowable loss per contract

if close<close[1] and (openpositionprofit<-openloss or marketposition=0) then sellshort next bar at market;
if close>close[1] and (openpositionprofit<-openloss or marketposition=0) then buy next bar at market;

***************************************************************************
Here is the same strategy, in NinaTrader8 code (translated by one of my students):

#region Using declarations
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
using System.Xml.Serialization;
using NinjaTrader.Cbi;
using NinjaTrader.Gui;
using NinjaTrader.Gui.Chart;
using NinjaTrader.Gui.SuperDom;
using NinjaTrader.Gui.Tools;
using NinjaTrader.Data;
using NinjaTrader.NinjaScript;
using NinjaTrader.Core.FloatingPoint;
using NinjaTrader.NinjaScript.Indicators;
using NinjaTrader.NinjaScript.DrawingTools;
#endregion

//This namespace holds Strategies in this folder and is required. Do not change it.
namespace NinjaTrader.NinjaScript.Strategies.KJTrading_Confessions
{
public class Entry01GoWithTheFlow : Strategy
{

protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Description = @”Entry #1 – Go With The Flow”;
Name = “Entry01GoWithTheFlow”;
Calculate = Calculate.OnBarClose;
EntriesPerDirection = 1;
EntryHandling = EntryHandling.AllEntries;
IsExitOnSessionCloseStrategy = true;
ExitOnSessionCloseSeconds = 30;
IsFillLimitOnTouch = false;
MaximumBarsLookBack = MaximumBarsLookBack.TwoHundredFiftySix;
OrderFillResolution = OrderFillResolution.Standard;
Slippage = 0;
StartBehavior = StartBehavior.WaitUntilFlat;
TimeInForce = TimeInForce.Gtc;
TraceOrders = false;
RealtimeErrorHandling = RealtimeErrorHandling.StopCancelClose;
StopTargetHandling = StopTargetHandling.PerEntryExecution;
BarsRequiredToTrade = 2;
// Disable this property for performance gains in Strategy Analyzer optimizations
// See the Help Guide for additional information
IsInstantiatedOnEachOptimizationIteration = false;
}
else if (State == State.Configure)
{
}
}

// NOTE: This code NOT OPTIMIZED to enhance readability
protected override void OnBarUpdate()
{
if (CurrentBar < BarsRequiredToTrade)
return;
// Variables
double openLoss = 100; // allowable loss per contract

if(Close[0] < Close[1] && ((Position.GetUnrealizedProfitLoss(PerformanceUnit.Currency) < -openLoss) || Position.MarketPosition == MarketPosition.Flat))
EnterShort();
if(Close[0] > Close[1] && ((Position.GetUnrealizedProfitLoss(PerformanceUnit.Currency) < -openLoss) || Position.MarketPosition == MarketPosition.Flat))
EnterLong();
}
}
}

********************************************************************************

So, the bottom line for me?  I use both!  I use Tradestation to develop strategies, I place many trades with Tradestation brokerage, BUT I also send Tradestation signals to NinjaTrader, which then pretty flawlessly sends orders to two different Ninja affiliated brokers.  And I really like this setup!

Tradestation Or MultiCharts?

I own Tradestation and MultiCharts, so again I am in a good position to compare them.  I should first mention I use them both everyday in live automated algo trading.

Next to Tradestation, MultiCharts is the 2nd most popular platform amongst my traders and followers.

First, Tradestation and MultiCharts languages are almost the same.  Tradestation has Easy Language, MultiCharts has Power Language, and both are very compatible.  They also both have higher level programming capabilities (OOEL and .NET).

Second, Tradestation can be free with a brokerage account, if you take enough trades per month or meet other requirements.  MultiCharts can be purchased for $1500 (at the time of writing) for a lifetime license.

Third, with Tradestation you are more or less tied to the Tradestation brokerage, not necessarily a bad thing.  There are ways to send orders to non-Tradestation brokers, which is something I do.  With MultiCharts, there are a ton more brokerage choices.  That is a nice thing!

Fourth, market data is built into Tradestation, where you need to subscribe to a data service with MultiCharts.

Finally, Tradestation is not available in Canada, parts of China and some other countries.  MultiCharts is available in most of these “restricted” areas.

So, the final answer for me – Tradestation or MultiCharts – is both!  Tradestation is my workhorse for sure, but I do use MultiCharts as a backup.

No Comments

Sorry, the comment form is closed at this time.