Files
quantconnect--lean/Common/Orders/UpdateOrderFields.cs
T
Jhonathan Abreu 906ab20bee Trailing stop orders (#7402)
* Add trailing stop orders base implementation

* Handle trailing stop order prices rounding

* Implement trailing stop orders fill logic

* Minor fill model changes

* Add ApplySplit to fill model interface for models that might need to be aware of splits.

Filling trailing stop orders require keeping track of min/max prices, which need to be split adjusted.

* Add brokerage order updated event for communicating certain order types prices changes

* Add order update event args class for brokerage side order updates

* Revert IFillModel.ApplySplit

* Add trailing stop orders regression algorithm

* Updated order ticket demo algorithm to include trailing stop orders

* Some cleanup

* Support trailing stop orders in IB brokerage model

* Some cleanup

* Fix failing tests

* Fix failing regression algorithm

* Address peer review

* Add trailing stop price calculation unit tests

* Minor changes

* Minor change
2023-07-28 17:49:58 -04:00

54 lines
1.7 KiB
C#

/*
* 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.Orders
{
/// <summary>
/// Specifies the data in an order to be updated
/// </summary>
public class UpdateOrderFields
{
/// <summary>
/// Specify to update the quantity of the order
/// </summary>
public decimal? Quantity { get; set; }
/// <summary>
/// Specify to update the limit price of the order
/// </summary>
public decimal? LimitPrice { get; set; }
/// <summary>
/// Specify to update the stop price of the order
/// </summary>
public decimal? StopPrice { get; set; }
/// <summary>
/// Specify to update the trigger price of the order
/// </summary>
public decimal? TriggerPrice { get; set; }
/// <summary>
/// The trailing stop order trailing amount
/// </summary>
public decimal? TrailingAmount { get; set; }
/// <summary>
/// Specify to update the order's tag
/// </summary>
public string Tag { get; set; }
}
}