Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

EnterShortStopLimit probem

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

    EnterShortStopLimit probem

    Hello!
    Having some problems with using EnterShortStopLimit and EnterLongStopLimit orders in my strategy.

    When I'm using this code it works good.

    Code:
    EnterLongStopLimit(currentBar.High + 1, currentBar.High + 1);
    But when I'm trying to use

    Code:
    EnterLongStopLimit(currentBar.High, currentBar.High);
    It shows me an error message that I can't set Buy Stop Limit order below the price (but the current price is far in -10 ticks from price where I want to set up my order).

    What can be the problem? I really want to enter on the highs and lows of the current bar.

    Thanks!

    #2
    Hello YevhenShynkarenko,
    Thanks for posting today.

    This could happen if the price is at the high and then when your order is placed it could be placed below the high/current price.

    The one tick added may be enough to be above the current price and is rejected.

    When are you calling the EnterLongStopLimit()? Again, if you call it at the high the market may change and cause that rejection before the order is submitted.

    Please let us know if we may be of further assistance for anything NinjaTrader.
    Alex G.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_AlexG View Post
      Hello YevhenShynkarenko,
      Thanks for posting today.

      This could happen if the price is at the high and then when your order is placed it could be placed below the high/current price.

      The one tick added may be enough to be above the current price and is rejected.

      When are you calling the EnterLongStopLimit()? Again, if you call it at the high the market may change and cause that rejection before the order is submitted.

      Please let us know if we may be of further assistance for anything NinjaTrader.
      I'm looking on price every moment and it is far from my orders, but I still have this error.

      For example I want to place my Buy Stop Limit on that price where is an arrow. I can do it from chart trader, but strategy writes me an error.

      Comment


        #4
        YevhenShynkarenko,
        Thanks for the reply.

        The current close may not match the high of that particular bar type.

        Have you tested this out with a print statement to see what is occurring? Insert a print statement that will printout the current Close[0] and compare it to your High entry value.

        Code:
        Print("Close: " + Close[0]);
        This will help determine what values are being used by the strategy.

        Is the entry below the close price? If yes, then this would cause the error.

        Please let us know if we may be of further assistance for anything NinjaTrader.
        Alex G.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        571 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        330 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        549 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        549 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X