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 knighty6508, Today, 01:20 AM
|
2 responses
7 views
0 likes
|
Last Post
by knighty6508
Today, 02:13 AM
|
||
Started by franatas, Today, 01:53 AM
|
0 responses
1 view
0 likes
|
Last Post
by franatas
Today, 01:53 AM
|
||
Started by knighty6508, Today, 01:17 AM
|
0 responses
9 views
0 likes
|
Last Post
by knighty6508
Today, 01:17 AM
|
||
Started by tierraany, Today, 01:06 AM
|
0 responses
4 views
0 likes
|
Last Post
by tierraany
Today, 01:06 AM
|
||
Started by Wilmarobyi, Today, 12:48 AM
|
0 responses
3 views
0 likes
|
Last Post
by Wilmarobyi
Today, 12:48 AM
|
Comment