Backtest results FAQ

Backtest results will update or repaint thru the day while the current candle is being built up. Below are the scenarios that should be considered while validating results from the backtest history.

Example 1 (Single timeframe – Daily candles)

A scan running on a daily candle, the results shown at 10am will differ as compared to the results shown at 12pm and so on.. this is similar to how the indicators/candle would look for the current day on a candlestick chart i.e it will continue to change for the day until the market is closed.

Example 2 (Multiple timeframes – 5 minute and Daily candle)

The backtest history for such a scan would shown a bar for every 5 minutes(lowest timeframe in the scan), the backtest history would spread the daily candle for every 5 minutes i.e the values current spanshot of the daily candles is spread across all 5 minute bars in a day causing the results to change as the current version/snapshot of the daily candle updates.

Eg: If you view the backtest history on such a scan at 12pm and then re-check it at 3pm, the backtest bars since market opening i.e 9:15am, 9:20am and so on.. may show changed/updated results as the run at 3pm saw a newer version of the daily candle as of 3pm and backtest is generated on the fly(i.e the time you view the scan) unlike Alerts. In such a case to validate the true stocks present in a scan at 9:30am, would be to create alerts and validate the results of the alerts instead. As alerts run on the trading time (9:20am, 9:25am, 9:30am) unlike backtest, which is generated on the fly i.e when you view/open the scan page.

Note: This behaviour is NOT a bug, but rather how candlestick charts are shown/displayed, the candlestick chart show’s only the current version of the candle and not how it looked every second/minute in a day, which would mean the current candle on a candlestick chart would continue to change/update thru the day while the candle is incomplete

 

Difference in Backtest vs Alerts history

Assuming you have a scan that use’s daily candles and you have a alert as well for this scan that runs every 5 minutes, the results that you see during market hours in the backtest and your alert history, will change, for the current day(as the candle is still being made while the markets are open).

While calculating the backtest results, the daily candles considers values until the current time(when you are viewing the scan), whereas when the alerts are sent, example at 10:05am, the daily candles contained data only until that time, so the results of the backtest graph will change thru the day in such a case. We have already added a note for the same, stating “Backtesting considers values as per completed candles of the timeframes, this may cause the results to change for the latest candle/time as its candle is being built.”

Backtesting considers the daily candles as of the current time, rather than when the alerts were actually run example at 10:05am or 12:50pm, so the results may not match with what you see in the backtest history along with your alerts history due to the above mentioned scenario.

If you want to show the same results in the backtest, you should have similar timeframes as per your alert eg: 5 minutes instead of “latest close” in the scan, this will ensure the backtest runs with the data of the 5 minutes timeframe, which will not change for completed cnadles i.e 9:15am, 9:20am and so on.. so that the backtest can then consider the close of the 5 minutes and plot the rows accordingly.

There’s no way to have this implemented in the backtest as well in the alerts, the reason being, if you view the chart for RSI on a daily timeframe for yesterday’s candle, it show’s the value as of 3:30pm, but actually the RSI on a daily candle at 9:15am for example would differ when compared with the RSI of at 10am or 11am or 3:30pm, but the charts only show yesterday’s RSI considering the daily completed candle i.e as of 3:30pm.

The same is being applicable for “close” or the “ltp” as well, which changes for a daily candle thru the day, so the results of the current completed candle can change, similar to the results that you view in the scanner at different times during the day

We have already added a note implying the same, that the current candle’s results can change(the same is true for any candletsick chart) as well, as the indicator values are as of the latest completed candle time.