Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

EnterShortStopLimit() Message alert

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

    EnterShortStopLimit() Message alert

    good morning,
    I'm building a strategy with stop limit orders and what I need is this:


    short houses:
    EnterShortStopLimit (Limit price, Stop price, "long")
    where the limit price is> (greater) than the stop price as indicated in the online help at this address: https://ninjatrader.com/support/help...gstoplimit.htm

    long houses:
    EnterLongStopLimit (Limit price, Stop price, "long")
    where the limit price is <(less) than the stop price.

    in both cases I get the rejected order error from NT7.

    how can I do ?
    is the example on the link indicated wrong?

    tank

    #2
    Hello marubozu79,

    Thanks for your message.

    The examples provided would result in rejections. The NinjaTrader 7 Help Guide is frozen, but I have requested that the NinjaTrader 8 Help Guide gets updated with code that can be copy and pasted without producing a rejection.

    As the message suggests, Buy Stop Limit orders (EnterLongStopLimit) must have the limit price greater than the stop price and Sell Stop Limit orders, (EnterShortStopLimit) must have the limit price less than the stop price.

    I.E.

    EnterLongStopLimit(High[0] + 5 * TickSize, High[0], "SMA Cross Entry");
    EnterShortStopLimit(Low[0] - 2 * TickSize, Low[0], "SMA Cross Entry");

    I look forward to being of further assistance.

    Comment


      #3
      thanks Jim for your assistance.
      producing errors I checked on the field.
      The question is if there is a method, even more complex, to buy at a retracement after the break of the stop price to do therefore what I need.
      (I understand that many brokers accept this type of order.)
      thanks for the precious collaboration

      Comment


        #4
        Hello marubozu79,

        A Stop Limit order will turn into a limit order at the specified limit price once the stop price is met. There would not be a more complex order method that could be used in NinjaTrader for submitting an order that does what you describe. Anything more complex would have to be done using logic to see if the current market price reaches a certain level, and then to submit an order at that time.

        Please let me know if I can be of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        132 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        74 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        117 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        113 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        89 views
        0 likes
        Last Post CarlTrading  
        Working...
        X