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 cocoescala, 10-12-2018, 11:02 PM
      7 responses
      939 views
      0 likes
      Last Post Jquiroz1975  
      Started by oviejo, Today, 12:28 AM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by geddyisodin, Yesterday, 05:20 AM
      7 responses
      46 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by gbourque, Today, 06:39 AM
      2 responses
      5 views
      0 likes
      Last Post gbourque  
      Started by cre8able, Yesterday, 07:24 PM
      1 response
      13 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X