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

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 samish18, 04-17-2024, 08:57 AM
        16 responses
        55 views
        0 likes
        Last Post samish18  
        Started by arvidvanstaey, Today, 02:19 PM
        3 responses
        9 views
        0 likes
        Last Post NinjaTrader_Zachary  
        Started by jordanq2, Today, 03:10 PM
        2 responses
        8 views
        0 likes
        Last Post jordanq2  
        Started by traderqz, Today, 12:06 AM
        10 responses
        18 views
        0 likes
        Last Post traderqz  
        Started by algospoke, 04-17-2024, 06:40 PM
        5 responses
        47 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X