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 pjsmith, Today, 01:00 AM
    1 response
    10 views
    0 likes
    Last Post NT-Roland  
    Started by alejandro888, Yesterday, 08:41 PM
    0 responses
    9 views
    0 likes
    Last Post alejandro888  
    Started by UltraNIX, Today, 02:14 AM
    0 responses
    8 views
    0 likes
    Last Post UltraNIX  
    Started by augustfay, Yesterday, 12:06 PM
    1 response
    13 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by klaus w, Yesterday, 12:13 PM
    2 responses
    25 views
    0 likes
    Last Post klaus w
    by klaus w
     
    Working...
    X