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 MGHORBEL, Today, 02:28 AM
|
0 responses
4 views
0 likes
|
Last Post
by MGHORBEL
Today, 02:28 AM
|
||
Started by dcriador, Today, 01:43 AM
|
1 response
7 views
0 likes
|
Last Post
by dcriador
Today, 01:46 AM
|
||
Started by louiseruch, Today, 01:11 AM
|
0 responses
1 view
0 likes
|
Last Post
by louiseruch
Today, 01:11 AM
|
||
Started by kujista, Today, 12:39 AM
|
0 responses
6 views
0 likes
|
Last Post
by kujista
Today, 12:39 AM
|
||
Started by tonynt, 05-21-2019, 06:27 AM
|
11 responses
536 views
1 like
|
Last Post Today, 12:37 AM |
Comment