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

 

122 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.

        2. I have the same issue,back testing downloaded files are slightly changes w.r.t days,,please knowledge

          1. dear Akash

            Are u going to improve back test by providing closing scan rate in .cvs file.

            If possible also provide rate of 2nd candle , 3rd candle , 5th candlle , rate of 10th candle 20th candle.

            I m waiting for black test history tabulation with rates since long long….

            Or

            In case of atlas accumulate scanned / filtered data history to check past alerts , backrest history .

            I m sure this feature would improve profitability of your premium subscribers .

            Pl do needful.

            For detail contact me on 9374978934

            Thanks & reg

        3. Even I am facing the same issue, when we check the previous days Back test results, the results are changing frequently. why??

      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. Hello,

          The reason you see this is because your scan is using the 1-hour and daily timeframes, and you are running the scan in between the day. This will cause the scan to show you results based on an incomplete daily candle. The backtest results will continue to be repainted/updated until the daily candle completes its formation.

    2. dear akash some stocks are shown in backtest which do not appear in alert. please resolve this issue so many are facing this problem. i am chartink subscriber.

    3. To chartink.com team, you are doing great, only one suggestion from me, can you put a code, that will freeze results of scanner for the time frame when next candle starts. So when we do back testing of any scanner, do we get realistic results.

      1. Hello,

        Thank you for your feedback and suggestion. We will surely share this with our team and will keep you posted if there is any development on this.

        We understand and appreciate you bringing this to our attention. Currently, we are in the process of exploring the possibility of adding this & others soon. We appreciate your patience as we improve and enhance our service for our users.
        ​​​​​​​

          1. Hello,

            Kindly be advised that we do not offer any suggestions regarding stocks on this platform. However, in our premium package, you have the option to create alerts for your scanning tactics. Once the stock meets all of your scanning criteria and alert specifications, you will receive a notification.

          2. Dear team thanks for your reply. Why stocks are changing day by day in backtest results. For eg. While seeing backtest results by yesterday for May 29th date it showed 2 stocks only. For same date if I see today it shows 3 to 4 stocks how it is possible?

  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. Hello,

          Thank you for reaching out. The reason you see this is that your scan is using the weekly and monthly timeframes, and you are running the scan in between the week/month. This will cause the scan to show you results based on an incomplete weekly/monthly candle. The results in the backtest will continue to repaint/update until the weekly and monthly candle completes its formation. I hope this helps.

    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%.

      2. I have a filter with only first (=1) 5 minute candle but still it is showing all 5 minute data in backtest. Please look into it

  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?

    1. Hello,

      Thank you for reaching out. The reason you see this is because your scan is using the weekly and monthly timeframes and you are running the scan in between the week/month. This will cause the scan to show you results based on an incomplete weekly/monthly candle. The results in the backtest will continue to repaint/update until the weekly and monthly candle completes its formation. I hope this helps.
      ​​​​​​​

  15. After closing market stock come in scanner but after 2 days it disappears….sometime no stock see in any particular date but after someday some stock appear on that particular date

  16. how to take days open, high, low in screener ?
    “latest” takes the recent candle, if I want to compare latest close of 5min candle with stock open price, how we can do that ?

    1. dear Akash

      Are u going to improve back test by providing closing scan rate in .cvs file.

      If possible also provide rate of 2nd candle , 3rd candle , 5th candlle , rate of 10th candle 20th candle.

      I m waiting for black test history tabulation with rates since long long….

      Or

      In case of atlas accumulate scanned / filtered data history to check past alerts , backrest history .

      I m sure this feature would improve profitability of your premium subscribers .

      Pl do needful.

      For detail contact me on 9374978934

      Thanks & reg

  17. Hello,

    Thank you for reaching out. Do you mean you wanted to avoid stocks that fell more than -2%? If so, you need to add a simple condition into the scanner as “%change greater than -2” this will show you stock above -2%change; I hope this helps.

    1. Hello,

      Thank you for your comment. Here is your modified scan; kindly review it-
      https://chartink.com/screener/first-fifteen-minute-candle-range-bo-modified

      Please note in the above mentioned we’ve added new four additional filters in the last were first 15 minutes candle high, low, open, close should equal to the current 15 minutes high, low, open, close; these filters will ensure that it will show you the result on days first 15 minutes candle.

  18. dear Akash

    Are u going to improve back test by providing closing scan rate in .cvs file.

    If possible also provide rate of 2nd candle , 3rd candle , 5th candlle , rate of 10th candle 20th candle.

    I m waiting for black test history tabulation with rates since long long….

    Or

    In case of atlas accumulate scanned / filtered data history to check past alerts , backrest history .

    I m sure this feature would improve profitability of your premium subscribers .

    Pl do needful.

    For detail contact me on 9374978934

    Thanks & reg

    1. Hello Bhadresh,

      Thank you for your suggestion; We do not have an update on this, but our team is certainly aware of your request; we will surely keep you posted when there is any development on this. I appreciate your understanding.

  19. Hi
    I am a paid subscriber. Currently when we backtest a monthly scanner (or any) for historical duration for example last 10 years, and use a filter for NIFTY 500, it always uses the latest NOFTY500 stocks even for historical months. This leads to significant errors for backtest results and return calculations for historical months for a specific strategy. Ideally the back test SHOULD use the NIFTY 500 stock list for the specific historical month as filter instead of using always the list NIFTY500 stocks of the latest month . Example if the backtest is generating result for the month of 2015 March, it should use the stocks present in NIFTY 500 index as on March 2015. Currently it always uses latest NIFTY 500 stock list (for example June 2022) even for older historical months. So can you please confirm when you will fix it? Till that time any long term filter/idex filter based strategy backtesting is not useful in Chartink.

    Thanks in advance.
    Br, Sudheendra

  20. Hello, Thank you for reaching out; currently, it is not possible to map all the stocks of the current day(even for the historic months); the segment reflects the current stocks in a given stock & we don’t store them historically.

  21. Hi,
    Currently when I back test any screener and download csv file. Show very good result with date, symbol marketcapname and sector but I think, time is very important for intraday or break out screener. So, I humbly request you to add time with date column in all screeners . Thank you.

  22. How to see time of back-tested alert generated in reports. in some reports time is visible & some its not. kindly assist

    1. Hello,

      The backtest will show the backtest bars based on the timeframes used in your scan. For example, if your scan only uses the daily timeframe, the backtest will contain the backtest bars of every day. Similarly, if your scan uses the 5-minute timeframe, the backtest bars will show all the 5-minute bars throughout the day. I hope this helps.

  23. Dear Akash,
    If i use “30 min High Equals Latest High” in my Premium Scanner then Back Test Candle Alerts (after market closed) Vs Live Market Alerts would be same?
    for example : Alerts at 9.15am Candle after Market Closed Vs Alerts shown at 9.44.59 am at Live Market
    If Not what is the reason and Solution

  24. Backtest result are not correct and shows all time frame the same result of last scan. Only live scan we can use yours. Backtest is the important tool we require. Paying just for scan is not acceptable without backtest.

    1. Hello,
      Find the response below:
      1. Could you please share the scan URL to review and respond?
      2. Please share some example stock names and screenshots where you see the issue to review and respond.
      You can mail us at chartink.com for the same.

  25. I have used a screener and downloaded the backtest result as csv file. However, there is no provision to see the market price prevailed at that time for the stocks. Please include the market prices also in the results.

  26. Dear Akash,

    When we check the previous days Back test results, the results are changing frequently. why??

    Please fix this issue its important for us to survive in this market and kindly respond.

  27. How to programmatically download history scan results?
    Each day I wish to run the scan at 3pm. Then if the scan is returning stock X, which had also appeared in yesterday’s scan at 3pm then I wish to exclude that. so even if I get the results available in download option, I can do it by myself using some programming.
    Question is how do I get the results of last 2-3 days programmatically?

  28. Hi Akash,

    I have an Alert set against a particular Scan. What I find is, the Alert page indicates less no. of triggers (stocks) as compared with the backtest results of the Scan Page. The Scan is on a single time-frame, which is 5 minutes, and the Alert is set at 5 minutes interval.

    For Eg. at 2:00 pm : Alerts page throws up Axis Bank, AmbujaCem, VEDL,
    So does the Backtest results of the Scan page .
    at 2:10 pm : Backtest result of Scan page throws up AmbujaCem
    but Alerts page does not show any triggers for 2:10 pm

    Why is this happening?

  29. So essentially, all your backtesting with multiple timeframe analysis will have a forward looking bias because while I’m planning for the entry at 5 min, looking at the daily value of an indicator at that moment, your backtest results looks at the daily value of the indicator at the close of that day.

    It might not be a bug, but it makes your tool useless for multi timeframe backtesting. Doesn’t it?

    1. Hello,

      The reason why you see this is that you are using multiple timeframes in your scan; how the scan works are, say, for example, you write a condition as below:

      5 min close > -1 5 min close
      and Latest RSI (daily candle) > 60

      When you run the scan at an example, 10:17 am, A stock ABC supposes having the latest 5 min close value is 100, and the previous 5 min close value is 99. This fulfils the 1st condition. Now suppose at 10:17 am, the latest RSI value, i.e. the daily candle RSI, was 64; now, this also fulfils the 2nd condition. Hence the stock ABC will be displayed in the results.

      Now say if you run this same scan at 11:06 am (around 1 hour after the first run), the values that the 2nd filter would see, i.e. against the daily candle, would be as of 11:06 am (& not as of 10:17 am), this would cause the backtest results to change/update/repaint because the daily candle impacts the results of all earlier time’s shown in the backtest (i.e. for the current day as the daily candle is not yet complete).

      Note, this is the same behaviour that you’d notice on a candlestick chart, i.e. viewing a candlestick chart on a daily timeframe at 11:06 am would show the RSI or any indicator value as of 11:06 am and not the values that were present at 10 am or 10:30 am and so on.. this causes the backtest results to change/update.

      I hope this clarifies the confusion here.

    1. Hi , I would like to know if I run a backtest on daily candles the result shown are from before market or after market on particular back date?

  30. I’m using a scanner which uses 2 filters ,one filter for “1 day ago” and another filter for “2 days ago”,
    when i do back test for above, is the system will change the 1 day ago as 2 days ago and 2 days ago as 3 days ago ??

    1. नमस्ते,

      कृपया ध्यान दें कि मुफ़्त संस्करण में डेटा में 5 मिनट की देरी होती है। प्रीमियम सदस्यता में, चार्ट और स्कैन हर मिनट अपडेट किए जाते हैं। हमारे प्रीमियम सदस्यों को हमारे चार्ट और स्कैन के लिए हर मिनट अपडेट के साथ रीयलटाइम डेटा मिलता है। इसलिए, उदाहरण के लिए, यदि आप सुबह 9:20 बजे स्कैन चलाते हैं, तो यह सुबह 9:19:59 बजे तक के नवीनतम डेटा पर आधारित होगा और इसी तरह…

  31. Hi great work chartink team i wanna ask a question
    If i set condition weekley atr greater than atr 1 week ago
    Will the result displayed on monday be thesame throughout the week or will any change in middle of week affect result of that generated on Monday.

    1. Kindly note that if your scan is using the weekly timeframes and you are running the scan in between the week. This will cause the scan to show you results based on an incomplete weekly candle. The results in the backtest will continue to repaint/update until the weekly candle completes its formation.

      The weekly timeframe contains the data from Monday to Friday, and it will completed on Friday at 3.30pm. Till then, it will be continuously updated.

      I hope this helps.

Leave a Reply

Your email address will not be published.