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.
    JesseNinjaTrader Customer Service

    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.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ageeholdings, Today, 07:43 AM
        0 responses
        5 views
        0 likes
        Last Post ageeholdings  
        Started by pibrew, Today, 06:37 AM
        0 responses
        4 views
        0 likes
        Last Post pibrew
        by pibrew
         
        Started by rbeckmann05, Yesterday, 06:48 PM
        1 response
        14 views
        0 likes
        Last Post bltdavid  
        Started by llanqui, Today, 03:53 AM
        0 responses
        6 views
        0 likes
        Last Post llanqui
        by llanqui
         
        Started by burtoninlondon, Today, 12:38 AM
        0 responses
        12 views
        0 likes
        Last Post burtoninlondon  
        Working...
        X