Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stop order problem

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

    Stop order problem

    This has probably been covered before, if so if you could jsut direct me to the appropriate thread.
    I am testing a breakout system using stop order entries. The problem Im having is sometimes the price is already above the stop price before my order goes in, I would expect it then to just enter as a market order, but instead it gets rejected and shuts down. Is there any way around this?

    Thanks

    #2
    maninjapan,

    You should check for appropriate valid prices before submission. Unfortunately submitting a stop order at an invalid price does lead to rejections at the exchange and there is no way around that.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Is there any example of how to do this?
      Ideally, I would like it to enter @ market if the order price is 'Invalid'.

      Thanks

      Comment


        #4
        You just have to check the stop price you are submitting at versus the currently traded price. If it is invalid, submit as a market order instead of a stop order. You will not be able to submit stop orders at invalid prices.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          thanks, I understand what I need to do now, but an example would be extremely helpful if there was an example of some description as I am new to chartscripts and dont really know how I would go about this.

          Thanks,

          Comment


            #6
            Code:
            if (some trade conditions)
            {
                 if (Close[0] > stopPrice)
                      EnterLong();
                 else
                      EnterLongStop(...);
            }
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Thanks Josh, Ill give it a go

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              630 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              364 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              105 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              566 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              568 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X