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 The_Sec, Today, 02:29 PM
              0 responses
              1 view
              0 likes
              Last Post The_Sec
              by The_Sec
               
              Started by tsantospinto, 04-12-2024, 07:04 PM
              4 responses
              62 views
              0 likes
              Last Post aligator  
              Started by michi08, 10-05-2018, 09:31 AM
              3 responses
              740 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by sightcareclickhere, Today, 01:55 PM
              0 responses
              1 view
              0 likes
              Last Post sightcareclickhere  
              Started by Mindset, 05-06-2023, 09:03 PM
              9 responses
              259 views
              0 likes
              Last Post ender_wiggum  
              Working...
              X