Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Added Kagi series

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Added Kagi series

    I added a kagi data series to a strategy and found that the strategy executions live lag the backtest by the same period as the kagi series (a 5 minute kagi series yielded trades occuring live 5 minutes after they would in the backtest). I added print(Times[1][0] and Times[0][0]) and saw this:

    10/25/2024 9:55:00 AM 10/25/2024 10:01:00 AM
    10/25/2024 9:55:00 AM 10/25/2024 10:02:00 AM
    10/25/2024 9:55:00 AM 10/25/2024 10:03:00 AM
    10/25/2024 9:55:00 AM 10/25/2024 10:04:00 AM
    Enabling NinjaScript strategy
    10/25/2024 9:55:00 AM 10/25/2024 10:05:00 AM
    10/25/2024 9:55:00 AM 10/25/2024 10:06:00 AM
    10/25/2024 9:55:00 AM 10/25/2024 10:07:00 AM
    10/25/2024 9:55:00 AM 10/25/2024 10:08:00 AM
    10/25/2024 9:55:00 AM 10/25/2024 10:09:00 AM
    10/25/2024 9:55:00 AM 10/25/2024 10:10:00 AM
    10/25/2024 9:55:00 AM 10/25/2024 10:11:00 AM
    10/25/2024 9:55:00 AM 10/25/2024 10:12:00 AM
    10/25/2024 9:55:00 AM 10/25/2024 10:13:00 AM
    10/25/2024 9:55:00 AM 10/25/2024 10:14:00 AM
    10/25/2024 10:10:00 AM 10/25/2024 10:15:00 AM
    10/25/2024 10:10:00 AM 10/25/2024 10:16:00 AM
    10/25/2024 10:10:00 AM 10/25/2024 10:17:00 AM
    10/25/2024 10:10:00 AM 10/25/2024 10:18:00 AM
    10/25/2024 10:10:00 AM 10/25/2024 10:19:00 AM

    It appears the kagi bar times lag the live by 5 minutes - why is this and how to avoid this from happening?​

    #2
    Hello samish18,

    In a backest executions are always seen on the following bar from where the condition was true due to how fills are processed.

    Comment


      #3
      That does not answer my question about why the Kagi time series (at least nominally) lags in real time. I understand how backtest executions work.

      Comment


        #4
        Hello samish18,

        Its possible that is due to the conditions you are using, you could use prints to explore how the conditions are evaluating between each test.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        116 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        61 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        40 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        43 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        82 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X