Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

lock account selector in chart trader

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

    lock account selector in chart trader

    Is there a way to lock or make the Account Selector unchangeable just like the Instrument Selector in the chart trader.
    Attached Files

    #2
    Hello luxurious_04,

    Thank you for your post.

    That would be possible from NinjaScript, yes.

    Code:
                    ChartControl.Dispatcher.InvokeAsync((Action)(() =>
                    {
                        NinjaTrader.Gui.Tools.AccountSelector accountSelector = (Window.GetWindow(ChartControl.Parent).FindFirst("ChartTraderControlAccountSelector") as NinjaTrader.Gui.Tools.AccountSelector);
    
                        accountSelector.IsEnabled = false;
                    }));
    Please let us know if we may be of further assistance to you.

    Comment


      #3
      This works but it does affect all account selectors in all tabs. How can this be fixed?

      Comment


        #4
        Hello luxurious_04,

        Thank you for your reply.

        You would need to detect the tab is selected and unlock/undo any changes made by the script. There's only one Chart Trader on the right of the chart, and changing tabs changes what is selected within it. Here are some examples a colleague of mine created that modify chart trader and undo changes when a different tab is selected:

        https://ninjatrader.com/support/foru...ions#post96376

        Please let us know if we may be of further assistance to you.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        55 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        73 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        38 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        99 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        60 views
        0 likes
        Last Post PaulMohn  
        Working...
        X