TrendSpider provides advanced backtesting conditions for traders looking for greater control, including offsets and time-based conditions.
Offsets allow you to compare events that occurred in the past or in a sequence.
These capabilities are useful with lagging indicators such as the Ichimoku Cloud’s Chikou Span line which is set-back by 26 candles. Without an offset option, it’s impossible to create an accurate signal from these kinds of indicators because you would be comparing a past-value against a present-value. You can compare events that occurred in sequence and compare conditions which may have been met at different times in one alert.
Start by creating the Entry Condition as you would normally.
For example, if you’re using the Ichimoku Cloud, your Entry Condition might look something like this:
A warning will appear to inform you that one of the conditions you are using is a lagging or offset indicator.
In order to make your comparison accurate here, you would need to then offset the comparison indicator by the same value. You can see in the above example, we have entered 26 in the ‘candles ago’ field for the Tenkan-Sen line.
Offsets can also be used to identify events that occur in a sequence.
In the following example, we are looking for three red candles in a row, with each candle having closed lower than the one before it.
By using offsets, we are able to create a simple set of conditions that will detect this pattern for any backtest or alert.
You can see that the offsets are escalated to set-back each set of candle parameters in order to create a sequence condition that will fire only when three candles, in a row, are red, and close below the close of the previous one.
This type of sequencing can be used to create complex conditional alerts such as those used in the TD Sequential indicator.
Time-based conditions enable you to add trading conditions based on the time of day using the Candle Time Indicator.
It's easy to add time-based conditions:
- Click the Indicators button on the top toolbar.
- Search for the Candle Time indicator and add it to your chart.
- Add a Condition in the strategy tester using the Candle Time indicator.
For example, you can look for a 90-minute Hammer that occurred when Candle Time was less than a constant value of 1100. The alert would trigger if the hammer candle occurs before 11:00am EST — and not after during a given session.
These time-based conditions are helpful if you are only able to trade during certain parts of the day and want to ensure that a strategy still performs well during that time.