/*
* 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.
*/
namespace QuantConnect.Statistics
{
///
/// Direction of a trade
///
public enum TradeDirection
{
///
/// Long direction (0)
///
Long,
///
/// Short direction (1)
///
Short
}
///
/// The method used to group order fills into trades
///
public enum FillGroupingMethod
{
///
/// A Trade is defined by a fill that establishes or increases a position and an offsetting fill that reduces the position size (0)
///
FillToFill,
///
/// A Trade is defined by a sequence of fills, from a flat position to a non-zero position which may increase or decrease in quantity, and back to a flat position (1)
///
FlatToFlat,
///
/// A Trade is defined by a sequence of fills, from a flat position to a non-zero position and an offsetting fill that reduces the position size (2)
///
FlatToReduced
}
///
/// The method used to match offsetting order fills
///
public enum FillMatchingMethod
{
///
/// First In First Out fill matching method (0)
///
FIFO,
///
/// Last In Last Out fill matching method (1)
///
LIFO
}
}