Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Restore the Strategy state after disconnection

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

    Restore the Strategy state after disconnection

    Hi,

    So the question is: is there a way for the Strategies, when experiencing a disconnection from the data provider and then reconnecting, to recognize the current position and continue managing it? All the related features should work in this same was as if there were no disconnection:
    - Position.GetUnrealizedProfitLoss()
    - (TradeCollection)s.SystemPerformance.AllTrades.ByD ay[]
    - etc

    #2
    Hello webus,

    Thank you for your post.

    You could consider using the ImmediatelySubmit start behavior.

    When this start behavior is used, the strategy processes historical data to see what the Strategy Position will be as well as any orders that should be active from the strategy. The orders that should be active are compared to any live working orders. IF the orders match, the strategy will take control of the live working orders. If the live working orders do not match what is calculated from historical data, the live orders will be canceled and replaced with those calculated from historical data.



    Having a strategy that produces backtest results closer to realtime results can be helpful to make this transition smoother. This would especially be the case if you submit PT and SL orders based on the fill prices of orders. Having a strategy that functions OnBarClose and submits orders to a single tick data series can help to make the backtest results closer to live.

    Please let us know if you have any other questions.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    19 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    119 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    63 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    41 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    45 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X