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 Mindset, 04-21-2026, 06:46 AM
          0 responses
          87 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          128 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          65 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by cmoran13, 04-16-2026, 01:02 PM
          0 responses
          117 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          67 views
          0 likes
          Last Post PaulMohn  
          Working...
          X