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:	353
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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        61 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        148 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        162 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        98 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        286 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X