Automated Trading Using SMA Crossover on ThinkorSwim

Education


Introduction

Today, we will be exploring the process of automating a portion of our trading using the ThinkorSwim platform. Many traders may not realize that it is possible to create a trade based on a study parameter or a crossover. In this video, we will focus on a simple example of creating an order to buy a stock when there is a golden cross and sell the stock when there is a death cross.

Setting Up the Buy Order

To begin, we will build our buy ticket by clicking on the last traded price for the stock we are interested in (in this case, Apple) and selecting the "Buy" button. To add the study condition, we click on the settings icon on the right-hand side of the order ticket. This will open a pop-up window where we can add our conditions.

In the conditions section, we click on the box below the word "Symbol" to load the symbol of the stock we are trading (e.g., Apple). Next, we select "Study" as the method for our order. We can then click on the edit option to add our study parameter.

In this example, we want to buy the stock when the 50-day moving average crosses above the 200-day moving average (golden cross). We select the simple moving average study and adjust the length to 50. Then, we add another condition for the 200-day moving average and adjust the length to 200. Once we save our parameters, we can switch the order type to market order.

Setting Up the Sell Order

To set up the sell order, we switch from a single order to a first trigger sequence. This means that if the first order (buy order) fills, we want to activate a second order (sell order). We can create the sell order by right-clicking on the green line or clicking on the current price and selecting "Sell".

Similar to the buy order, we add our study conditions for the 50-day and 200-day moving averages, but this time we are looking for the 50-day moving average to cross below the 200-day moving average (death cross). We switch the order type to market order.

Once we have both the buy and sell orders set up, we can save and place the orders. We can view our open orders on the chart and monitor them on the ThinkorSwim platform.

Summary

In summary, ThinkorSwim provides the capability to automate trading based on study parameters or crossovers. In this example, we created an order to buy a stock when there is a golden cross (50-day moving average crossing above the 200-day moving average) and sell the stock when there is a death cross (50-day moving average crossing below the 200-day moving average). By setting up these study conditions and specifying market orders, we can automate parts of our trading strategy.

Keywords

Automated trading, ThinkorSwim, SMA crossover, study parameter, golden cross, death cross, market order.

FAQ

  • How does the automated trading feature on ThinkorSwim work?
  • Can I use any study or combination of studies to activate a trade?
  • What is a golden cross and a death cross in trading?
  • Can I specify the length of moving averages in ThinkorSwim?
  • Is it possible to automate the entire trading process using ThinkorSwim?