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 was ignored

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

    EnterShortStopLimit was ignored

    Hello,

    I`ve created a strategy to trade the breakout of certain ranges. In the backtest, I found an ignored short trade.

    (Output Window: Strategy 'BOR1/-1': An order has been ignored since the stop price ‘1.11507’ near the bar stamped ‘08.01.2020 05:30:00’ is invalid based on the price range of the bar. This is an invalid order and subsequent orders may also be ignored.)

    Is it a problem, that 1.11507 is the stop price and also the open of the next bar? I thought, when 1.11507 is triggered, a limit order will be set to this price, as long as it is triggered or cancelled.

    Last trade before was also a short trade and worked perfectly. To enter a trade, I use the method "EnterShortStopLimit" with "IsLiveUntilCancelled: true". Moreover, there was no other order waiting in the opposite direction.

    Hope we will find the problem.

    Best regards

    Attached Files

    #2
    Hello Heikoman,

    Thank you for your post.

    The message is letting you know that a stop order was ignored because the strategy submitted the order to an invalid price level. Buy stop orders must be placed above the current ask price. Sell stop orders must be placed below the current ask price.

    When the order is submitted, is the stop price parameter greater than the GetCurrentAsk() for a buy stop order? Or, is the stop price parameter less than the GetCurrentAsk() for a sell stop order?

    I would recommend you add prints to the strategy to determine why the stop order is being ignored. One line above where the stop order is placed, print the GetCurrentAsk() and print the price being submitted to the order method.

    This forum post goes into great detail on how to use prints to help figure out where issues may stem from — this should get you going in the correct direction. You can even add these using the Strategy Builder.

    https://ninjatrader.com/support/foru...ns-not-working

    Thanks in advance; I look forward to assisting you further.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Hello Kate,

      thank you very much for your post! I`ve just changed the conditions for the trading range and it works.

      Best regards

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by elirion, Yesterday, 09:48 PM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by mjbatts91, 04-30-2024, 04:48 PM
      3 responses
      26 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by betsuni_123, Yesterday, 04:20 PM
      2 responses
      20 views
      0 likes
      Last Post betsuni_123  
      Started by md4866, Yesterday, 08:15 PM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by reynoldsn, Yesterday, 07:11 PM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Working...
      X