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