Writing strategies
Let’s now move from indicators to strategies. A TradeStation strategy is a tool to automate rule-based trading signals, back-test them on historical data, and use them in real trades. Please bear in mind that in TradeStation, all strategies need charts on which they can be applied, and strategies use the same chart’s historical and real-time data.
In this section, we are going to learn about the following:
- How to program a basic strategy
- The order syntax
- MaxBarsBack
- How to program take profit and stop loss levels
How to program a basic strategy
In order to create a new strategy, follow these instructions:
- From the Editor’s menu, go to File | New | Strategy.
- Type the name you want to assign.
- Click OK.
- If the EasyLanguage Editor displays a default script, delete it by pressing Ctrl + A and then Ctrl + Z.
Let’s write a basic strategy to get to grips with order syntax:
Input: Length...