This week we have taken a major step towards making our Strategy Tester reflect real trading scenarios. Due to these updates, you may notice some changes to the results from backtesting for your existing strategies. However, we believe this upgrade to bring further accuracy when reflecting the return of your specific strategy in a live trading scenario.
This update is live in TrendSpider as of April 25th, 2020, below we will explain what exactly is going to change, and reveals our motivation behind certain changes. Enjoy!
Strategy Tester Upgrades
- Support added for backtesting short trading.
- “Trade By” option now refers to the next candle after your entry condition went true. We change the default value to “Open” which means that the strategy tester will enter the position at the Open price of the next candle after your Entry condition has been met. The reason for this change is this better represents what would have happened if you traded using the alerts.
- We have replaced the existing logic for “Stop Loss” (which used to be quirky and had a number of known issues) with a more simple yet realistic version. This function should now act pretty close to a “Stop Market” order (please remember that we’re still not backtesting on tick data so this gives a best estimation of exit).
- A number of problems for the “Take Profit” condition have been fixed making it much closer to how real Limit orders work.
- We have added a “Trailing Stop” exit condition, which technically acts just like our “Stop Loss” condition with the stop level being dynamic. This exit condition can be somewhat imprecise for the candles which are very long (longer than your exit level), but overall it’s close to reality.
- The logic behind the set of “Crossed”-based conditions that had a number of problems when applied to the Strategy Tester has been fixed.
- We have added negative conditions (“None of the following”), so you could use criteria like “X is true and Y is true and Z is not true”. This is useful when you want to identify cases when certain candlestick patterns have not evolved while all of your other conditions are true.
- The factor of time can now be added to your strategy tests (and alerts and scans, by the way) by adding the Candle Time indicator. This allows you to do things like “Buy if my technical conditions are true and it’s between 09:30 and 11:30”. We support military time format for this purpose (“1430” for 2:30pm). The time is formatted in the time zone of the respective exchange (America/New_York for all stocks and ETFs).
- You will now see a new summary (in the Tabular Data section) strategy metric, which has been highly requested: Max Drawdown. We use the following definition https://www.investopedia.com/terms/m/maximum-drawdown-mdd.asp
- Improvements made to the Performance Chart displaying all your positions by default (colored depending on outcome), add X and Y axis labels to the crosshair as well as a number of other visual improvements for this chart, making it much more trader-friendly!
- We have added a new line to the Performance Chart, which illustrates the drawdown of your strategy (across the whole data period of testing).
- We have enabled multiple “Script” conditions in both Entry and Exit sections; each of them can have a unique title, and you will see this title on your execution arrows on the chart. This is helpful for strategies with more than one entry/exit case and weeding out the trades you may not want.
Strategy Tester New Feature: Time-Based Conditions
Watch below as our CEO Dan Ushman walks through the new Candle Time Indicator and some ideas on how it can be best used.