Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is there a way to switch / sync the active account for all charts?

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

    Is there a way to switch / sync the active account for all charts?

    I'd like to switch the active account on all open charts at the same time.
    can this be done, or is there a way to script it?
    the same question for the active atm strategy in the charttrader.

    #2
    Hello wjadevries,

    There is not a way to do that from the platform its self. You could potentially use C# to change the selected account however I am unaware of any existing example of that to know if that will work correctly in all situations. You can certainly give this a try to see if it works out for you.

    You can see the following link of accessing the account: https://ninjatrader.com/support/foru...509#post787509

    Changing the selection could be done like the following:

    Code:
    xAlselector.SelectedAccount = Account.All.First(a => a.Name == "SimAccount1");
    The atm selector can be accessed in a similar way, you can find some details about that here: https://ninjatrader.com/support/foru...775#post752775



    Please let me know if I may be of further assistance.

    Comment


      #3
      Thanks.
      I know already how to do it from an indicator, but I thought it might be in the platform itselt.

      PS: I do NOT know how to access other Chart's ChartTrader panels to set all of them to an account with xAlselector.SelectedAccount = myaccount;
      Is there an example to loop through a list of open Charts?

      Comment


        #4
        Hello wjadevries,

        There is nothing documented to do that however you can use the NinjaTrader.Core.Globals.AllWindows which is a collection of windows. You could loop through the windows and locate the controls you needed, that would require some C# knowledge of using reflection and general WPF/Window design. If that falls within your scope you could use that collection from an Addon to affect all windows. You could do that from an Addon in its State.Active to do something once for all existing windows, and then use OnWindowCreated to affect any new windows.

        I look forward to being of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        69 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        42 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        24 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        27 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        54 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X