Dear MultiCharts fans,
I am in the process of porting my EasyLanguage code to .NET. Most of this transition was very easy - I'd even go as far as calling it enjoyable. Now I am running into a little problem, and I would appreciate any pointers:
How do I retrieve account information? Basically I am looking for the .NET equivalent of PowerLanguage's GetRTAccountEquity(GetAccountID)? Is there any detailed example on using the TradeManager?
Thanks a lot,
best regards
Felix
Trade manager: how to retrieve Account object [SOLVED]
- fbertram
- Posts: 166
- Joined: 16 Oct 2014
- Location: Seattle, USA
- Has thanked: 36 times
- Been thanked: 76 times
- Contact:
Re: Trade manager: how to retrieve Account object [SOLVED]
ok, found it:
I wish the documentation was slightly more detailed...
Code: Select all
var accountEquity = 0.0;
if (Environment.IsAutoTradingMode)
{
TradeManager.ProcessEvents();
foreach(Account account in TradeManager.TradingData.Accounts.Items)
accountEquity += account.Equity != null ? (double)account.Equity : 0.0;
}