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 backtested history.

Example 1 (Single timeframe – Daily candles)

A scan running on a daily candle, shown at 10 am, will differ from the results displayed at 12 pm. 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)

For a scan using 2 different timeframes, i.e 5 minutes and daily candle, the backtest history would show 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.

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

Note: This behavior 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

 

49 thoughts on “Backtest results FAQ”

    1. For “1 day ago” it will be the completed candle. For the current day(i.e daily candle using “latest..”), it will change/update until the current day’s candle complete

      1. I agree for the current day results, it will change till the candles completes for the day. But when we check the previous days Back test results, the results are changing frequently. why??

        1. This shouldn’t happen, unless there’s a bigger timeframe, like weekly/monthly that covers/spreads across all the day’s from that given month/week. Please share the scan link so that i can check

          1. Hi Akash/ChartLink Team,
            I have a similar issue. For one of my scans the backtest result for 27 Jun shows a change when compared to when i had checked on 27th Jun 5 PM.
            I can share the scan link if required.

      1. For a lot of times even after the market is closed and backtested results are collected, next day either the stock gets disappeared from the previous day list but it still stays in the csv file that is downloaded. Also, have noticed stocks getting added in the list. Can you help me?

  1. Regarding in Daily Candles, I agree for the current candles ie for the current day, but when we see the previous days candles the results are changing frequently. Why???

    1. Previous candle’s shouldn’t change, unless there are other timeframes like weekly/monthly(larger time frames) which could impact the result. Please share the scan link so that I can check and provide details.

    1. This is rather a behaviour that you notice on candlestick charts as well. A better way to track/test a scan would be to ensure filters of higher timeframes like daily don’t impact/cause the results to change on a lower timeframe. Often we see queries like “Latest volume > sma..” which delays the result of a scan even if lower timeframes like 5 minute filters meet you conditions.

  2. Iam your premium customer from last 4 months. I have one query regarding backtesting that How can get the price and volume details in back test results

    1. We currently don’t have a provision to add volume/close fields in the backtest, however, we’ll plan on customizing this shortly

      1. Adding the closing price to backtest result will be a great feature and much required to fully use the backtest results. Any update by when it can be implemented?

  3. If the results changing by using bracket then what would be the
    right way to use .
    is it changing for 5min or other short periods
    share me any example for short time period that shows exact situation of the stock
    thanx

    1. A better way to track/test a scan would be to ensure filters of higher timeframes like daily don’t impact/cause the results to change on a lower timeframe. Often we see queries like “Latest volume > sma..” which delays the result of a scan even if lower timeframes like 5 minute filters meet you conditi

      1. Your back testing model is good. Are you planning to add back testing with profit and loss, using amount invested in trade, exit rule like stop loss%, target%.

  4. problem is result shown only date not exact time please guide me, i need result with time .
    awaiting your prompt reply.

  5. ( {57960} ( [0] 15 minute close > [-1] 15 minute max ( 20 , [0] 15 minute close ) and [0] 15 minute volume > [0] 15 minute sma ( volume,20 ) and ( latest high – latest low ) * 1.1 / 4 + latest close < ( latest high – latest low ) * 1.1 / 4 + latest close ) )

    i have above screener but not updated since 03/08/2021 11.45 AM

    please guide what to do to run this screener normally.

  6. For “1 day ago” it will be the completed candle. For the current day(i.e daily candle using “latest..”), it will change/update until the current day’s candle complete

  7. Suggestion: Kindly integrate success percent calculator, with pre defined objectives. Objectives can be price rise (in %) in specific time. eg- 5% profits from current close in next 13 sessions. Make this feature available to only premium customers.

  8. Sir,
    Using nifty as Indicator was an outstanding request from my side.
    Eg if going long the
    the long trade should initiate only when the nifty is above some ema or other conditional indicator.
    This will keep us in trend with the market direction.
    Thanking you

  9. Can I use my chartink filter 1 day ago, 1 month ago, 1 week ago , time frame so I solve my problem for corrent Data and back test data is not match ???????

  10. Hi Team,

    You guys rock and are already doing tremendous work.

    A suggestion :
    For better backtesting, below timeframes for parameters like Open/Close/High/Low would be helpful. These can be made available for previous day/week candles as applicable. They will have values if those many days/weeks have passed. Else it’ll have ‘NaN’ or 0.
    1. 1 day after, 2 day after …. 5 day after (These would be particularly helpful)
    2. 1 Week after …
    3. 1 month after ..

    Any support in this regard would be much appreciated.

    1. My observation & practice

      When I use Latest, Weekly, Monthly, I’m clear it is the OPEN CANDLE of the current Day, Week & Month respectively

      Thus the results will keep coming & disappearing as the the signals will be true at some moment in time and not match in some other moment in time and since these candles are working on OPEN CANDLE, my expectation is to catch the signal as soon as it happens and thereafter it may disappear if the conditions are not true anymore

      For E.g.
      at 10 AM Latest greater then Latest SMA 20 and I got the stock on my scanner
      However at 11:35 AM Latest was less then SMA 20 so this stock will disappear from my scanner

      Same is the case for weekly and Monthly
      at 10 AM on monday the Weekly is Greater then Weekly SMA 20 so I will get the stock in the scanner on Monday

      However, on Thursday, the Weekly is Lesser then Weekly SMA 20, so I the same stock will disappear from the scanner

      So, use Latest, Weekly, Monthly only when you want to catch signals on the CURRENT OPEN CANDLE
      Otherwise always use 1day before, 1 week before and 1 month before

      One e.g. of proper usage can be
      1 day ago Daily less SMA 20
      Latest crossed above SMA 20
      Now, this will ensure that the previous day candle close was below SMA20 AND current Daily Candle has crossed above 20SMA

      Note: this again can disappear from the scanner later in the day if the Current Day Candle comes below SMA 20

      Hope this helps sort out the confusion

      Thanks

      1. Thanks Sandeep. This is good practice indeed. As you mentioned, it helps if we work on finished/completed candles as we can see same results when we backtest.
        What I wanted to achieve is real backtesting where we can see how our scan results performed in x minutes/hours/days after those appeared on scan. This way I can backtest and optimize my scans further/faster.
        My earlier message is suggestion towards achieving this.
        Please add. Also hoping that Chartlink support team would take a note and guide in this regard.

  11. I need stocks for next day trading before market opens. wil this scanner provide me stocks before market open or the scanner will provide stocks while live market.

  12. Nov 1 backtest results shown lgbalakrishna and precision wire share I go to buy this share but next day lgb share did not shown in results…!!!????

  13. GUI for backtest results are not good, Please include an option to change it into table format. and also include an option to view the back results based on intervals like last one hour, last 3o minutes etc,

  14. Today I ran through a screener, In Backtest result I got a new stock in the list of the day before yesterday’s date but It was not there yesterday. Why is that so?

Leave a Reply

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