Strategies
Building strategies is what Trade Strategist is all about. The following sections describe
how you create, write and remove strategies from your Trade Strategist document.
Adding a Strategy
- Open or create a new Trade Strategist document by selecting File > Open... or File > New.
- Click on the "Add Strategy" toolbar item, or select the menu item Strategy > Add Strategy.... You should see a "Strategy Inspector" window appear.
- Fill in the strategy name in the field provided.
- Proceed with writing the strategy as described in the following sections.
Editing a Strategy
- To edit an existing strategy, double click the strategy in the strategies table of the main window, or select the strategy and choose the menu item Strategy > Edit Selected Strategy....
Removing a Strategy
- To remove one or more existing strategies, select the strategies in the strategies table of the main window.
- You then have three possibilities: press the backspace key, click on the "Remove Strategies" toolbar item, or select the menu item Strategy > Remove Selected Strategies. Note that the toolbar item may not be on your toolbar by default. You can add it by customizing the toolbar.
- To get back the deleted strategies, simply use undo.
Adding a Signal Rule
- Open the Strategy Inspector for a strategy by double clicking in the strategies table.
- Select the "Signal Rules" tab in the Strategy Inspector window.
- Click on the "Add Signal Rule" toolbar item, or select the Strategy > Add Signal Rule menu item
- If the new signal rule is not at the desired position in the list, simply drag it to where you want it.
Editing a Signal Rule
- Open the Strategy Inspector window, and select the "Signal Rules" tab.
- Add a new signal rule, or click on an existing rule in the Signal Rules table.
- Enter the expression for the signal rule in the editor under the list of rules. This is the expression which must evaluate to true if the signal is to be generated.
- Select an order type for the signal rule from the popup button underneath. "Market Open" stands for a market order carried out at the open of trading and "Market Close" is a market order at the close of trading. The other types are self explanatory.
- If you selected "Limit Order" or "Stop Order", you need to indicate what expression should be used for the price of the order. You can choose one of several standard price expressions from the "Order Price" popup button, or you can choose the "Custom..." option. If you opt for the latter, you need to enter an expression underneath that evaluates to a floating-point number, which will be used as the price of the order. You can use any valid expression that you choose. For example, you could enter "close(-2)" to indicate the price should be set to the close price two days ago.
- If the signal rule is not in the desired position in the list of signal rules, drag it to a new position.
Removing a Signal Rule
- In the Strategy Inspector window, select the signal rule you would like to remove.
- Either press backspace, click on the "Remove Signal Rule" toolbar item, or select Strategy > Remove Selected Signal Rule menu item.
- To get back the removed signal rules, simply undo.
Reordering Signal Rules
- Open the Strategy Inspector window by double clicking a strategy.
- Click on the "Signal Rules" tab.
- Drag-and-drop the signal rules in the signal rules table into the order you desire.
Checking a Strategy
When you have written the signal rules for a strategy, or at least some of them, you
may want to check that you have not made any mistakes. You can check certain things
about your strategy, though not all, as described here. Even if your strategy passes
the check, things could still go wrong when you try to use it in a simulation. This is
because Trade Strategist can only check certain things when the strategy is actually
used in a given context.
- Open the Strategy Inspector window by double clicking a strategy.
- Click on the "Check Strategy" toolbar item, or select the Strategy > Check Strategy menu item. You should see a drawer with check results appear.
- If there are problems reported in the drawer, correct them, and re-check.
- Close the drawer if desired by selecting the "Toggle Check Drawer" toolbar item. You can also open it again with this toolbar item.
Keeping Notes
Trade Strategist allows you to keep notes for each strategy that you make. This can be useful
if you forget what the strategy is about, or want to give the strategy to someone else.
- Open the Strategy Inspector window by double clicking a strategy.
- Click on the "Notes" tab.
- Type your notes in the "Notes" editor.
Writing a Description
Trade Strategist allows you to write a short description of each strategy that you create.
This description is displayed in the main simulation window whenever a strategy is selected.
It can be used as a brief reminder of what a strategy is about, for yourself in the future,
or for anyone that you give your strategy to.
- Open the Strategy Inspector window by double clicking a strategy.
- Click on the "Notes" tab.
- Type your description in the "Description" editor. You should see it change in the simulation window as you type.