Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Invalid Instrument

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

    Invalid Instrument

    I am receiving the error message "The strategy 'MyStrategy' has called the Add() method with an invalid instrument. Either 'UDN' does not exist in the Instrument Manager or the specified exchange has not been configured."

    I have created a chart and can plot UDN values with no problem, however it is when I use the Add() method that I run in to problems. Below is the code I am running.

    Code:
    protected override void Initialize()
    {
        Add("UDN",PeriodType.Minute,1440);
    }

    #2
    toptrader,

    Please go to the Instrument Manager and please add UDN to the list with symbol mappings too.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      toptrader,

      Please go to the Instrument Manager and please add UDN to the list with symbol mappings too.
      I have already done so.

      Comment


        #4
        Please try with some other instruments. Please also try restarting your NT.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Josh View Post
          Please try with some other instruments. Please also try restarting your NT.
          Tried other instruments after restarting and am getting the same issue. I am now trying to use the same instrument and timeframe for BarsArray[0] and BarsArray[1]. Why could I load a chart, but then not be able to add the same data under BarsArray[1]?

          Comment


            #6
            Please try using the SampleMultiInstrument strategy and see what happens.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Josh View Post
              Please try using the SampleMultiInstrument strategy and see what happens.
              It seems to have something to do with the instruments I have set up. When I add ES 12-08 (the default in SampleMultiInstrument) it works. So the question is what did I do wrong in the setup? I have added 2 instruments (NYSE) to my NinjaTrader, then my instrument list. It required me to give at least 1 symbol mapping.

              Comment


                #8
                Are you getting data from the charts for those two custom symbols successfully? The symbol mappings need to be the ticker symbols of your broker / data supplier for this instrument.

                Comment


                  #9
                  Also, have you selected the correct exchanges in the Instrument Manager for them?
                  Josh P.NinjaTrader Customer Service

                  Comment


                    #10
                    Originally posted by NinjaTrader_Josh View Post
                    Also, have you selected the correct exchanges in the Instrument Manager for them?
                    Yes. Both NYSE.

                    Comment


                      #11
                      Please try with regular instruments preinstalled with your NinjaTrader like AAPL and MSFT.
                      Josh P.NinjaTrader Customer Service

                      Comment


                        #12
                        Originally posted by NinjaTrader_Josh View Post
                        Please try with regular instruments preinstalled with your NinjaTrader like AAPL and MSFT.
                        Works with the preinstalled instruments. I'm guessing I missed something, but can't find it for the life of me.

                        Comment


                          #13
                          toptrader,

                          Please let me know the data provider you are on and also include screenshots of what you have setup for those instruments in the Instrument Manager. Thank you.
                          Josh P.NinjaTrader Customer Service

                          Comment


                            #14
                            I am currently just running on simulated data, however my data provider is TradeStation. Attached are the requested screenshots. I have NYSE checked but I forgot to show that in the screenshot. Thanks for the help!
                            Attached Files

                            Comment


                              #15
                              toptrader,

                              Please try checking the Default exchange as well and see if that makes any difference. I just tried using instrument settings on my end but was unable to get the same error you did.
                              Josh P.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              650 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              370 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              109 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              574 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              577 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X