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