How to Program Custom Trading Strategies in ThinkOrSwim
I’ve had several questions about ThinkOrSwim strategies, so I wanted to do a post on how to program custom trading strategies in ThinkOrSwim. Since I’ve been programming a lot of strategies lately myself, yesterday I decided to do a video for the official ThinkOrSwim.net YouTube channel where I go through the process of creating and testing a new, built-from-scratch strategy in ThinkOrSwim. It shows where to go to create and edit strategies, how to add and reference indicators, how to add user-customizable inputs, and then how to implement the strategy and backtest it on a specific chart.
It’s really important to quantify and monitor your trading edge, whether you’re trading discretionary setups or mechanical systems. ThinkOrSwim allows you to test strategies in mechanical form, which can later be applied to either discretionary or automated trading systems. You can take the edges you identify quantitatively with ThinkOrSwim, and apply them to a discretionary trading strategy that takes advantage of even more precise entries and exits than what an automated system might provide. And I think, one way or another, whether edges are manually identified over time through trial and error and detailed journaling, or automatically identified with systemized backtesting, quantitative edges are an essential part of all types of trading.
So with that in mind, here’s my most recent video on how to program custom trading strategies in ThinkOrSwim and run backtests on them:
I’ve recently posted several strategy scripts to the website that identify quantifiable edges for my fellow traders. These ThinkOrSwim trading strategies can be traded standalone, or tweaked further and customized to fit an individual’s trading style. They can either be used to setup automated trading systems in other platforms, or traded manually within ThinkOrSwim and improved with price action trading principles. My most recent strategies are all listed under the strategies category on the site, and here’s a quick reference list:
Most of these strategies come straight out of Larry Connors and Cesar Alvarez’s book “Short Term Trading Strategies that Work,” and are specifically for trading the SPY, SPX, or ES futures. But these ThinkOrSwim trading strategies may also provide edges on other instruments, and you can test them on whatever symbols you like to trade, to see if they can be applied profitably there as well.
I hope these strategies are as intriguing to you as they were to me, and hopefully they will provide you a more quantifiable way to determine your edge in the market as well.
The short SPY trading strategy comes straight out of Larry Connors’ & Cesar Alvarez’s book called “Short Term Trading Strategies that Work” and it’s the one strategy that they present for shorting. I’ve really been enjoying programming and testing some of the ideas presented in their book — a lot of which seem to have some merit — so I wanted to go ahead and share some of the work I’ve been doing with my readers.
The default settings that the trading strategy comes with are straight out of the book on page 106, and seem to perform very well in my own tests, but they can be easily customized and tested with different values using the strategy properties menu. This is useful for quickly backtesting the strategy with different instruments, time frames, and market conditions.
The original strategy in the book calls for no stop to be used, but I went ahead and added the option for a percentage based stop to make the strategy more applicable to different trading styles and time frames.
Results from thinkorswim strategy backtests can easily be exported and analyzed further in Excel or other spreadsheet programs simply by right-clicking on a strategy signal on the chart and clicking “Export” in the popup menu.
The Authors’ Stats:
Win Rate: 68.75%
# Trades: 16
Points gained: 169.91
Avg. Holding Time: under 5 days
What You Get
Short S&P strategy file for thinkorswim from page 106 of the book
All parameters are customizable in the properties menu
Option to use a stop or not to use a stop, and to set the size in %
Why You Want It
The high win/loss ratio on the SPY and other instruments makes it an easy strategy to trade from a psychological standpoint
Includes the option to add a stop, which makes the strategy even more easy to trade
Ability to quantitatively backtest the strategy on multiple instruments, timeframes, and conditions affords more peace of mind and encourages traders to fully trust in their system.
How it Works
The strategy is straightforward: just make sure the market is under the 200 day sma, and then if the market makes 4 new higher closes, sell the market and cover once it drops below its 5 day sma. Traders can optionally add a percentage based stop to the strategy (simple option in the properties menu) and customize how big the percentage stop should be.
Josiah is a stock trader, thinkScript programmer, real estate investor, and budding mountaineer. He's also rumored to be an in-shower opera singer. Josiah & his family live in Nashville, TN. Twitter | YouTube
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.