This article deals with a tool to help you test various stops when building trading systems in TradeStation’s EasyLanguage. This topic is really a part 2 of the article, “Advanced Stops and Targets Strategy Tool“. In the original article the created tool called _Stops&TargetsAdvanced is a simple strategy based on an existing TradeStation strategy called _Stops&Targets. I took this program and modified it with several other exit techniques and made it available.
The original _Stops&TargetsAdvanced strategy tool could be applied to any strategy you’re working on to aid in testing various stops. With this tool you can quickly test several popular stops without writing any code. The stops were all based upon the same time frame you were currently trading. In TradeStation lingo, that’s your data1 feed. However, what if you wanted to base your stops on a different time frame? In this article I’ve created a modified strategy tool that will help you test various stops on a different time frame.
I created a new strategy tool called _Stops Higher Time Frame which takes data from a different data stream other than the instrument you’re trading. Most of the time, this second data stream will be data2. This will allow you to generate stop values from a different time frame from the one you are trading on. For example, if you’re trading the S&P eMini on a 5-minute chart you can now test various stops on a 30-minute time frame or any other time frame. However, the data stream number is actually controlled by an input value. Thus, it’s possible to take signals from data3, data4, or whatever you like. This provides you with the flexibility of controlling exactly what data stream your stop values will be generated from.
Below is an image of the _Stops Higher Time Frame strategy applied to a chart. You can see this strategy is running parallel with another strategy called RSI2 Simple which uses a two-period RSI to generate buy signals when price closes below the value five. All exit signals are generated by the _Stops Higher Time Frame strategy.
Because the new strategy tool generates stop values from a higher time frame, you will need to have Data2 defined within your trading chart. This is simply done by importing a new symbol into your existing chart and selecting the Data2 option.
If you’re not familiar with adding a second symbol into a single chart or not sure how to use EasyLanguage to take advantage of a second data stream, I would urge you to pick up a copy of this free report, “Access Two Timeframes In EasyLanguage“.
There are a total of eight different stops you can test. They are listed below. Of course, there is nothing stopping you from adding additional stops to this strategy tool. The code is freely available for you to download and modify at the bottom of this article.
Next I will explain the input values.
I originally created this strategy tool to be used on a higher time frame. However, there is nothing stopping you from using a different instrument to trigger your exits. Since signals to exit are being generated on a different data stream that the instrument you’re trading, that means you really could use anything. For example, instead of exiting your Apple shares on a daily chart, you exit when the QQQ fall below a moving average. So, using this tool opens up the possibilities beyond different time frames.
I would suggest reviewing the first article in this series, “Advanced Stops and Targets Strategy Tool“. On that page you will find video instructions on the original stops and targets tool which will go a long way in helping you here. Overall, this is a very simple strategy tool which can be rather helpful. The _Stops Higher Time Frame strategy tool is really a framework from which you can add your own stops.
The stops strategy tool is available as a free download.
Jeff is the founder of System Trader Success - a website and mission to empowering the retail trader with the proper knowledge and tools to become a profitable trader the world of quantitative/automated trading.
Please log in again. The login page will open in a new window. After logging in you can close it and return to this page.