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 NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      65 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      139 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      75 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      45 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      50 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X