Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Question regarding Order Execution

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

    Question regarding Order Execution

    Hello,

    Please I'm creating an Strategy and I'm not having the expected behavior. Could ypu please give me some guidance?

    When my strategy is triggered, I use the method EnterShortLimit to enter Short Limit at 4418.50 if the market hits that price. Otherwise I have a logic to cancel the order and do something different.

    However, the Strategy Analyzer is executing the Order in the current Price (4419.00). I would like to keep an Order Opened until the Limit Price is reached. Am I doing something wrong?


    Click image for larger version

Name:	image.png
Views:	110
Size:	15.1 KB
ID:	1258730

    Click image for larger version

Name:	image.png
Views:	169
Size:	35.8 KB
ID:	1258731
    Thank you in advance.

    #2
    Hello gmeirelles,

    A limit order fills at the specified price or better.

    For a sell limit, this will fill immediately if it is below the current bid price. (A sell limit placed above the bid would wait until the bid price reaches it)

    You may be intending to use a sell stop order instead. This would be placed below the bid and would wait until the bid price reaches it.

    Also, as this is historical data, 1-tick intra-bar granularity would be necessary for accurate intra-bar fills.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello gmeirelles,

      A limit order fills at the specified price or better.

      For a sell limit, this will fill immediately if it is below the current bid price. (A sell limit placed above the bid would wait until the bid price reaches it)

      You may be intending to use a sell stop order instead. This would be placed below the bid and would wait until the bid price reaches it.

      Also, as this is historical data, 1-tick intra-bar granularity would be necessary for accurate intra-bar fills.
      https://ninjatrader.com/support/foru...377#post773377

      Thank you Chelsea for your prompt reply.

      When I try to call the EnterShortStopLimit instead, I received the error message below:

      SubmitOrderManaged() method at 28/06/2023 17:50:00: BarsInProgress=0 Action=SellShort OrderType=StopLimit Quantity=1 LimitPrice=4418.50 StopPrice=4423.25 SignalName='Entry Short' FromEntrySignal=''
      Error: An order has been ignored since the stop price ‘4423.25’ near the bar stamped ‘06/28/2023 17:50:00’ is invalid based on the price range of the bar. This is an invalid order and subsequent orders may also be ignored.

      Could you please advise? Is it regarding to the last statement of your message?

      Thank you in advance.

      Comment


        #4
        Hello gmeirelles,

        To confirm, you are trying to place this order below the market price?

        What is the Open, High, Low, Close, of that 5:50 PM bar?

        May I confirm this script implements 1-tick intra-bar granularity?

        I've noticed you have the limit far below stop price. If you set the limit to the stop price does the same error occur?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_ChelseaB View Post
          Hello gmeirelles,

          To confirm, you are trying to place this order below the market price?

          What is the Open, High, Low, Close, of that 5:50 PM bar?

          May I confirm this script implements 1-tick intra-bar granularity?

          I've noticed you have the limit far below stop price. If you set the limit to the stop price does the same error occur?
          - The 5:50 PM BAR:
          Open: 4422.75
          High: 4423
          Low: 4419.50
          Close: 4420

          - The script does not implements 1-tick intra-bar
          Click image for larger version

Name:	image.png
Views:	103
Size:	5.5 KB
ID:	1258802

          - The stop is not far below, I'm looking to entry short at 4418.50 when the price reaches, with a stop 5 points above at the 4423.25.

          By setting the same amount in the Limit and in the Stop it worked well! Is it ok to use like this?

          Thanks

          Comment


            #6
            Hello gmeirelles,

            The order ignored is a sell short order placed at 4423.25 which is above the bar not below.

            Is this your short entry with the name Entry Short? If so, you are not placing that at 4418.50 which would be below the bar. You are placing that at 4423.25.

            The stop price must be below the bid.

            A stop limit rests at the stop price. Once the stop is touched it is turned into a limit at the limit price. I think you may have the stop and limit prices reversed.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Today, 05:17 AM
            0 responses
            39 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            124 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            64 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            41 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            46 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X