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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    90 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    137 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
    120 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