Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

EnterShortStopLimit() Order not submitted

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

    EnterShortStopLimit() Order not submitted

    Hi

    I am using EnterShortStopLimit() orders, to submit orders with a given Stop and Limit. The example I am working on at the moment, takes the SMA crossover as the signal, and then takes the High/Low on the CrossOver bar as the Stop and Limit price for the order.

    This works brilliantly, as per pic 1 and 2 below:

    Click image for larger version

Name:	ShortEntryAtSpecifiedPrice_1.jpg
Views:	1
Size:	78.7 KB
ID:	899131

    Click image for larger version

Name:	LongEntryAtSpecifiedPrice_1.jpg
Views:	1
Size:	83.7 KB
ID:	899132

    However, when the market gaps down, through the Stop and Limit prices, my order does not get filled - I was not expecting this. Please see third pic below:

    Click image for larger version

Name:	ShortEntryAtSpecifiedPrice_NotFilled_GapDown.jpg
Views:	1
Size:	79.0 KB
ID:	899133

    Am I misunderstanding something?

    My order is submitted as:


    EnterShortStopLimit(1, MACrossHIGH(Close, 3, 30)[0],MACrossHIGH(Close, 3, 30)[0], "ShortEntry");

    where MACrossHIGH(Close, 3, 30)[0] is the Red Line indicator, from the H/L of the CrossOver day.

    Please advise?

    Kind regards

    #2
    Hello csrvermaak,
    Thanks for your note.

    If you add the below code in the initialize section of the strategy then are you getting any order rejection/cancellation messages in the Output Window (Tools>Output Window).
    Code:
    TraceOrders = true;
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Hi Joydeep

      Thank you for your reply. I inserted the code, but not getting any Cancel/Reject messages.

      I find it interesting that it works for all the orders before, but only this specific instance, where the market gaps, it fails.

      Any ideas?

      Kind regards

      Comment


        #4
        Hello csrvermaak,
        To assist you further can you please send a toy NinjaScript code* replicating the behavior to support[AT]ninjatrader[DOT]com

        Also please do let me the exact steps to replicate the scenario.

        Please append Attn:Joydeep in the subject line of the email and give a reference of this thread in the body of the email.

        I look forward to assisting you further.

        *The "toy" just means something that is a stripped down version that isn't necessarily the whole logic. It makes things easier to rout out.
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          Sure, will do. Thanks Joydeep.

          Comment


            #6
            Originally posted by csrvermaak View Post
            Hi

            I am using EnterShortStopLimit() orders, to submit orders with a given Stop and Limit. The example I am working on at the moment, takes the SMA crossover as the signal, and then takes the High/Low on the CrossOver bar as the Stop and Limit price for the order.

            This works brilliantly, as per pic 1 and 2 below:

            [ATTACH]24014[/ATTACH]

            [ATTACH]24015[/ATTACH]

            However, when the market gaps down, through the Stop and Limit prices, my order does not get filled - I was not expecting this. Please see third pic below:

            [ATTACH]24016[/ATTACH]

            Am I misunderstanding something?

            My order is submitted as:


            EnterShortStopLimit(1, MACrossHIGH(Close, 3, 30)[0],MACrossHIGH(Close, 3, 30)[0], "ShortEntry");

            where MACrossHIGH(Close, 3, 30)[0] is the Red Line indicator, from the H/L of the CrossOver day.

            Please advise?

            Kind regards
            That is in the nature of StopLimit sell orders. When your stop is triggered, even by a gap, an order to sell at the limit, that you specified, is entered. The price is well below that limit, so the order will not be filled.

            Comment


              #7
              Thank you for your reply koganam, much appreciated.

              Comment


                #8
                Hi Joydeep

                Thank you for answering my query via e-mail, much appreciated.

                Kind regards

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                75 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                45 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                26 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                32 views
                0 likes
                Last Post TheRealMorford  
                Started by Mindset, 02-28-2026, 06:16 AM
                0 responses
                62 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Working...
                X