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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        32 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, Yesterday, 02:41 AM
        0 responses
        15 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        24 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        40 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        34 views
        0 likes
        Last Post CarlTrading  
        Working...
        X