How can I determine what the current instrument tick size is from within a custom BarsType or can I?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
NT8 TickSize in BarsType Not Available
Collapse
X
-
NT8 TickSize in BarsType Not Available
I am trying to access the TickSize variable in a custom BarsType in either the OnDataPoint or OnStateChange but both tell me it is not available in the context.
How can I determine what the current instrument tick size is from within a custom BarsType or can I?Tags: None
-
Hello fxRichard, and thank you for your question.
TickSize is a property of Indicators and Strategies. Further, the help guide cautions against using it in an Initialize() routine, which is evidence that this is an element that is not available until an Indicator or Strategy's OnBarUpdate method is called for the first time. Potential work-arounds such as the Instrument object have the same caution. Therefore, you will not be able to access this information at this stage.
However, reviewing the source for @BarsTypes, Calculate methods take an argument Bars, which have a member Bars.Instrument.MasterInstrument . This, in turn, will have the members PointValue, which represents the price of a single point, and Round2TickSize, which takes a price as an argument and returns a number of ticks. These can be used together to determine how many ticks are in a point.
Please let us know if there are any other ways we can help.Jessica P.NinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
182 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
334 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
258 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
358 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
187 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|

Comment