Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trailing Stop Causing Errors (Stop Price can't be changed above Market)

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

    Trailing Stop Causing Errors (Stop Price can't be changed above Market)

    I have created a trailing stop using the strategy builder that trails the bottom of the previous candle plus 1 tick. It updates on each tick and works perfectly 99% of the time. However, there are instances where the market moves so quickly that the stop loss is moved to the low of the previous candle and price has already moved past it. This triggers an error and causes the strategy to shut down. I changed the real-time error handling to "Ignore all errors" so that it doesn't shut the strategy down, however, it now crashes my ninja trader and repeatedly spams the error "Playback 101, Stop price can't be changed above the market". In the background it does the right thing and exits the order immediately I just need to get rid of this repeated error spamming and I can't figure that part out. Attached is a screenshot of my log if that is helpful. Any help is much appreciated!

    Click image for larger version

Name:	Screenshot 2023-08-30 at 2.23.50 PM.png
Views:	556
Size:	99.1 KB
ID:	1266719

    #2
    Hello Jonasdvs12,

    You need to choose a valid price for the order.

    A sell stop market order must have the stop price below the current bid. The price you are supplying is either equal to or greater than the bid.

    In which case, it sounds like you want to exit the position. If the stop price is equal to or greater than the bid, instead of submitting a stop order, submit a market order instead.

    The TrailLongShortBuilderExample linked below includes this sort of logic.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    56 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
    195 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    359 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    281 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X