You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
130 lines
3.5 KiB
130 lines
3.5 KiB
using Binance.TradeRobot.Model.Base;
|
|
using FreeSql.DataAnnotations;
|
|
using System;
|
|
|
|
namespace Binance.TradeRobot.Model.Db
|
|
{
|
|
|
|
[Table(DisableSyncStructure = true)]
|
|
public partial class Robot
|
|
{
|
|
|
|
[Column(IsPrimary = true)]
|
|
public long Id { get; set; }
|
|
|
|
[Column(InsertValueSql = "getdate()")]
|
|
public DateTime CreateTime { get; set; }
|
|
|
|
[Column(MapType = (typeof(int)))]
|
|
public Enums.TradePolicy TradePolicy { get; set; }
|
|
|
|
/// <summary>
|
|
/// 运行时长(s)
|
|
/// </summary>
|
|
public long RunningTime { get; set; } = 0;
|
|
|
|
[Column(MapType = (typeof(int)))]
|
|
public Enums.RobotState State { get; set; }
|
|
|
|
[Column(StringLength = 50, IsNullable = false)]
|
|
public string Symbol { get; set; }
|
|
|
|
[Column(MapType = (typeof(int)))]
|
|
public Enums.BusinessType BusinessType { get; set; }
|
|
|
|
[Column(MapType = (typeof(int)))]
|
|
public Enums.Exchange ExchangeId { get; set; }
|
|
|
|
#region RobotAccount Extension
|
|
|
|
[Column(IsIgnore = true)]
|
|
public long RobotAccountId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 平仓次数
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public long ClosePositionCount { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// 现货/杠杆持仓金额
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public decimal SoptCurrentcyAmount { get; set; } = 0.0M;
|
|
|
|
/// <summary>
|
|
/// 现货/杠杆持仓数量
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public decimal SpotCurrencyQuantity { get; set; } = 0.0M;
|
|
|
|
/// <summary>
|
|
/// 总收益
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public decimal TotalProfit { get; set; } = 0.0M;
|
|
|
|
/// <summary>
|
|
/// 盈利次数
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public long WinCount { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// 总借币金额
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public decimal LoanAmount { get; set; } = 0.0M;
|
|
#endregion
|
|
|
|
#region D21Policy Extension
|
|
[Column(IsIgnore = true)]
|
|
public long D21PolicyId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 执行模式
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public Enums.ExecutionMode D21ExecutionMode { get; set; } = Enums.ExecutionMode.Both;
|
|
|
|
/// <summary>
|
|
/// 是否开启增购
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public bool D21IsEnabledIncreasePurchase { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// 是否开启错误信号补救
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public bool D21IsEnableRemedyForErrorCrossSignal { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// 最大追高比例
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public decimal D21MaxFollowPurchaseRatio { get; set; } = 0.0M;
|
|
|
|
/// <summary>
|
|
/// 信号周期
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public Enums.SignalPeriod D21PeriodicSignal { get; set; }
|
|
|
|
/// <summary>
|
|
/// 仓位
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public decimal D21Position { get; set; } = 0.0M;
|
|
|
|
/// <summary>
|
|
/// 止损比例
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public decimal D21StopLossRatio { get; set; }
|
|
|
|
[Column(IsIgnore = true)]
|
|
public DateTime D21CreateTime { get; set; }
|
|
#endregion
|
|
}
|
|
}
|
|
|