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 SalmaTrader, 07-07-2026, 10:26 PM
|
0 responses
35 views
0 likes
|
Last Post
by SalmaTrader
07-07-2026, 10:26 PM
|
||
|
Started by CarlTrading, 07-05-2026, 01:16 PM
|
0 responses
20 views
0 likes
|
Last Post
by CarlTrading
07-05-2026, 01:16 PM
|
||
|
Started by CaptainJack, 06-17-2026, 10:32 AM
|
0 responses
13 views
0 likes
|
Last Post
by CaptainJack
06-17-2026, 10:32 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:15 AM
|
0 responses
19 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:15 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:06 AM
|
0 responses
22 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:06 AM
|

Comment