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 ScottWalsh, Today, 04:29 PM
                0 responses
                4 views
                0 likes
                Last Post ScottWalsh  
                Started by rtwave, 04-12-2024, 09:30 AM
                2 responses
                21 views
                0 likes
                Last Post rtwave
                by rtwave
                 
                Started by tsantospinto, 04-12-2024, 07:04 PM
                5 responses
                69 views
                0 likes
                Last Post tsantospinto  
                Started by cre8able, Today, 03:20 PM
                0 responses
                7 views
                0 likes
                Last Post cre8able  
                Started by Fran888, 02-16-2024, 10:48 AM
                3 responses
                49 views
                0 likes
                Last Post Sam2515
                by Sam2515
                 
                Working...
                X