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.

3 thoughts on “Difference in Backtest vs Alerts history”

  1. It means if I use 5 min time frame in screener and I select 5 min in alert it shows equal result in back test and alert… am i right?

    1. Yes, correct. As the 5 minute candles completes every 5 minutes, so the results of the past completed 5 minute candles wouldn’t change

    2. There are chances that the backtest results may not match with the alerts history if multiple timeframes are used in the scan, please read our for more details: https://chartink.com/articles/backtest/bactesting-faq/
      Hope this helps on back-testing:

      It will show the previous days/ minutes results for your scan without the need for you to modify the scan. Back-testing will not give alerts. It is only to analyze/ view stocks previously triggered by your scans.  If you click on any of the bars on the graph, it will show the list of stocks that triggered as per the scan previously. 

      Back-test data will show data for the lowest candle time frame in your scan. If lowest time frame is 1 minute, it will show results for last 1 minutes. If its on daily candle it will show data for past 6 months. We show results for the past 150 bars  in our backtest section, these 150 candles could be of any timeframe, depending on the lowest timeframe in your scan, so for 5 minutes for example, you would get 2 days, for 1 minute, half a day and so on. 
      If you have the alert frequency of 5 minutes on a 1 hour candle scan, the alert results will update every 5 minutes and so will the backtest results(if you open the site and view the graph every 5 minutes), the difference is that the alert keeps a history of all your stocks triggered every 5 minutes i.e at 9:20am, 9:25am and so on via the alert history page,, whereas the backtest graph doesn’t keep any history as such, it will show the results only as of the candle completion time i.e 10:15am. so its not necessary that the backtest will show all the stocks that were triggered every 5 minutes as your alert show’s.

      Alerts is a premium feature that would allow you to do this, it keeps a track of all your stocks that met the condition every 5 minutes so that you don’t need to keep a track of them manually in the scanner page or the backtesting graph. The backtest is a dynamic graph that would update/change as your 1 hour candle is changing.

Leave a Reply

Your email address will not be published. Required fields are marked *