Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Keep pre-existing orders after disabling/enabling strategy

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

    Keep pre-existing orders after disabling/enabling strategy

    Hello,
    I did search the forum but no luck.

    I have strategies running and at some point I will either exit manually which disables the strategy, or I will actually disable the strategy. In either case i will have open orders that I want to keep.

    However when I re-enable the strategy, it cancels those pre-existing orders that I do want to keep.

    I tried StartBehavior = StartBehavior.AdoptAccountPosition; but that did not work. I am unsure what else I can do to keep my existing orders on when I re-enable.

    thank you for your help



    #2
    Hello farawayz,

    Thank you for your post.

    To resume a previously enabled strategy, you would need to use the Immediately Submit start behavior. This Start Behavior will attempt to resume orders if the live orders match those calculated from historical data.

    This support article below provides a detailed explanation:



    Comment


      #3
      Hi Gaby

      Thanks for the reply. That immediatelySubmit setting is what we actually started with and how we experienced the cancelling of existing orders whenever a strategy was diabled and then re-enabled.

      That is why we tried the AdoptAccountPosition.

      Perhaps I did not explain the situation properly....

      basically when disabling, the orders remain, BUT when we re-enable the strategy those orders are cleared away even though we want them to remain. The logic for why those order were placed to begin with has not changed, but the restarting of the strategy seems to basically restart the timeline from which the strategy starts managing orders.

      Does that make sense?

      Comment


        #4
        Hello farawayz,

        Yes that makes sense. With ImmediatelySubmit, it can only resume the orders if the live orders match those calculated from historical data. What it sounds like is happening is that the orders aren't matching, so they're being replaced by those calculated from historical data.

        Since historical processing and realtime processing are different, it is common to see orders replaced rather than resumed, because orders submitted based off fill prices and average entry prices would be different.

        Adding 1-tick intrabar granularity can help with this. Below is a guide on adding 1-tick intrabar granularity to your strategy scipt:

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        87 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        128 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        65 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        117 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        67 views
        0 likes
        Last Post PaulMohn  
        Working...
        X