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!
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
NinjaTrader
Bars.GetVolume
Collapse
X
-
Tags: None
-
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);
-
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
by Jquiroz1975
Today, 07:21 AM
|
||
Started by oviejo, Today, 12:28 AM
|
1 response
11 views
0 likes
|
Last Post Today, 07:20 AM | ||
Started by geddyisodin, Yesterday, 05:20 AM
|
7 responses
46 views
0 likes
|
Last Post Today, 07:07 AM | ||
Started by gbourque, Today, 06:39 AM
|
2 responses
5 views
0 likes
|
Last Post
by gbourque
Today, 07:05 AM
|
||
Started by cre8able, Yesterday, 07:24 PM
|
1 response
13 views
0 likes
|
Last Post Today, 06:55 AM |
Comment