Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Real time order flow volumetric bars data not accurate?

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

    Real time order flow volumetric bars data not accurate?

    Hi, I am trying to access order flow volumetric bars data like Delta. some times it is not accurate and miles away from real values. what happens?
    very simple coding.

    double price;
    NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe barsType = Bars.BarsSeries.BarsType as NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe;
    if (barsType == null) return;
    Print("Maximum Combined: " + barsType.Volumes[CurrentBar].GetMaximumVolume(null, out price) + " at price: " + price);
    delta= barsType.Volumes[CurrentBar].BarDelta;​
    Last edited by steinberg123; 12-13-2024, 07:11 AM.

    #2
    Hello steinberg123,

    From the given details I would not be sure, are you applying the script directly to the volumetric chart that you are viewing and have you printed the bar time to make sure you are viewing the correct bar on the chart?

    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      Hello steinberg123,

      From the given details I would not be sure, are you applying the script directly to the volumetric chart that you are viewing and have you printed the bar time to make sure you are viewing the correct bar on the chart?
      I print time Time[0], it shows that it is not the bar I wanted. it is not the last closed bar. from the time Time[0], it is future bar . why this happened? for example, current time is 12:23, the Time[0] is 12:24

      Comment


        #4
        Originally posted by NinjaTrader_Jesse View Post
        Hello steinberg123,

        From the given details I would not be sure, are you applying the script directly to the volumetric chart that you are viewing and have you printed the bar time to make sure you are viewing the correct bar on the chart?
        it print current bar . actually, I should use a bar before this current bar. how to code? for current bar is Print("Delta for bar: " + barsType.Volumes[CurrentBar].BarDelta);

        Comment


          #5
          Hello steinberg123,

          The times you print with the time series are bar close times which relate to the close times you see in the chart. If you are using OnEachTick or OnPriceChange and printing the building bar that would happen. In that case you would need to use Time[1] and CurrentBar - 1 for the indexes to get the previously closed bar.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          81 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          41 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          64 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          66 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          54 views
          0 likes
          Last Post CarlTrading  
          Working...
          X