Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Auto Reset StopCancelClose?

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

    Auto Reset StopCancelClose?

    Hi, So I was wondering if there was a way to auto restart my strategy after being stopcancelclose due to an error. The error in particular that I'm facing is that sometimes the commodity (NASDAQ/ES) moves so fast that I'm not able to place my stop loss due to it being relatively low currency based stoploss. Which I'm personally fine with but I was hoping you would have a script or example code of something like 'if stopcancelclose happens then restart strategy'

    Thank you!

    #2
    Hello knbop12,

    Thank you for your post.

    StopCancelClose will stop the strategy, cancel any remaining working orders, and then close any open positions managed by the strategy by submitting one "Close" order for each unique position. There is no way to have the strategy automatically re-start/re-enable itself after it has stopped. You will need to re-enable the strategy manually.

    If you want the strategy to not stop after receiving an order rejection, consider using RealtimeErrorHandling.StopCancelCloseIgnoreRejects , which will perform default behavior (StopCancelClose is the default behavior) on all errors except order rejections.

    Please see the Help Guide page below on RealtimeErrorHandling:



    If you have any further questions, please let me know.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    45 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    31 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X