• 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

TDAmeritrade "Unexpected or Unsupported instrument"

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

    TDAmeritrade "Unexpected or Unsupported instrument"

    Running this code below I get this error "username accountnumber, Unexpected or Unsupported instrument, Full instrument a name: AAPL affected Order: Buy 100 Limit @250.58"
    Tested and working with NT Brokerage futures live account and in simulation with stocks but not TDAmeritrade Live account.

    Instrument firstLegInstrument = Instrument.GetInstrument("AAPL");
    Order entryOrder = account.CreateOrder(firstLegInstrument, OrderAction.Buy, OrderType.Limit, OrderEntry.Manual, TimeInForce.Gtc, 100, 250.58, 0, "", "Entry", Core.Globals.MaxDate, null);



    #2
    Hello hurleydood,

    Thanks for your message.

    I have implemented this snippet in an indicator for testing and I have also added a line of code to submit the order.

    Could you confirm the following with this test script?

    1. The indicator is working as expected to submit an order to the Sim101 Account
    2. The indicator is hitting the aforementioned error only when connected to a TD Ameritrade account, and the TDA account is used.

    We will also want to be sure we are testing on the latest version of NinjaTrader 8, Release 21.1. A download link is included below.

    Download - https://ninjatrader.com/PlatformDirect

    If issues are persisting here, could you let us know if you are having issues with manual order submissions elsewhere in the platform?

    I have coordinated with our Product Development team so I could test on a stock with TDA. I did not have an issue testing this with CHK using the following:

    Code:
    Instrument firstLegInstrument = Instrument.GetInstrument("CHK");
    Order entryOrder = account.CreateOrder(firstLegInstrument, OrderAction.Buy, OrderType.Limit, OrderEntry.Manual, TimeInForce.Gtc, 1, 0.12, 0, "", "Entry", Core.Globals.MaxDate, null);
    If you are seeing these issues with APPL, are you also seeing these issues with CHK?

    I look forward to hearing back.
    Attached Files
    JimNinjaTrader Customer Service

    Comment


      #3
      Thanks. Running 21.1 and your indicator works with CHK and AAPL however my script still doesn't work on any symbols. I will carefully look at it and get back to you.

      Comment


        #4
        Ok this is fixed. Turns out that account.Submit was using account=Sim101, and account.CreateOrder was using account=TDA. The broken code had been working with my NT Brokerage Live for a couple weeks without issue. Thanks.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by nikolaalx, Today, 07:31 AM
        6 responses
        20 views
        0 likes
        Last Post bltdavid  
        Started by HiddenPhilosopher, Today, 09:28 AM
        0 responses
        8 views
        0 likes
        Last Post HiddenPhilosopher  
        Started by tipslark, Today, 07:23 AM
        0 responses
        18 views
        0 likes
        Last Post tipslark  
        Started by Grantx, Today, 06:49 AM
        0 responses
        11 views
        0 likes
        Last Post Grantx
        by Grantx
         
        Started by muhuzekob, Today, 05:59 AM
        0 responses
        7 views
        0 likes
        Last Post muhuzekob  
        Working...
        X