Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Internal Order Handling Rules for Stop Limits

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

    Internal Order Handling Rules for Stop Limits

    As in other posts, it seems completely natural and wanted to bracket the market with stop limits for a breakout in either direction.

    Is there a way to enter these order as OCO???

    I see an OCO field in the IOrder interface but can't find out how to create two stop limits that are OCO with each other.

    We can do that in the ATM strategies, of course. Why not in an automated strategy?

    Wayne

    #2
    SetStopTarget/Loss orders are OCO paired by default.

    Comment


      #3
      You are confusing stop loss and stop limit. Those you refer to are fine.

      The issue is with stop limits as in EnterLongStopLimit() and EnterShortStopLimit() simultaneously.

      NT only allows one of those orders and never both due to internal order rules.

      However, I resolved this myself but updating the strategy per tick and checking if the latest tick is over or under the midpoint in the range I want to bracket.

      If it's over, I cancel the short stop limit order and call EnterLongStopLimit().

      If it goes under, I cancel the long stop limit and call EnterShortStopLimit().

      That seems to work beautifully.

      By the way, I love all the enhancements in 6.5 over 6.0. There's still some needless limitations like the one above but the addition of GTC order handling works well so far.

      Thanks!
      Wayne

      Comment


        #4
        Thanks for clarification.

        Comment


          #5
          By the way, I'm on the fence about the duel entry orders limitation. It seems possible to work around that. In fact, maybe that's just a smarter way of building strategies so you don't have orders hanging out there.

          I agree with a another post that the system fail and quit entirely with a more obvious error message.

          It took me a while to debug and figure out why my long orders weren't working when I had the short orders turned on but they did work if I ran them buy themselves.

          I accidentally stumbled across an error message in the Log that said to refer to "Internal Order Handling Rules" in the help.

          That got me on the right track.

          So please, for the future, make it stop the whole strategy, cancel open orders, flatten positions, etc and explain "which" internal rule was violated.

          Sincerely,
          Wayne
          Last edited by wayneFH; 03-25-2008, 12:45 PM.

          Comment


            #6
            Thanks for your suggestion. We'll add it to the list of future considerations.

            Comment


              #7
              That's great to hear because right now the internal order rules cause the same problems they attempt to prevent.

              In other words, if they prevent an order silently with only a log message, the strategy can continue trading other orders assuming this one worked.

              Anyway, the "advanced programmers" like myself will probably implements the enter order handling to make sure that orders got executed before continuing the strategy. But I haven't done that yet since I'm just testing a trading idea.

              And your feature is great for that purpose because it doesn't require you to implement event handling to just test an idea.

              Sincerely,
              Wayne

              Comment


                #8
                Originally posted by wayneFH View Post
                You are confusing stop loss and stop limit. Those you refer to are fine.

                The issue is with stop limits as in EnterLongStopLimit() and EnterShortStopLimit() simultaneously.

                NT only allows one of those orders and never both due to internal order rules.

                However, I resolved this myself but updating the strategy per tick and checking if the latest tick is over or under the midpoint in the range I want to bracket.

                If it's over, I cancel the short stop limit order and call EnterLongStopLimit().

                If it goes under, I cancel the long stop limit and call EnterShortStopLimit().

                That seems to work beautifully.

                By the way, I love all the enhancements in 6.5 over 6.0. There's still some needless limitations like the one above but the addition of GTC order handling works well so far.

                Thanks!
                Wayne
                Good work, Wayne.

                "per tick" meant you must refer a much short timeframe bar?

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                582 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                338 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                103 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                554 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                552 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X