Пример #1
0
		/// <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.HasTradeInfo())
				return null;

			_currentTurnOver += message.GetTradePrice() * message.SafeGetVolume();

			if (_currentTurnOver < TurnOver)
				return null;

			return (decimal)Value;
		}
Пример #2
0
		/// <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.HasTradeInfo() && message.SecurityId.BoardCode.CompareIgnoreCase(BoardCode))
				return (decimal)Value;
			
			return null;
		}
Пример #3
0
		/// <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.HasTradeInfo() && message.SecurityId.SecurityType == SecurityType)
				return (decimal)Value;
			
			return null;
		}
Пример #4
0
		/// <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.HasTradeInfo())
				return (decimal)(message.TradePrice * message.TradeVolume * Value);
			
			return null;
		}
Пример #5
0
		/// <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.HasTradeInfo())
				return null;

			if (++_currentCount < Count)
				return null;

			_currentCount = 0;
			return (decimal)Value;
		}
Пример #6
0
		/// <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.HasTradeInfo())
				return (decimal)Value;
			
			return null;
		}