You can achieve this by using .Any() in your LINQ query to check if there are any trades associated with a given MainAccount.
Perhaps something like this:
select new MainAccountDto
{
AccountId = ma.AccountId,
HasTrades = context.Trades.Any(t => t.AccountId == ma.AccountId)
};