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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
80 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
40 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
63 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
63 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
54 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment