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 kinfxhk, 07-14-2026, 09:39 AM
        0 responses
        7 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 10:18 AM
        0 responses
        59 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 09:50 AM
        0 responses
        41 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 07:21 AM
        0 responses
        47 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-11-2026, 02:11 AM
        0 responses
        38 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X