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

Minimal price increment and multiplier, and other Instrument properties

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

    Minimal price increment and multiplier, and other Instrument properties

    Hello,
    I want to get market depth feed for several instruments.
    I use the following:

    protected override void Initialize()
    {

    Add("ES 03-14", PeriodType.Second, 30);
    Add("CL 03-14", PeriodType.Second, 30);
    }

    and then override the method:
    protected override void OnMarketData(MarketDataEventArgs e)
    {}

    My question is how and at which stage can I get the minimal price increment (tick), and price multiplier for each instrument? For example, ES, and CL have tick/multiplier 0.25 50, and 0.01 1000 correspondingly.

    In addition, is it possible to know how many levels of depth are transmitted?

    Thank you!

    #2
    Hello Volex,

    Thank you for your note.

    To get the Point Value you can use Instrument.MasterInstrument.PointValue
    For the tick you can use TickSize but would want to filter out the instrument it came from such as BarsInProgress

    http://www.ninjatrader.com/support/h...l?ticksize.htm
    http://www.ninjatrader.com/support/h...inprogress.htm
    http://www.ninjatrader.com/support/h...trument_po.htm

    For market depth you may want to look into OnMarketDepth()
    http://www.ninjatrader.com/support/h...arketdepth.htm
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Thank you!
      I need one more property, the depth of the data. Some instruments receive 10 levels of depth, some 5, and so on. How to get this property from instrument's definitions?

      Comment


        #4
        Hello,

        Take a look at the SampleMarketDepth from below -
        http://www.ninjatrader.com/support/f...ead.php?t=3478
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          Hello Cal,
          Thanks for the link, but I didn't find this information there. I know how to manage order book, but I need to know the property of SecurityDefinition, called MarketDepth (FIX tag = 264).
          CME
          FIXimate

          I know that MarketDepthEventArgs contains all necessary information to manage the order book of any depth. The reason I'm asking about MarketDepth is the following. I want to distinguish the case (e.Operation == Operation.Remove) when it occurs due to the limit of transmitted market depth (e.g. the last level removed because a new level added), or because the level was really removed by a trade or cancellation.

          Comment


            #6
            Hello Velox,

            Operation.Remove is strictly called when the row is removed only.
            For the FIX Tags, I believe there is no way to call or access that information. You would need to look into the data provider and if that kind of information can be accessed from their API.
            Cal H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by samish18, Today, 12:20 PM
            0 responses
            3 views
            0 likes
            Last Post samish18  
            Started by thread, 04-15-2024, 11:58 PM
            3 responses
            48 views
            0 likes
            Last Post Georg1o
            by Georg1o
             
            Started by leojimenezp, 04-20-2024, 05:49 PM
            4 responses
            47 views
            0 likes
            Last Post leojimenezp  
            Started by nicthe, Today, 09:24 AM
            1 response
            5 views
            0 likes
            Last Post nicthe
            by nicthe
             
            Started by samish18, Today, 10:13 AM
            0 responses
            6 views
            0 likes
            Last Post samish18  
            Working...
            X