/// <summary> /// To calculate commission. /// </summary> /// <param name="message">The message containing the information about the order or own trade.</param> /// <returns>The commission. If the commission can not be calculated then <see langword="null" /> will be returned.</returns> protected override decimal? OnProcessExecution(ExecutionMessage message) { if (!message.HasOrderInfo()) return null; if (++_currentCount < Count) return null; _currentCount = 0; return (decimal)Value; }
/// <summary> /// To calculate commission. /// </summary> /// <param name="message">The message containing the information about the order or own trade.</param> /// <returns>The commission. If the commission can not be calculated then <see langword="null" /> will be returned.</returns> protected override decimal? OnProcessExecution(ExecutionMessage message) { if (message.HasOrderInfo()) return (decimal)(message.OrderVolume * Value); return null; }