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

Futures vs Currency Symbol

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

    Futures vs Currency Symbol

    How can I determine if the Symbol is a futures or a currency symbol?

    also, how can I determine if the 10th of pip property is set or if it is a whole pip or a half pip?
    Last edited by NinjaCustomer; 11-21-2014, 12:58 PM.

    #2
    Hello NinjaCustomer,

    Thank you for your post.

    The code sample below will show how check the instrument market type -
    Code:
    if(Instrument.MasterInstrument.InstrumentType == InstrumentType.Currency)
    {
    	// Do something here
    }
    The latter part is unsupported programming but you can check the SubPipSupport by using this -
    Code:
    if(Cbi.SubPipSupport == SubPipSupport.TenthPip)
    {
        // Do something here
    }
    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Cal View Post
      Hello NinjaCustomer,

      The latter part is unsupported programming but you can check the SubPipSupport by using this -
      Code:
      if(Cbi.SubPipSupport == SubPipSupport.TenthPip)
      {
          // Do something here
      }
      Let me know if I can be of further assistance.
      Thanks, it didn't work though.. but put me on the right track to finding the correct code

      Cbi.MasterInstrument.SubPipSupport is needed, otherwise it won't compile

      Comment


        #4
        NinjaCustomer,

        Thanks for that note!
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          How to do this in NT8?

          Originally posted by NinjaTrader_Cal View Post
          Code:
          if(Cbi.SubPipSupport == SubPipSupport.TenthPip)
          {
              // Do something here
          }
          How do I do this in NT8? I am transfering something from NT7 and NT8 and it gives an error in NT8.

          Thanks,
          -Stearno

          Comment


            #6
            Hello stearno,

            Thank you for writing in.

            NinjaTrader 8 does not have an option to change pip size. Under the hood, everything will be TenthPip. So, there would be no need for a check like this.

            Please, let us know if we may be of further assistance.
            Zachary G.NinjaTrader Customer Service

            Comment


              #7
              Thank you. That is helpful information.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Pattontje, Yesterday, 02:10 PM
              2 responses
              15 views
              0 likes
              Last Post Pattontje  
              Started by flybuzz, 04-21-2024, 04:07 PM
              17 responses
              229 views
              0 likes
              Last Post TradingLoss  
              Started by agclub, 04-21-2024, 08:57 PM
              3 responses
              17 views
              0 likes
              Last Post TradingLoss  
              Started by TradingLoss, 04-21-2024, 04:32 PM
              4 responses
              45 views
              2 likes
              Last Post TradingLoss  
              Started by cre8able, 04-17-2024, 04:16 PM
              6 responses
              57 views
              0 likes
              Last Post cre8able  
              Working...
              X