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 NullPointStrategies, Today, 05:17 AM
        0 responses
        23 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        120 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        63 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        41 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        45 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X