Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

GetDayBar MarketReplay does not work

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

    GetDayBar MarketReplay does not work

    Is Bars.GetDayBar( x ) supported in Replay Connection? It is always returning a null Bar in Replay Connection.

    In the Strategy Analyzer and Historical Backfill with a live connection it is returning bars.

    But in Replay, even the historical backfill is not returning any Bar.

    I attached a strategy script that demonstrates it.

    Open the NinjaScript Output window.

    The query for GetDayBar runs on the 1st bar of the session.

    If a Bar is returned the script prints
    Found at least one GetDayBar
    else prints
    No bars foound in GetDayBar



    Attached Files

    #2
    Hello Brillo,

    I took a look at the script however I am not able to see what the problem is from the given logic. I tried a more simple test on my end and see this working:

    Code:
    protected override void OnBarUpdate()
    {
        if (Bars.IsFirstBarOfSession)
       {
          Bar bar = Bars.GetDayBar(1);
          if (bar != null)
          {
             Print("Bar found");
          }
       }
    }
    I would suggest to start by doing a simple test like the above to confirm if that works in a new strategy. If so that points to something you are doing in the logic, if not that points at something related to data. Please ensure that you have loaded historical data for the symbol for the number of days back you are trying to retrieve.

    Comment


      #3
      Thanks Jesse. for some reason it's working today. Maybe it was data related.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      88 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      134 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
      119 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