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

Stop Limit Orders Keep Being Rejected on Live Connection

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

    Stop Limit Orders Keep Being Rejected on Live Connection

    Hi all,

    I have a live NT account connected to the live data feed (CMEGROUP_TOP). One of my automated strategies frequently misses trades, throws the below error and disables itself. The entry trigger is to place buy/sell stop limit orders at the close of the current bar +/- 2 * TickSize to give it some buffer, but still getting these rejections.

    Talked to some other strategy developer buddies of mine and they recommend using the unmanaged approach and re-submitting the order after rejection.

    Is this the only way to get around this? Even if I could just reduce the frequency of the error, that would help a lot.

    I've attached an image of how we are currently submitting the orders, as well as the rejection itself. Any help would be appreciated! Click image for larger version

Name:	Screenshot 2023-12-18 at 9.59.27 AM.png
Views:	72
Size:	317.0 KB
ID:	1282588
    jaybedreamin
    NinjaTrader Ecosystem Vendor - Zion Trading Algos

    #2
    Hello jaybedreamin,

    Thank you for your post.

    Other than the unmanaged approach, there are a couple of options you could use to try and prevent this error or catch the rejections and re-submit orders. One option would be to use wider stops, as 2 ticks is a pretty small distance, and in moments of high volatility or a fast-moving market, the price could change more than 2 ticks from the time the order is submitted to the time that it is received at the broker/exchange for approval. Otherwise, you could program some custom RealtimeErrorHandling logic to catch when these types of rejections occur and react accordingly. For more information:


    The default behavior is StopCancelClose which stops the strategy, cancels any remaining working orders, and attempts to close any open strategy positions. You could instead use StopCancelCloseIgnoreRejects or IgnoreAllErrors so that the strategy won't be disabled when an order is rejected (or when errors are thrown). This would require you to program your own rejection handling, such as the example on that help guide page that catches if the stopLossOrder has an order state of OrderState.Rejected.

    Please let us know if we may be of further assistance.
    Emily C.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by rene69851, 05-02-2024, 03:25 PM
    2 responses
    28 views
    0 likes
    Last Post NinjaTrader_Kimberly  
    Started by NUVERSA, Today, 09:31 AM
    0 responses
    4 views
    0 likes
    Last Post NUVERSA
    by NUVERSA
     
    Started by ttrader23, Yesterday, 09:04 AM
    8 responses
    37 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by tonynt, Yesterday, 01:48 PM
    2 responses
    12 views
    0 likes
    Last Post tonynt
    by tonynt
     
    Started by goodknight777, Today, 08:43 AM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X