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!
See more
See less

Partner 728x90

Collapse

NT8 TickSize in BarsType Not Available

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • NinjaTrader_JessicaP
    replied
    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.

    Leave a comment:


  • fxRichard
    started a topic NT8 TickSize in BarsType Not Available

    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?

Latest Posts

Collapse

Topics Statistics Last Post
Started by cotigac978, 11-25-2021, 09:14 AM
2 responses
53 views
0 likes
Last Post sonia0101  
Started by jasinhbca, Today, 01:20 PM
3 responses
31 views
0 likes
Last Post jasinhbca  
Started by jhjhawkins, Today, 12:25 PM
3 responses
22 views
0 likes
Last Post NinjaTrader_Kate  
Started by rexsole, Today, 11:48 AM
1 response
28 views
0 likes
Last Post NinjaTrader_PatrickG  
Started by jeronymite, Yesterday, 05:05 PM
3 responses
62 views
0 likes
Last Post NinjaTrader_ChristopherJ  
Working...
X