Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to retrieve instantaneous volume for current bar as it's building
Collapse
X
-
How to retrieve instantaneous volume for current bar as it's building
I would like to be able to retrieve the current volume of a bar as it's building like when the vol() indicator shows it building up instantly on the current bar. I would assume I would retrieve this value during the OnMarketUpdate event but so far only able to see the volume total for the bar after it's finished that bar.Tags: None
-
The volume in the Volume series is kept up to date as ticks arrive.
Trying using Calculate.OnEackTick, then every time OnBarUpdate
is called, the value in Volume[0] represents the current volume
accumulated thus far.
The value in Volume[0] stops updating when the bar closes.
- Likes 1
-
UPDATE: I re-installed NT8 and now it works. Odd problem
I'm having so much trouble getting current volume. I have tried the above like this:
In State.Configure()
VOL1 = VOL();
In Bar.Update()
CurrentVolume = Volume[0]; // VOL1[0];
If I use VOL1[0] it gives me the final bar volume. If I use it like shown it gives me volume always of only 1. Yet the Vol() indicator is showing it live instanteously.Last edited by jalley; 06-08-2021, 11:07 AM.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
579 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment