using MuchInfo.Chart.Data.Interfaces; using System; namespace MuchInfo.Chart.Data.Models { /// /// OHLC数据点 /// public class OHLCDataPoint : IOHLCDataPoint { #region Constructors /// /// 构造函数 /// /// 日期 /// 开盘价 /// 最高价 /// 最低价 /// 收盘价 /// 涨幅 public OHLCDataPoint(DateTime date, float open, float high, float low, float close, float increase = 0, float increaseValue = 0) { this.Date = date; this.Open = open; this.Low = low; this.High = high; this.Close = close; this.Value = close; this.Increase = increase; this.IncreaseValue = increaseValue; } /// /// 在指标编辑器中使用这个构造函数 /// /// 时间 /// 值 public OHLCDataPoint(DateTime date, float value) { this.Date = date; this.Value = value; } #endregion Constructors #region Properties #region Public Properties /// /// 收盘价 /// public float Close { get; set; } /// /// 日期 /// public DateTime Date { get; set; } /// /// 最高价 /// public float High { get; set; } /// /// 涨幅 /// /// The increase. public float Increase { get; set; } /// /// 涨跌 /// /// The increase. public float IncreaseValue { get; set; } /// /// 最低价 /// public float Low { get; set; } /// /// 开盘价 /// public float Open { get; set; } /// /// 值 /// public float Value { get; set; } #endregion Public Properties #endregion Properties } }