Table of Contents

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

string

DefaultYAxisId

The primary title for the Y-axis.

public const string DefaultYAxisId = "Y"

Field Value

string

Properties

IndicatorProvider

public static IIndicatorProvider IndicatorProvider { get; }

Property Value

IIndicatorProvider

TryIndicatorProvider

public static IIndicatorProvider TryIndicatorProvider { get; }

Property Value

IIndicatorProvider

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.IChartDrawDataItem

IChartDrawData.IChartDrawDataItem instance.

element IChartCandleElement

The chart element representing a candle.

candle ICandleMessage

The candle data.

Returns

IChartDrawData.IChartDrawDataItem

IChartDrawData.IChartDrawDataItem instance.

Add(IChartDrawDataItem, IChartCandleElement, ICandleMessage, decimal, decimal, decimal, decimal)

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)

Parameters

item IChartDrawData.IChartDrawDataItem

IChartDrawData.IChartDrawDataItem instance.

element IChartCandleElement

The chart element representing a candle.

candle ICandleMessage

Candle.

openPrice decimal

Opening price.

highPrice decimal

Highest price.

lowPrice decimal

Lowest price.

closePrice decimal

Closing price.

Returns

IChartDrawData.IChartDrawDataItem

IChartDrawData.IChartDrawDataItem instance.

Add(IChartDrawDataItem, IChartCandleElement, ICandleMessage, decimal, decimal, decimal, decimal, CandlePriceLevel[])

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)

Parameters

item IChartDrawData.IChartDrawDataItem

IChartDrawData.IChartDrawDataItem instance.

element IChartCandleElement

The chart element representing a candle.

candle ICandleMessage

Candle.

openPrice decimal

Opening price.

highPrice decimal

Highest price.

lowPrice decimal

Lowest price.

closePrice decimal

Closing price.

priceLevels CandlePriceLevel[]

Price levels.

Returns

IChartDrawData.IChartDrawDataItem

IChartDrawData.IChartDrawDataItem instance.

Add(IChartDrawDataItem, IChartElement, object)

Put the chart data.

public static IChartDrawData.IChartDrawDataItem Add(this IChartDrawData.IChartDrawDataItem item, IChartElement element, object value)

Parameters

item IChartDrawData.IChartDrawDataItem

IChartDrawData.IChartDrawDataItem instance.

element IChartElement

The chart element.

value object

The chart value.

Returns

IChartDrawData.IChartDrawDataItem

IChartDrawData.IChartDrawDataItem instance.

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.IChartDrawDataItem

IChartDrawData.IChartDrawDataItem instance.

element IChartOrderElement

The chart element representing orders.

order Order

The order value.

errorMessage string

Error registering/cancelling order.

Returns

IChartDrawData.IChartDrawDataItem

IChartDrawData.IChartDrawDataItem instance.

Add(IChartDrawDataItem, IChartTradeElement, MyTrade)

Put the order data.

public static IChartDrawData.IChartDrawDataItem Add(this IChartDrawData.IChartDrawDataItem item, IChartTradeElement element, MyTrade trade)

Parameters

item IChartDrawData.IChartDrawDataItem

IChartDrawData.IChartDrawDataItem instance.

element IChartTradeElement

The chart element representing trades.

trade MyTrade

The trade value.

Returns

IChartDrawData.IChartDrawDataItem

IChartDrawData.IChartDrawDataItem instance.

ClearAreas(IChart)

To remove all areas from the chart.

public static void ClearAreas(this IChart chart)

Parameters

chart IChart

IChart

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)

public static void FillIndicators(this IChart chart)

Parameters

chart IChart

Chart.

GetAutoRange(IChartArea)

To use automatic range for the X-axis.

public static bool GetAutoRange(this IChartArea area)

Parameters

area IChartArea

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

chart IChart

IChart

Returns

IEnumerable<IChartElement>

Chart elements.

GetElements<T>(IChart)

Get all elements.

public static IEnumerable<T> GetElements<T>(this IChart chart) where T : IChartElement

Parameters

chart IChart

IChart

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

bool

IsIndicatorSupportedByChart(Type)

Check if indicator is supported by chart.

public static bool IsIndicatorSupportedByChart(this Type itype)

Parameters

itype Type

Returns

bool

SetAutoRange(IChartArea, bool)

To use automatic range for the X-axis.

public static void SetAutoRange(this IChartArea area, bool value)

Parameters

area IChartArea

IChartArea

value bool

To 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

elem IChartElement

IChartElement

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

elem IChartElement

IChartElement

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

elem IChartElement

IChartElement

Returns

IChartAxis

Y axis this element currently attached to.