Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error closing orders on playback

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

    Error closing orders on playback

    Hello,

    I'm experiencing these issues (screenshot attached) while running playback with a strategy, the methods I'm using are EnterLong("signal") and EnterShort("signal"), how can I circumvent this problem?

    I would appreciate your support,

    Regards,
    Attached Files

    #2
    Hello Waxavi,

    Thanks for your post.

    The message is letting you know that the strategy placed a buy stop or buy stop limit order that was rejected because the strategy submitted the order to an invalid price level. Buy stop and buy stop limit 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.

    Below is a link to a forum post that demonstrates using prints to understand behavior.
    https://ninjatrader.com/support/foru...121#post791121

    Please see the help guide documentation below for more information about GetCurrentAsk().
    https://ninjatrader.com/support/help...currentask.htm

    Also, see this forum thread which you may find helpful: https://ninjatrader.com/support/foru...order-rejected

    Let us know if we may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by WilliCarls, Today, 02:01 AM
    0 responses
    5 views
    0 likes
    Last Post WilliCarls  
    Started by Pa_Baz, 12-14-2024, 09:40 PM
    47 responses
    793 views
    1 like
    Last Post Gianmarco Giorgi  
    Started by powbordon1126, 02-06-2025, 08:47 PM
    3 responses
    28 views
    0 likes
    Last Post rockmanx00  
    Started by dhanushatrader96, Yesterday, 10:24 PM
    1 response
    12 views
    0 likes
    Last Post bltdavid  
    Started by reynoldsn, Yesterday, 07:52 PM
    0 responses
    9 views
    0 likes
    Last Post reynoldsn  
    Working...
    X