Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

VolumetricBars Delta chng

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

    VolumetricBars Delta chng

    Hello, from the page ------> https://ninjatrader.com/support/help...flow_vwap2.htm

    I have taken the references, but in the chart there is a parameter that I need, but it does not come in the reference page.
    How can I get this value?
    I think it's BarDelta [1] - BarDelta [0]
    I did the test of
    Print ("Delta Chng" + (barsType.Volumes [CurrentBars [1]]. BarDelta - barsType.Volumes [CurrentBars [0]]. BarDelta));

    I would appreciate a correction and if possible more extensive documentation of the reference page.
    Thank you so much!
    Attached Files
    Last edited by franki; 02-13-2019, 09:01 PM.

    #2
    Hello franki,

    Thank you for the post.

    Your code snippet is correct for getting the delta change value. I believe that was not documented because it is not an "atomic" property of volumetric bars. I will submit a request to add a note to the help guide page regarding this.

    Thanks in advance for your patience.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hello, if the code is ok, it has no representation in ninjascript output, in my first message I attached an image ....
      At the start of OnBarUpdate I called "CurrentBars" under
      if (CurentBars [0] <1)
      return;
      if (CurrentBars [1] <1)
      return;

      I've searched for more information at https://ninjatrader.com/support/help...urrentbars.htm
      and in more references to CurrentBars
      But one makes a call to an indicator and the other references configure multi-timeframe.
      I do not find correlation with my need.
      Please, do you have a practical example for CurrentBars in the circustance that I am looking for?
      I am very grateful for your attention.
      Thank you.!

      Comment


        #4
        Hello franki,

        Thanks for the reply.

        You can calculate the delta change like so:

        Print("Delta for bar: " + (barsType.Volumes[CurrentBar - 1].BarDelta - barsType.Volumes[CurrentBar].BarDelta));

        I have also attached the full test script.

        Please let me know if I can assist further.
        Attached Files
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Hello again!
          Thank you very much, the command of the message was enough, so I thank you for the help you have taken to make the script.
          Nothing else I had to change the negative sign of position because it differed in the chart and appeared inverse values.
          From what I see if I want data from candles afterwards to CurrentBar, I just have to adjust like "[CurrentBar - (nºbars ago)]"
          I'm really grateful to you.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by bortz, 11-06-2023, 08:04 AM
          47 responses
          1,605 views
          0 likes
          Last Post aligator  
          Started by jaybedreamin, Today, 05:56 PM
          0 responses
          8 views
          0 likes
          Last Post jaybedreamin  
          Started by DJ888, 04-16-2024, 06:09 PM
          6 responses
          18 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by Jon17, Today, 04:33 PM
          0 responses
          4 views
          0 likes
          Last Post Jon17
          by Jon17
           
          Started by Javierw.ok, Today, 04:12 PM
          0 responses
          13 views
          0 likes
          Last Post Javierw.ok  
          Working...
          X