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 Mindset, 04-21-2026, 06:46 AM
        0 responses
        90 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        135 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        68 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        120 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        69 views
        0 likes
        Last Post PaulMohn  
        Working...
        X