Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Selected account on chart trader

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

    Selected account on chart trader

    Hi,

    I am writing code for a semi-automated strategy and was wondering if there was a way to get the currently selected account on the chart trader.

    Sincerely,

    Yoan​

    #2
    This code was taken from BltRenkoTrader,

    Code:
            ChartControl.Dispatcher.InvokeAsync((Action)(() => {
                Account a = ChartControl.OwnerChart.ChartTrader.Account;
                Print("Account = '" + a.Name + "'");
            }));
    ​

    Comment


      #3
      Hello Yoan,

      Thanks for your post.

      bltdavid is correct. The code that bltdavid shared could be used to get the account selected in the Account drop-down menu of Chart Trader.

      On this forum thread you could find more information and sample code demonstrating getting the selected account in Chart Trader: https://forum.ninjatrader.com/forum/...509#post787509
      <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

      Comment


        #4
        Sorry for the late reply. Thank you you so much bltdavid ​and BrandonH, it worked like a charm.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        566 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        330 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        547 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        548 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X