|| (order.OrderAction == Cbi.OrderAction.BuyToCover && order.LimitPrice > nextLow - epsilon)
|| (order.OrderAction == Cbi.OrderAction.Sell && order.LimitPrice < nextHigh + epsilon)
|| (order.OrderAction == Cbi.OrderAction.SellShort && order.LimitPrice < nextHigh + epsilon))
FillPrice = (order.OrderAction == Cbi.OrderAction.Buy || order.OrderAction == Cbi.OrderAction.BuyToCover) ? Math.Min(order.LimitPrice, nextHigh) : Math.Max(order.LimitPrice, nextLow); // set fill price
}
Comment