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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        70 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        152 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
        100 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        288 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X