internal void CalculateTradePL(Quotation quotation) { this.TradePLFloat = TradePLCalculator.Calculate(_owner, quotation, null); if (_calculateParams.ChangedItem.HasFlag(ChangedItem.Quotation)) { this.CalculateLivePrice(quotation); } }
internal static decimal Calculate(TradePLFormula tradePLFormula, decimal lot, decimal contractSize, decimal buyPrice, decimal sellPrice, decimal closePrice, int decimals) { decimal result = TradePLCalculator.Calculate(tradePLFormula, lot * contractSize, buyPrice, sellPrice, closePrice); return(Math.Round(result, decimals, MidpointRounding.AwayFromZero)); }