Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

PendingSubmit on Stoploss

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

    PendingSubmit on Stoploss

    Hi,

    I've created a very simple crossover strategy. Basically, when a long entry order is formed, my strategy goes in long and submits a stoploss order.

    For my example, the strategy and account positions were not the same. My strategy said it was in 70 contracts, but in actuality I was not. So I manually bought 70 contracts on my account to make the positions sync.

    However, when I start the strategy in the Strategy tab, it seems to submit the appropriate stoploss order, but it stays in a "pendingsubmit" state. Even after hours, shouldn't it still be able to submit a working stoploss order to the broker? Does this pendingsubmit order get executed at a later time? I was under the impression that whenever it is submitted a stoploss order should be executed and become "working".

    Does this have anything to do with me having manually purchased the 70 contracts as opposed to letting my strategy purchase it, and this is why my after-the-fact generated stoploss order gets hung up on "pendingsubmit"?

    I am on TDAmeritrade if that matters.

    Hoping for answers,

    Edwin

    #2
    Edwin, as you're on TDA - do you submit only a stoploss, or for example profit target and stoploss together OCO'ed?

    Please also review this important related link - http://www.ninjatrader-support.com/H...ngBracket.html

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      Edwin, as you're on TDA - do you submit only a stoploss, or for example profit target and stoploss together OCO'ed?

      Please also review this important related link - http://www.ninjatrader-support.com/H...ngBracket.html
      Hi Bertrand,

      I only use the setstoploss() command in the initialize() section. I do not set a profit target using setprofittarget or anything like that. I'm only sending through (as far as I know) a stoploss command, tho NT does seem to think it's an OCO order with another for some reason.

      Also, the link you provided gave me a 404 error.

      Regards

      Edwin

      Comment


        #4
        We'll check on the link, not sure why it would not work, thanks for reporting.

        On TDA if you do not want to send stop and target OCO'ed, please add this to the Initialize() -

        Code:
         
        protected override void Initialize() 
        { 
            WaitForClosingOcoBracket        = false; 
        }

        Comment


          #5
          Hi Bertrand,

          Thanks for the code. I believe this is exactly what I am looking for, but when I put it into my strategy and compile I received a "The name 'WaitForClosingOcoBracket' does not exist in the current context."

          I copy and pasted the exact code you provided so I know it is not a typo. Any other ideas?

          So close,....haha.

          Thanks,

          Edwin



          Originally posted by NinjaTrader_Bertrand View Post
          We'll check on the link, not sure why it would not work, thanks for reporting.

          On TDA if you do not want to send stop and target OCO'ed, please add this to the Initialize() -

          Code:
           
          protected override void Initialize() 
          { 
              WaitForClosingOcoBracket        = false; 
          }

          Comment


            #6
            Originally posted by gobears View Post
            Hi Bertrand,

            Thanks for the code. I believe this is exactly what I am looking for, but when I put it into my strategy and compile I received a "The name 'WaitForClosingOcoBracket' does not exist in the current context."

            I copy and pasted the exact code you provided so I know it is not a typo. Any other ideas?

            So close,....haha.

            Thanks,

            Edwin
            Think I found it. It should be "WaitForOcoClosingBracket", not "WaitForClosingOcoBracket". Just a change in position of two of the words. Might want to update this in the help section NT as well.

            Thanks again.

            Edwin

            Comment


              #7
              Correct, sorry and thanks for reporting back.

              Comment

              Latest Posts

              Collapse

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