mirror of
https://github.com/StockSharp/StockSharp.git
synced 2026-12-06 17:42:13 +00:00
50 lines
1.2 KiB
C#
50 lines
1.2 KiB
C#
namespace StockSharp.Coinbase;
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Runtime.Serialization;
|
|
|
|
/// <summary>
|
|
/// <see cref="Coinbase"/> order condition.
|
|
/// </summary>
|
|
[Serializable]
|
|
[DataContract]
|
|
[Display(ResourceType = typeof(LocalizedStrings), Name = LocalizedStrings.CoinbaseKey)]
|
|
public class CoinbaseOrderCondition : BaseWithdrawOrderCondition, IStopLossOrderCondition
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="CoinbaseOrderCondition"/>.
|
|
/// </summary>
|
|
public CoinbaseOrderCondition()
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Activation price, when reached an order will be placed.
|
|
/// </summary>
|
|
[DataMember]
|
|
[Display(
|
|
ResourceType = typeof(LocalizedStrings),
|
|
Name = LocalizedStrings.StopPriceKey,
|
|
Description = LocalizedStrings.StopPriceDescKey,
|
|
GroupName = LocalizedStrings.StopLossKey,
|
|
Order = 0)]
|
|
public decimal? StopPrice
|
|
{
|
|
get => (decimal?)Parameters.TryGetValue(nameof(StopPrice));
|
|
set => Parameters[nameof(StopPrice)] = value;
|
|
}
|
|
|
|
decimal? IStopLossOrderCondition.ClosePositionPrice { get; set; }
|
|
|
|
decimal? IStopLossOrderCondition.ActivationPrice
|
|
{
|
|
get => StopPrice;
|
|
set => StopPrice = value;
|
|
}
|
|
|
|
bool IStopLossOrderCondition.IsTrailing
|
|
{
|
|
get => false;
|
|
set { }
|
|
}
|
|
} |