Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ignored SubmitOrderManaged() method

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

    Ignored SubmitOrderManaged() method

    Hello,

    I have two Long Positions of the same instrument in NinjaTrader. I can see this in the Positions tab of NinjaTrader. The reason, why there are two positions, is unclear form me anyhow.

    I use the following code to exit the long position:

    "targetOrder = ExitLongLimit(0, true, 1, LongExitLimit, "myLongExit", "myLongEntry");"

    In my strategy, I use in OnStateChange also

    "IsAdoptAccountPositionAware = true;
    StartBehavior = StartBehavior.AdoptAccountPosition;"

    Unfortunately, I get the error message in the NinjaScript Output with the reason "This was an exit order but no position exists to exit'.

    What did I do wrong?

    Kind you
    Gerik

    #2
    Hello Gerik,

    Thank you for your reply.

    CRITICAL — If your inquiry involves live orders, please always reach out to your broker's Orders Desk immediately to confirm and manage your live orders and positions.

    If your trades are with NinjaTrader Brokerage, you can contact NinjaTrader Brokerage Order Desk here:
    • Phone: 312.423.2234
    • Email: orders [at] ninjatrader [dot] com
    That exit order wouldn't be able to exit an existing position - it could only exit an order generated by the strategy with the name "myLongEntry". So when the conditions to trigger that exit for an adopted position are true, you would get that error. You'd need a different exit to exit an adopted position that didn't use the signal names.

    Please let us know if we may be of further assistance to you.

    Comment


      #3
      Hello Kate,

      thank you for your response.

      Originally posted by NinjaTrader_Kate View Post
      You'd need a different exit to exit an adopted position that didn't use the signal names.
      How can I exit an adopted position without signal names?

      Gerik

      Comment


        #4
        Hello Gerik,

        Thank you for your reply.

        You'd need to submit the stop loss and target for it without specifying the FromEntrySignal. I've attached an example one of my colleagues created that shows how to submit those only for the initial order when it starts up.

        Please let us know if we may be of further assistance to you.
        Attached Files

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        93 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        138 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        68 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        123 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        73 views
        0 likes
        Last Post PaulMohn  
        Working...
        X