Пример #1
0
        public OperationResult <BasicStatistic[]> GetBasicStatisticsCurrent(long[] accountsIds)
        {
            Logger.Trace("Get basic statistics for {0} accounts: {1}", accountsIds.Length, TrimString(string.Join(", ", accountsIds)));
            return(InvokeOperations.InvokeOperation(() =>
            {
                var statistics = statisticRepository.GetCurrentAccountsStatistic(accountsIds);

                return statistics.Select(x => new BasicStatistic
                {
                    // ToDo:
                    AccountId = x.account_id,
                    LoseOrders = x.closed_lose_trades_total,
                    MaxDailyDrowdown = x.max_daily_drowdown,
                    Profit = x.closed_profit_in_percents_total,
                    ProfitOrders = x.closed_profit_trades_total,
                    ProfitPoints = x.closed_profit_in_points_total,
                    Volatility = x.volatility_per_day
                }).ToArray();
            }));
        }