Class IChartExtensions
- Namespace
- StockSharp.Charting
- Assembly
- StockSharp.Charting.Interfaces.dll
IChart extensions.
public static class IChartExtensions
- Inheritance
-
IChartExtensions
- Inherited Members
Fields
DefaultXAxisId
The primary title for the X-axis.
public const string DefaultXAxisId = "X"
Field Value
DefaultYAxisId
The primary title for the Y-axis.
public const string DefaultYAxisId = "Y"
Field Value
Properties
IndicatorProvider
public static IIndicatorProvider IndicatorProvider { get; }
Property Value
TryIndicatorProvider
public static IIndicatorProvider TryIndicatorProvider { get; }
Property Value
Methods
Add(IChartDrawDataItem, IChartCandleElement, ICandleMessage)
Put the candle data.
public static IChartDrawData.IChartDrawDataItem Add(this IChartDrawData.IChartDrawDataItem item, IChartCandleElement element, ICandleMessage candle)
Parameters
item
IChartDrawData.IChartDrawDataItemIChartDrawData.IChartDrawDataItem instance.
element
IChartCandleElementThe chart element representing a candle.
candle
ICandleMessageThe candle data.
Returns
Add(IChartDrawDataItem, IChartCandleElement, ICandleMessage, decimal, decimal, decimal, decimal, CandlePriceLevel[], CandleStates)
Put the candle data.
public static IChartDrawData.IChartDrawDataItem Add(this IChartDrawData.IChartDrawDataItem item, IChartCandleElement element, ICandleMessage candle, decimal openPrice, decimal highPrice, decimal lowPrice, decimal closePrice, CandlePriceLevel[] priceLevels, CandleStates state)
Parameters
item
IChartDrawData.IChartDrawDataItemIChartDrawData.IChartDrawDataItem instance.
element
IChartCandleElementThe chart element representing a candle.
candle
ICandleMessageCandle.
openPrice
decimalOpening price.
highPrice
decimalHighest price.
lowPrice
decimalLowest price.
closePrice
decimalClosing price.
priceLevels
CandlePriceLevel[]Price levels.
state
CandleStatesCandle state.
Returns
Add(IChartDrawDataItem, IChartElement, object)
Put the chart data.
public static IChartDrawData.IChartDrawDataItem Add(this IChartDrawData.IChartDrawDataItem item, IChartElement element, object value)
Parameters
item
IChartDrawData.IChartDrawDataItemIChartDrawData.IChartDrawDataItem instance.
element
IChartElementThe chart element.
value
objectThe chart value.
Returns
Add(IChartDrawDataItem, IChartOrderElement, Order, string)
Put the order data.
public static IChartDrawData.IChartDrawDataItem Add(this IChartDrawData.IChartDrawDataItem item, IChartOrderElement element, Order order, string errorMessage = null)
Parameters
item
IChartDrawData.IChartDrawDataItemIChartDrawData.IChartDrawDataItem instance.
element
IChartOrderElementThe chart element representing orders.
order
OrderThe order value.
errorMessage
stringError registering/cancelling order.
Returns
Add(IChartDrawDataItem, IChartTradeElement, MyTrade)
Put the order data.
public static IChartDrawData.IChartDrawDataItem Add(this IChartDrawData.IChartDrawDataItem item, IChartTradeElement element, MyTrade trade)
Parameters
item
IChartDrawData.IChartDrawDataItemIChartDrawData.IChartDrawDataItem instance.
element
IChartTradeElementThe chart element representing trades.
trade
MyTradeThe trade value.
Returns
ClearAreas(IChart)
To remove all areas from the chart.
public static void ClearAreas(this IChart chart)
Parameters
ExcludeObsolete(IEnumerable<IndicatorType>)
Exclude obsolete indicators.
public static IEnumerable<IndicatorType> ExcludeObsolete(this IEnumerable<IndicatorType> types)
Parameters
types
IEnumerable<IndicatorType>All indicator types.
Returns
- IEnumerable<IndicatorType>
Filtered collection.
FillIndicators(IChart)
Fill IndicatorTypes using IIndicatorProvider.
public static void FillIndicators(this IChart chart)
Parameters
chart
IChartChart.
GetAutoRange(IChartArea)
To use automatic range for the X-axis.
public static bool GetAutoRange(this IChartArea area)
Parameters
area
IChartArea
Returns
- bool
To use automatic range for the X-axis.
GetElements(IChart)
Get all elements.
public static IEnumerable<IChartElement> GetElements(this IChart chart)
Parameters
Returns
- IEnumerable<IChartElement>
Chart elements.
GetElements<T>(IChart)
Get all elements.
public static IEnumerable<T> GetElements<T>(this IChart chart) where T : IChartElement
Parameters
Returns
- IEnumerable<T>
Chart elements.
Type Parameters
T
IChartElement type.
IsDefault(IChartAxis)
Whether this axis can be removed from chart area.
public static bool IsDefault(this IChartAxis axis)
Parameters
axis
IChartAxis
Returns
SetAutoRange(IChartArea, bool)
To use automatic range for the X-axis.
public static void SetAutoRange(this IChartArea area, bool value)
Parameters
area
IChartAreavalue
boolTo use automatic range for the X-axis.
TryGetChart(IChartElement)
The chart on which the element is drawn.
public static IChart TryGetChart(this IChartElement elem)
Parameters
Returns
- IChart
The chart on which the element is drawn.
TryGetXAxis(IChartElement)
X axis this element currently attached to.
public static IChartAxis TryGetXAxis(this IChartElement elem)
Parameters
Returns
- IChartAxis
X axis this element currently attached to.
TryGetYAxis(IChartElement)
Y axis this element currently attached to.
public static IChartAxis TryGetYAxis(this IChartElement elem)
Parameters
Returns
- IChartAxis
Y axis this element currently attached to.