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 CaptainJack, 05-29-2026, 05:09 AM
        0 responses
        237 views
        0 likes
        Last Post CaptainJack  
        Started by CaptainJack, 05-29-2026, 12:02 AM
        0 responses
        151 views
        0 likes
        Last Post CaptainJack  
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        162 views
        1 like
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        243 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        198 views
        0 likes
        Last Post CarlTrading  
        Working...
        X