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

    Get Chart Trader account selection from indicator code.

    Hi
    How to get the Account name (account.Name) that is selected in the Chart Trader DropDownBox, so I can use the Account Object or instantiate an account object for the same account in my indicator.

    I want to be able to show in my indicator information about the account that is currently selected in the Chart Trader Account DropDown box.

    Thx

    #2
    Hello jmneto,

    Thank you for writing in.

    I have put together an indicator which will print to the output window what account is selected in the chart trader account drop down.

    To Import a NinjaScript into NinjaTrader 8 do the following:
    From the Control Center window select Tools -> Import-> NinjaScript...
    Find the file location.

    Please let us know if you need further assistance.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      That solved my need. I was also able to subscribe to the SelectionChanged event.

      Comment


        #4
        Heh, any chance you have this for nt 7?

        Comment


          #5
          Hello TickTaker,

          There is no sample for this in NT7 and may be possible however not supported.

          Please let us know if you need further assistance.
          Alan P.NinjaTrader Customer Service

          Comment


            #6
            Originally posted by TickTaker View Post
            Heh, any chance you have this for nt 7?
            Code:
            Panel panel = (Panel)ChartControl.Controls["pnlChartTrader"];
            
            if (panel != null && panel.Controls["ctrChartTraderControl"] != null)
            {
                 ComboBox comboAccount = (ComboBox)panel.Controls["ctrChartTraderControl"].Controls["cboAccount"];
                 NinjaTrader.Cbi.Account AccountObject = (NinjaTrader.Cbi.Account)comboAccount.SelectedItem;
                 Print("Selected Account: " + AccountObject.Name);
            }

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by tentacle, Today, 08:49 PM
            0 responses
            4 views
            0 likes
            Last Post tentacle  
            Started by Amaria77, Today, 08:21 PM
            0 responses
            6 views
            0 likes
            Last Post Amaria77  
            Started by jleira, Today, 07:08 PM
            0 responses
            2 views
            0 likes
            Last Post jleira
            by jleira
             
            Started by varsha, Today, 06:33 PM
            0 responses
            20 views
            0 likes
            Last Post varsha
            by varsha
             
            Started by NtFan, Today, 04:12 PM
            1 response
            8 views
            0 likes
            Last Post NtFan
            by NtFan
             
            Working...
            X