Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Delta Bar Value

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

    Delta Bar Value

    Can I know how to get the Delta Bar Value ??

    Does I need to do some special connection first ???


    Below is the code i Used, but it alwasy fail and give me error :
    Code:
    NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe barsType = Bars.BarsSeries.BarsType as
    NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe;
    
    Print(" barsType.Volumes[CurrentBar].BarDelta = " + barsType.Volumes[CurrentBar].BarDelta);
    Error :
    24/3/2021 11:40:01 AM Default Indicator 'tempo': Error on calling 'OnBarUpdate' method on bar 10: Object reference not set to an instance of an object.

    #2
    Hello cincai,

    Thanks for your post.

    I don't see anything obvious in what you posted.

    Are you applying that code to a chart with Volumetric bars on it?

    Do you have tick data for the instrument you are testing on?

    Comment


      #3
      Must it be only work on Volumetric bars ??

      Comment


        #4
        Hello cincai,

        Thanks for your reply.

        The code you show would be only for a chart with Volumetric bars on it.

        You do not have to use volumetric bars on the chart but to get that volumetric-based data you would need to add a volumetric data series to your script and adjust your code accordingly. This is detailed in the help guide example here: https://ninjatrader.com/support/help...tric_bars2.htm

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        612 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        355 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        561 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        564 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X