namespace StockSharp.Charting; /// /// Chart drawing data. /// public interface IChartDrawData { /// /// Chart drawing data item. /// public interface IChartDrawDataItem { /// /// Put candle color data. /// /// The chart element representing a candle. /// Candle draw color. /// instance. IChartDrawDataItem Add(IChartCandleElement element, Color? color); /// /// Put the candle data. /// /// The chart element representing a candle. /// . /// . /// Opening price. /// Highest price. /// Lowest price. /// Closing price. /// Price levels. /// Candle state. /// instance. IChartDrawDataItem Add(IChartCandleElement element, DataType dataType, SecurityId secId, decimal openPrice, decimal highPrice, decimal lowPrice, decimal closePrice, CandlePriceLevel[] priceLevels, CandleStates state); /// /// Put the indicator data. /// /// The chart element representing the indicator. /// The indicator value. /// instance. IChartDrawDataItem Add(IChartIndicatorElement element, IIndicatorValue value); /// /// Put the order data. /// /// The chart element representing orders. /// Order ID. /// Order ID (as string, if electronic board does not use numeric order ID representation). /// Order side (buy or sell). /// Order price. /// Number of contracts in the order. /// Error registering/cancelling order. /// instance. IChartDrawDataItem Add(IChartOrderElement element, long orderId, string orderStringId, Sides side, decimal price, decimal volume, string errorMessage = null); /// /// Put the trade data. /// /// The chart element representing trades. /// Trade ID. /// Trade ID (as string, if electronic board does not use numeric order ID representation). /// Order side (buy or sell). /// Trade price. /// Number of contracts in the trade. /// instance. IChartDrawDataItem Add(IChartTradeElement element, long tradeId, string tradeStringId, Sides side, decimal price, decimal volume); /// /// Put the line data. /// /// The chart element representing a line. /// The value1. /// The value2. /// instance. IChartDrawDataItem Add(IChartLineElement element, double value1, double value2 = double.NaN); /// /// Put the line data. /// /// The chart element representing a band. /// The value. /// instance. IChartDrawDataItem Add(IChartBandElement element, decimal value); /// /// Put the line data. /// /// The chart element representing a band. /// The value1. /// The value2. /// instance. IChartDrawDataItem Add(IChartBandElement element, double value1, double value2); } /// /// Initializes a new instance of the . /// /// The time stamp of the new data generation. /// instance. IChartDrawDataItem Group(DateTimeOffset timeStamp); /// /// Initializes a new instance of the . /// /// Value of X coordinate for the data. /// instance. IChartDrawDataItem Group(double xValue); /// /// Put the annotation data. /// /// The chart element representing an annotation. /// Annotation draw data. /// instance. IChartDrawData Add(IChartAnnotationElement element, IAnnotationData data); /// /// Put the active order data. /// /// The chart element representing active orders. /// The order. Can be null to draw just error animation without data. /// Do not allow user to edit the order from chart. /// Auto remove this order from chart when its state is final (, ). /// Whether the order element should be hidden. /// Whether an order operation has failed. /// Order price. /// Balance. /// Use this state to draw the order. /// instance. IChartDrawData Add(IChartActiveOrdersElement element, Order order, bool? isFrozen = null, bool autoRemoveFromChart = true, bool isHidden = false, bool? isError = null, decimal? price = null, decimal? balance = null, OrderStates? state = null); }