• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Understanding NinjaTrader.Cbi.Exchange - getting a persistent reference

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

    Understanding NinjaTrader.Cbi.Exchange - getting a persistent reference

    Hello,

    My addon will have a combo box that will allow the user to select an exchange, and after the exchange is selected, a list of pre-saved ticker symbols available on that exchange will be pulled from MySQL and displayed in the addon window. I want to populate this combo box from the NinjaTrader.Cbi.Exchange type. I see 81 fields there, and am trying to figure out which value from the field structure I should be using.

    For example, Nyse is:
    - field at index [34]
    - MetadataToken = 67111518
    - Name = "Nyse"


    Which one of these should I be saving with my pre-selected tickers? I suppose the Index value may change, the name might change as well, but I am guessing the MetadataToken may correspond to some unique ID of the exchange.

    Am I correct?

    Thanks,

    Libor

    #2
    Hello Libor,

    I would recommend using the MasterInstrument.Exchanges value.
    http://ninjatrader.com/support/helpG.../exchanges.htm

    NinjaTrader.Cbi.Exchange is undocumented, but the Name field is likely all you would to save.

    Saving to an Sql database is outside of the realm of NinjaTrader Support. However, this thread will remain open for any community members that would like to assist.
    Last edited by NinjaTrader_ChelseaB; 05-11-2017, 07:15 AM.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello Chelsea,

      thank you very much for the quick reply. I do not need assistance with SQL, I just wanted to understand what is the pertinent value to keep in my database.

      Regarding the MasterInstrument.Exchanges value - that is what I am using, but the range of values accepted by MasterInstrument.Exchanges is defined in the NinjaTrader.Cbi.Exchange type, and that is what I was trying to understand. From what you are saying it seems as though there is no unique id for the exchanges and I should just use the name. Is that correct? (I was hoping the MetadataToken was it...)

      Thank you again,

      Libor

      Comment


        #4
        Libor,

        I would only recommend using the name and populating the list by name. No indexes or tokens are guaranteed not to change.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by stefanjagger, Today, 07:47 AM
        0 responses
        1 view
        0 likes
        Last Post stefanjagger  
        Started by tonynt, Today, 07:07 AM
        1 response
        4 views
        0 likes
        Last Post tonynt
        by tonynt
         
        Started by Marklhc1988, Today, 06:53 AM
        3 responses
        10 views
        0 likes
        Last Post NinjaTrader_PatrickG  
        Started by ntbone, Today, 12:05 AM
        0 responses
        10 views
        0 likes
        Last Post ntbone
        by ntbone
         
        Started by cutzpr, Yesterday, 09:33 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X