using MuchInfo.Chart.Data.Interfaces; using Newtonsoft.Json; using System; namespace MuchInfo.Chart.Data.Models { /// /// 柱数据点 /// public class BarDataPoint : OHLCDataPoint, IBarDataPoint { #region Constructors /// /// 构造函数 /// /// 日期 /// 开盘价 /// 最高价 /// 最低价 /// 收盘价 /// 涨幅 /// 成交量 /// 成交额 /// 持仓量 [JsonConstructor] public BarDataPoint(DateTime date, float open, float high, float low, float close, float volume, float turnOver, float holdVolume, float increase = 0) : base(date, open, high, low, close, increase) { this.Volume = volume; this.Turnover = turnOver; this.HoldVolume = holdVolume; } /// /// 在指标编辑器中使用这个构造函数 /// /// 时间 /// 值 public BarDataPoint(DateTime date, float value) : base(date, value, value, value, value) { } #endregion Constructors #region Properties #region Public Properties /// /// 持仓量 /// /// The hold volume. public float HoldVolume { get; set; } /// /// 成交额 /// public float Turnover { get; set; } /// /// 成交量 /// public float Volume { get; set; } #endregion Public Properties #endregion Properties } }