Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get Chart Trader account selection from indicator code.

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

    #16
    Hello,
    Has someone managed to cause "Position Display Indicator" to select a user automatically?
    please help​

    Comment


      #17
      What "NinjaTrader_AlanP​" uploaded works!
      But it shows the data only after I do "reload ninjascript"' any idea work to fix this issue so it will reload auto after changing the account?
      Last edited by omribidi; 01-22-2025, 11:06 AM.

      Comment


        #18
        Originally posted by omribidi View Post
        But it shows the data only after I do "reload ninjascript"' any idea work to fix this issue so it will reload auto after changing the account?

        Try calling this function wherever you happen to need the
        current account from chart trader,

        Code:
        private Account ChartTrader_GetAccount()
        {
            if (ChartControl == null)
                return null;
        
            ChartControl.Dispatcher.InvokeAsync((Action)(() =>
            {
                return ChartControl.OwnerChart.ChartTrader.Account;
            }));
        }

        *untested*

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        44 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        56 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        35 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        95 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        57 views
        0 likes
        Last Post PaulMohn  
        Working...
        X