Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adopting account positions and persisting calculations across strategy resets

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

    Adopting account positions and persisting calculations across strategy resets

    Without incurring the complexities of serialization and streamwriters and all that jazz, are there any account level "global variable" type thingies one can store calculations in and then retrieve from something like PositionAccount.something once a strategy has been reset?

    Anything existing that one can write to that will persist across strategy resets? I've already looked at AdoptAccountPositionAndSubmitProtectiveSLPTOrders.

    Thanks!
    Last edited by markdshark; 04-13-2023, 08:09 AM.

    #2
    Hello, thanks for writing in. The only way to store personal data is to use a .txt file or your own database technology. Once a script is terminated, all the memory is cleared. The only way to get a strategy to manage an existing position that it did not make is to use Adopt Account Position. We have an example here of how to use a stream writer for data storage:

    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
    132 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