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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    89 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    135 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
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    69 views
    0 likes
    Last Post PaulMohn  
    Working...
    X