Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Handle sell limit error

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

    Handle sell limit error

    Hello,

    Thanks for all your great support on the forum,

    Question on how to handle sell limit error:

    Running my strategy I’ve got this error (see image attached). I suppose it is due
    to the fact the market evolves very fast,
    even faster than my program.
    I want my program to handle that kind of error.
    Do you have a tutorial on how to code an exception on this specific kind of error?
    I want the strategy to resume running even after this error, on the other hand I want the strategy to stop for other kind of errors (such as connection interrupted etc.)

    Thanks for your help

    gotham
    Attached Files

    #2
    Hello gotham,

    Ensure that any sell stop price is below the current bid and any buy stop price is above the current ask.
    https://ninjatrader.com/support/foru...52#post1048952

    To allow the strategy to continue, use the RealtimeErrorHandling.StopCancelCloseIgnoreRejects and handle the rejection in OnOrderUpdate().
    https://ninjatrader.com/support/help...rderupdate.htm
    Last edited by NinjaTrader_ChelseaB; 06-22-2022, 11:29 AM.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    61 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    34 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    198 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    364 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    283 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X