• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Invalid Order price when using ExitShortStopMarket and ExitLongStopMarket

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

    Invalid Order price when using ExitShortStopMarket and ExitLongStopMarket

    Hi

    I want to understand the behavior of ExitShortStopMarket, ExitLongStopMarket

    ----
    1. Suppose the current market OHLC bar is 72.90, 73.59, 72.15, 72.73, and I am currently Long +5 contracts. If I issue an order using ExitLongStopMarket at a price of 72.88 for the next bar, my order is rejected. I did not try to open any Short position, but only to close the Long position.

    This is the error that is printed:

    7/11/2018 11:00:00 AM Strategy 'MyTestStrategy/165864626': Entered internal SubmitOrderManaged() method at 7/11/2018 11:00:00 AM: BarsInProgress=0 Action=Sell OrderType=StopMarket Quantity=5 LimitPrice=0 StopPrice=72.88 SignalName='LongExit' FromEntrySignal='LongEntry'

    7/11/2018 11:00:00 AM Strategy 'MyTestStrategy/165864626': Ignored SubmitOrderManaged() method at 7/11/2018 11:00:00 AM: BarsInProgress=0 Action=Sell OrderType=StopMarket Quantity=5 LimitPrice=0 StopPrice=72.88 SignalName='LongExit' FromEntrySignal='LongEntry' Reason='Invalid order price, please see log tab'

    The next Ohlc bar was : 72.72,72.73,71.80,71.89. So, normally I would expect I would expect since the next bar opened below my Stop Level (went through the stop), the order should get converted to a market order and get traded at the open of 72.72. Why was the order rejected with an "Invalid order price" ?

    ----

    2. Suppose the current market OHLC bar is 68.46, 68.99, 68.05, 68.94, and I am currently Short -5 contracts.If I issue an order using ExitShortStopMarket at a price of 68.64 for the next bar, my order gets rejected. I did not try to open any Long position, but only to close the Short position.

    This is the error that is printed:

    7/24/2018 10:00:00 AM Strategy 'MyTestStrategy/165864626': Entered internal SubmitOrderManaged() method at 7/24/2018 10:00:00 AM: BarsInProgress=0 Action=BuyToCover OrderType=StopMarket Quantity=5 LimitPrice=0 StopPrice=68.64 SignalName='ShortExit' FromEntrySignal='ShortEntry'

    7/24/2018 10:00:00 AM Strategy 'MyTestStrategy/165864626': Ignored SubmitOrderManaged() method at 7/24/2018 10:00:00 AM: BarsInProgress=0 Action=BuyToCover OrderType=StopMarket Quantity=5 LimitPrice=0 StopPrice=68.64 SignalName='ShortExit' FromEntrySignal='ShortEntry' Reason='Invalid order price, please see log tab'


    The next Ohlc bar was: 68.94,69.35,68.89,69.34. So, normally I was expect that since the next bar opened above my Stop Level (went through the stop), the order should get converted to a market order and get traded at the open of 68.94. Why was the order reject with an "Invalid order price" ?

    ----

    Log tab only says: "An Exit() method to submit an order enter at xxx has been ignored. Please search on the term 'Internal Order Handling Rules' in the Help Guide.

    Does the Stop Price level needs to be compulsorily below the last Close for ExitLongStopMarket, and above the last Close for ExitShortStopMarket ?
    Last edited by uday12; 04-19-2019, 11:37 AM.

    #2
    Hello uday12,

    Thank you for your post.

    ExitLongStopMarket orders must be below the current price at the time they are placed, and vice versa for ExitShortStopMarket or they will be ignored as you have seen. Since the order is not placed until the open of the next bar, by the time the order is placed it is already on the wrong side of the current price and is summarily ignored. I recommend placing your stops farther from the current price to avoid these scenarios should the market move quickly.

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Hi Kate, thanks for the clarification.

      Another question: suppose the Open of the next bar is between the Close and the Stop Level , will the trade happen? For instance, if close is $93, and I place the stop order (to go short) at $92 and the open of the next bar is $91, where the market gapped on the open through my stop level - will the order get converted to a market order? (Assuming I am using ExitShortStopMarket and ExitLongStopMarket).

      Comment


        #4
        Hello uday12,

        Thank you for your reply.

        If the stop order is triggered on bar close of the bar that closed at $93, and it tries to place a sell stop at $92, but the next bar opens at $91, no, the stop order will be ignored as it hasn't been placed above the current market price. As I mentioned previously, sell stops must be below the current market price at the time they are placed, and buy stops must be above the current market price.

        Please let us know if we may be of further assistance to you.
        Kate W.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by mohdhm, Today, 04:09 PM
        0 responses
        1 view
        0 likes
        Last Post mohdhm
        by mohdhm
         
        Started by BGWTEX, Today, 03:30 PM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by marekflys, Today, 03:07 PM
        0 responses
        5 views
        0 likes
        Last Post marekflys  
        Started by GregoryBaskin, Today, 02:51 PM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Tyler  
        Started by swcooke, Today, 12:33 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X