Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Serialize Account and ATM Strategy

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

    Serialize Account and ATM Strategy

    I've created an indicator that is adding an AccountSelector and an AtmStrategySelector to my chart. Any time I reload the indicator, the selected values in these controls are being reset. I've tried adding parameters to serialize the selected values and reset them at run time, but I am not able to get it working as expected. Are there any examples of how this can be done?

    #2
    Hello SystemTrading,

    Thanks for your post.

    I've attached an example indicator that does nothing but provides the UI for account and ATM selection.

    Once selected and the workspace is saved, when restored the selections should remain.

    ExampleAccountandATMselector.zip

    Comment


      #3
      The ATM Selector code seems to work properly, but I'm having an issue with the Account Selector. It serializes properly with the Sim accounts, but fails with a live/demo account. I've included a brief video below.

      Video Here

      I'm assuming this has something to do with the account name. The account name displayed in the Account Selector is:

      DEMONT26557!Ninjademo!TSNT26557

      However, the account name being saved is:

      TSNT26557

      So, it seems to fail when I try to set:

      accountSelector.DesiredAccount = TSNT26557

      How do we properly serialize live/demo accounts?
      Attached Files

      Comment


        #4
        Hello SystemTrading,

        Thanks for your reply.

        In the case of the live data demo name, the account name really is TSNT26557. You can verify this in the account tab by right-mouse click and selecting "Properties" and then check to enable the "Name" field.

        You will have to assign an account object to the account TSNT26557 and from that you can pull the Display name of the account.
        Something like:

        lock (Account.All)
        accountSelector.DesiredAccount = Account.All.FirstOrDefault(a => a.Name == SelectedAccountName).DisplayName;



        Comment


          #5
          Thank you Paul!!!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          636 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          366 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          107 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          568 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          571 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X