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

Bars.GetVolume

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

    Bars.GetVolume

    What does Bars.GetVolume(idx) return?

    #2
    I figured it out - It is an array with opposite index values of Volume[]. I tested a 3 bar chart with following result::
    Volume[0]=bars.GetVolume(2);
    Volume[1]=bars.GetVolume(1);
    Volume[2]=bars.GetVolume(0);

    Comment


      #3
      Hello afshinmoshrefi,

      Thank you for your post.

      You are correct here. The Bars.GetVolume(idx) will display the volume of the bar referenced, so the latest bar would be CurrentBar:
      Code:
      			Print("VOL: " + Volume[0]);
      			Print("BGV: " + Bars.GetVolume(CurrentBar)); // Returns the same value as the above line

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by knighty6508, Today, 01:20 AM
      2 responses
      7 views
      0 likes
      Last Post knighty6508  
      Started by franatas, Today, 01:53 AM
      0 responses
      1 view
      0 likes
      Last Post franatas  
      Started by knighty6508, Today, 01:17 AM
      0 responses
      9 views
      0 likes
      Last Post knighty6508  
      Started by tierraany, Today, 01:06 AM
      0 responses
      4 views
      0 likes
      Last Post tierraany  
      Started by Wilmarobyi, Today, 12:48 AM
      0 responses
      3 views
      0 likes
      Last Post Wilmarobyi  
      Working...
      X