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 NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        56 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        133 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        73 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
        49 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X