• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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, 08: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 tvaughan4, 12-13-2019, 10:46 PM
          2 responses
          18 views
          0 likes
          Last Post tvaughan4  
          Started by digibob, 12-13-2019, 10:01 PM
          3 responses
          12 views
          0 likes
          Last Post digibob
          by digibob
           
          Started by ldissinger, Yesterday, 12:55 PM
          1 response
          19 views
          0 likes
          Last Post ldissinger  
          Started by pstrusi, Yesterday, 09:06 AM
          1 response
          28 views
          0 likes
          Last Post marcus2300  
          Started by vpzdcv, Yesterday, 02:31 AM
          0 responses
          14 views
          0 likes
          Last Post vpzdcv
          by vpzdcv
           
          Working...
          X