Thank you.
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
Ticks in a historical bar.
Collapse
X
-
Hi higler,
I understand. You are not looking for the number of ticks for the size of that bar, you are wanting the volume from that bar.
Print(Volume[0]);
The Volume dataseries has the volume for each bar.
Below is a link to the help guide on Volume.
http://ninjatrader.com/support/helpG...t7/volume2.htmChelsea B.NinjaTrader Customer Service
Comment
-
I think that I am not being clear. From the NT help, "A Tick bar is based on a specific number of trades (ticks)." I am using a minute bar but want to know how many ticks (trades) occurred in a historical minute bar. I am trying to get something equivalent to Bars.TickCount that can be applied to a historical bar instead of just the current bar. The number or trades (ticks) in a bar is usually different than volume because one trade (tick) can be of more than one contract or share.
Comment
-
Hello higler,
The volume represents the number of contracts that were traded during that bar.
Try adding the VOL indicator to a chart. Is this not the information you are looking for?
If you want a tick counter instead of using the volume (number of contracts traded) for a time based bar, you would need to add a secondary series to your script of 1 tick and then count each tick.
A int variable would be used as a counter. This counter would increment when BarsInProgress is equal to 1 (so this only increments on the tick series). After a primary bar closes, save this value from the counter to a custom data series synced with the primary bar series and then reset the counter.
Add - http://ninjatrader.com/support/helpGuides/nt7/add3.htm
BarsInProgress - http://ninjatrader.com/support/helpG...inprogress.htm
DataSeries - http://ninjatrader.com/support/helpG...ries_class.htmChelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by kaywai, Today, 06:26 AM
|
1 response
2 views
0 likes
|
Last Post
by kaywai
Today, 06:35 AM
|
||
Started by ct, 05-07-2023, 12:31 PM
|
6 responses
202 views
0 likes
|
Last Post
by wisconsinpat
Today, 06:29 AM
|
||
Started by kevinenergy, 02-17-2023, 12:42 PM
|
118 responses
2,778 views
1 like
|
Last Post
by kevinenergy
Today, 05:41 AM
|
||
Started by briansaul, Today, 05:31 AM
|
0 responses
9 views
0 likes
|
Last Post
by briansaul
Today, 05:31 AM
|
||
Started by traderqz, Yesterday, 12:06 AM
|
11 responses
28 views
0 likes
|
Last Post Today, 05:11 AM |
Comment