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:	513
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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    65 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    139 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X