Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    JimNinjaTrader Customer Service

    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.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by bortz, 11-06-2023, 08:04 AM
        47 responses
        1,603 views
        0 likes
        Last Post aligator  
        Started by jaybedreamin, Today, 05:56 PM
        0 responses
        8 views
        0 likes
        Last Post jaybedreamin  
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        18 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        4 views
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        12 views
        0 likes
        Last Post Javierw.ok  
        Working...
        X