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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    90 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    137 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    120 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    72 views
    0 likes
    Last Post PaulMohn  
    Working...
    X