• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Getting the ChartTrader Account from code

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

    Getting the ChartTrader Account from code

    I'm making an addon for chart trader. And I need to know the account that's selected. I've got the chart trader reference, and its got an Account property so that's fine.

    However I need to know if the account is changed, is there any way to hook into the Account dropdown box? Or another way to determine if the account is changed?

    Thanks

    Kevin

    #2
    Managed to figure this out:

    Code:
    var chartTrader Window.GetWindow(chart.ActiveChartControl.Parent).FindFirst("ChartWindowChartTraderControl") as Gui.Chart.ChartTrader;
    if (ChartTrader == null) return null;
    var accountSelector = ChartTrader.FindFirst("ChartTraderControlAccountSelector") as AccountSelector;
    From there, it has a selection ChangedEvent that can be bound to.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Seeker of Alpha, Today, 06:17 PM
    0 responses
    7 views
    0 likes
    Last Post Seeker of Alpha  
    Started by gtheaded, Today, 03:47 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Tyler  
    Started by TAJTrades, Today, 03:25 PM
    0 responses
    5 views
    0 likes
    Last Post TAJTrades  
    Started by DTSSTS, Today, 01:26 PM
    0 responses
    8 views
    0 likes
    Last Post DTSSTS
    by DTSSTS
     
    Started by RFrosty, Today, 01:20 PM
    0 responses
    25 views
    0 likes
    Last Post RFrosty
    by RFrosty
     
    Working...
    X