Automated Trading Systems


Some Very Important Details When Constructing Your Own Fully Automated Trading Systems

The following article was taken from an exchange of emails with several clients. I felt this part of the dialog would be very helpful for our viewers. included below are some of the most important aspects to be aware of when constructing fully Automated Trading Systems.

There is no “Set it and forget it”

It’s important that you understand that an automated trading system should NEVER be left unattended. Many **events can take place while the system is running that require human intervention.
So please evaluate this first of all. You will need to be present while the system is placing trades on your account. If you had planned on having the system trade while you are sleeping, or away at work…. STOP NOW. Do not proceed any further with your plans.

 

Trading System Platform Selection

The second most important detail. Thinkorswim is not fit for this purpose. You will need to use a platform that supports automated trading systems. Such as TradeStation, Sierra Chart, Interactive Brokers, eSingal, NinjaTrader, or amibroker (not a complete list).

Stock Options and/or Options on Futures

At this time I am not aware of any platform available to retail traders that can select and trade any options contracts based on the signals generated in the underlying stock or futures contract. Commercial platforms do exist for this purpose. Expect to pay a great deal of money for access to any platform that does support automated trading of options contracts.
Edit: In response to this section on options a client has asked for clarification. Included here is the dialog from that email:
 Does it mean the code you write is not expected to work for stock options?
Let’s take the TradeStation platform as our use-case.
The automated trading system will run based on an open chart on the platform. Whatever ticker symbol is loaded onto the chart, that is the symbol the system will trade. So if we chart the symbol of AAPL, the system will buy and sell shares of AAPL. It will NOT be able to buy and sell options on AAPL. If you wanted the system to trade a single option contract, the OPRA code of that single option would need to be used as the ticker symbol for the chart. The chart would then display trading activity for that specific option contract. Any buy/sell signals generated on that chart would then be used to buy and sell that specific option contract. Therefore, an automated trading system on TradeStation will NOT be able to chart AAPL and then pick and choose from a list of options contracts and expirations to trade.
**events which will require human intervention (not a complete list):
  1. Computer experiences loss of power and/or an interruption in its connection to the internet
  2. Computer crashes while the system is running
  3. The broker rejects an order
  4. The broker suspends or otherwise interrupts the data fee
  5. The exchange suspends trading in the selected financial instrument

 

User Intervention for Automated Trading Systems

If at any time during the course of normal operation any of these **events occur. You will need to be prepared to do the following (not a complete list):
  1. Shut down the automated trading system to prevent new orders being generated
  2. Cancel all open orders
  3. Flatten all existing positions
  4. Restart the trading system once you have a clear slate

Backtesting and Walk-Forward Analysis

Perhaps the greatest use of any automated trading system is the ability to perform a proper backtest of the strategy. Following the backtesting phase, the second most useful aspect of an automated trading system is to perform the walk-forward analysis.
This is where you find out if profits generated during the backtest on historical data is reproducible when trading a live market. Walk-forward analysis is done by running the automated trading system on a simulated trading account during live market hours. (NOT on a live “real money” account).

Automated Trading Systems: Never a simple process

Writing the code for any automated trading system is never a simple process. It is similar to writing a chart study, but there are many additional items that need to be accounted for.
Just one example, the code must account for slippage, when stop or market orders are used for entries and/or exits. Trailing stops can be challenging depending on how complex the exit rules are. Profit targets also present a challenge, especially if they are based on the entry price.

 

Conclusion

Automated Trading Systems can be a very useful tool for traders that are already profitable in their trading. It is dangerous to think that an automated trading system will make you profitable when you haven’t arrived at that point already. They can do far more damage than trading manually, so focus on being profitable first. Before getting started, you should carefully evaluate whether you can increase your current profitability through the use of an automated trading system. Remember that an automated trading system still requires that you be present, in front of the computer. Because at some point the excrement will hit the proverbial fan, this WILL eventually happen. So you must be there to pick up the pieces and reset everything to a clean slate before turning the system on again.

Recommended for further study

Thinkorswim Strategies Complex Stop Management

Strategies Winning Percent Versus Risk Reward

TradeStation Strategy Guide

 

__ Support our free content by making a purchase below. Thanks! __

Comments Drive Content of Future Posts: