/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using QuantConnect.Orders;
using System;
namespace QuantConnect.Brokerages.CrossZero
{
///
/// Represents a first request to cross zero order.
///
public class CrossZeroFirstOrderRequest
{
///
/// Gets the original lean order.
///
public Order LeanOrder { get; }
///
/// Gets the type of the order.
///
public OrderType OrderType { get; }
///
/// Gets the quantity of the order.
///
public decimal OrderQuantity { get; }
///
/// Gets the absolute quantity of the order.
///
public decimal AbsoluteOrderQuantity => Math.Abs(OrderQuantity);
///
/// Gets the current holding quantity of the order's symbol.
///
public decimal OrderQuantityHolding { get; }
///
/// Gets the position of the order.
///
///
/// The position of the order, which depends on the .
///
public OrderPosition OrderPosition { get; }
///
/// Initializes a new instance of the struct.
///
/// The lean order.
/// The type of the order.
/// The quantity of the order.
/// The current holding quantity of the order's symbol.
/// The position of the order, which depends on the .
public CrossZeroFirstOrderRequest(Order leanOrder, OrderType orderType, decimal orderQuantity, decimal orderQuantityHolding, OrderPosition orderPosition)
{
LeanOrder = leanOrder;
OrderType = orderType;
OrderQuantity = orderQuantity;
OrderPosition = orderPosition;
OrderQuantityHolding = orderQuantityHolding;
}
}
}