Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Historical Bid/Ask Volume without Tick Replay

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

    Historical Bid/Ask Volume without Tick Replay

    Hi Support,

    I am trying to verify if my data feed has historical bid/ask volume. I have used AddDataSeries with MarketDataType.Ask (as described here https://ninjatrader.com/support/foru...ng-tick-replay).

    In OnBarUpdate(), when I try to access the Ask volume using "Volumes[1][0]",or "BarsArray[1].GetVolume(0)", I get an out of bound index error. Does this mean there is no historical Ask Volume, and that data series was never populated?

    Thanks for ur help.
    -Alaa

    #2
    Hello Alaa,

    Is the CurrentBars[bar index] greater than 0? (Meaning has at least one bar for that series been processed yet?)

    Do you see the data available in the Tools -> Historical Data window on the Edit tab in the Historical section for the data type, ask and bid?

    What is the connection type you are connected to?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea,

      My data feed is Continuum. The indicator does not do anything other than printing the vol / askvol. It is a alive feed but I also have Bid/Ask/Last data downloaded and I can see it in "Historical Data"

      The first Print is fine, but he second gives out of bound index error.

      if (CurrentBar < 1)
      return;

      Print(Volumes[0][0].ToString());

      Print("Vol: " + Volumes[0][0].ToString() +
      " | Ask Vol: " + BarsArray[1].GetVolume(0).ToString() );

      Click image for larger version

Name:	image.png
Views:	318
Size:	39.6 KB
ID:	1170926
      Attached Files

      Comment


        #4
        Hello aelagha,

        If the bars index is 1 for the added series, the CurrentBars[1] must be greater than 0.

        It appears that you are checking bars index 1 while bars index 0 is processing in OnBarUpdate().

        Below is a link to the help guide on CurrentBars and BarsInProgress.

        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        640 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        366 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        107 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        569 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        572 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X