Table of Contents

Class Chart

Namespace
StockSharp.Xaml.Charting
Assembly
StockSharp.Xaml.Charting.dll

The graphic component of the candles charts display.

public class Chart : UserControl, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild, IChart, IChartBuilder, IThemeableChart, IPersistable, INotifyPropertyChangedEx, INotifyPropertyChanged, IComponentConnector
Inheritance
Chart
Implements
IPersistable
INotifyPropertyChangedEx
Inherited Members
Extension Methods

Constructors

Chart()

Initializes a new instance of the Chart.

public Chart()

Properties

AllowAddArea

Allow user to add new chart area.

public bool AllowAddArea { get; set; }

Property Value

bool

AllowAddAxis

Allow user to add new chart axis.

public bool AllowAddAxis { get; set; }

Property Value

bool

AllowAddCandles

Allow user to add new candles elements.

public bool AllowAddCandles { get; set; }

Property Value

bool

AllowAddIndicators

Allow user to add new indicator elements.

public bool AllowAddIndicators { get; set; }

Property Value

bool

AllowAddOrders

Allow user to add new orders elements.

public bool AllowAddOrders { get; set; }

Property Value

bool

AllowAddOwnTrades

Allow user to add new own trades elements.

public bool AllowAddOwnTrades { get; set; }

Property Value

bool

AnnotationType

The prompt message type for drawing on the chart.

public ChartAnnotationTypes AnnotationType { get; set; }

Property Value

ChartAnnotationTypes

Areas

Chart areas.

public IEnumerable<IChartArea> Areas { get; }

Property Value

IEnumerable<IChartArea>

AutoRangeByAnnotations

To use annotations to define the visible range for the Y-axis.

public bool AutoRangeByAnnotations { get; set; }

Property Value

bool

AutoRangeInterval

Chart range/scroll interval. Default is 200ms.

public TimeSpan AutoRangeInterval { get; set; }

Property Value

TimeSpan

ChartTheme

The name of the graphic theme.

public string ChartTheme { get; set; }

Property Value

string

CrossHair

Crosshair.

public bool CrossHair { get; set; }

Property Value

bool

CrossHairAxisLabels

To show values on the axis for the crosshair.

public bool CrossHairAxisLabels { get; set; }

Property Value

bool

CrossHairTooltip

To show the prompt message for the crosshair.

public bool CrossHairTooltip { get; set; }

Property Value

bool

DisableIndicatorReset

Disable tracking indicator reset.

public bool DisableIndicatorReset { get; set; }

Property Value

bool

IndicatorTypes

The list of available indicators types.

public IList<IndicatorType> IndicatorTypes { get; }

Property Value

IList<IndicatorType>

IsAutoRange

To use automatic range for the X-axis. The default is off.

public bool IsAutoRange { get; set; }

Property Value

bool

IsAutoScroll

To scroll Areas areas automatically when new data occurred. The default is enabled.

public bool IsAutoScroll { get; set; }

Property Value

bool

IsInteracted

The interactive mode. The default is off.

public bool IsInteracted { get; set; }

Property Value

bool

MinimumRange

The minimum number of visible candles.

public int MinimumRange { get; set; }

Property Value

int

OrderCreationMode

The order creation mode. The default is off.

public bool OrderCreationMode { get; set; }

Property Value

bool

SecurityProvider

The provider of information about instruments.

public ISecurityProvider SecurityProvider { get; set; }

Property Value

ISecurityProvider

ShowLegend

To show the legend.

public bool ShowLegend { get; set; }

Property Value

bool

ShowNonFormedIndicators

Show non formed indicators values.

public bool ShowNonFormedIndicators { get; set; }

Property Value

bool

ShowOverview

To show the preview area.

public bool ShowOverview { get; set; }

Property Value

bool

ShowPerfStats

Show FPS.

public bool ShowPerfStats { get; set; }

Property Value

bool

TimeZone

Local time zone for all DateTimeOffset values conversion.

public TimeZoneInfo TimeZone { get; set; }

Property Value

TimeZoneInfo

Methods

AddArea(IChartArea)

To add an area to the chart.

public void AddArea(IChartArea area)

Parameters

area IChartArea

Chart area.

AddElement(IChartArea, IChartCandleElement, CandleSeries)

To add an element to the chart.

public void AddElement(IChartArea area, IChartCandleElement element, CandleSeries candleSeries)

Parameters

area IChartArea

Chart area.

element IChartCandleElement

The chart element.

candleSeries CandleSeries

Candles series.

AddElement(IChartArea, IChartElement)

To add an element to the chart.

public void AddElement(IChartArea area, IChartElement element)

Parameters

area IChartArea

Chart area.

element IChartElement

The chart element.

AddElement(IChartArea, IChartIndicatorElement, CandleSeries, IIndicator)

To add an element to the chart.

public void AddElement(IChartArea area, IChartIndicatorElement element, CandleSeries candleSeries, IIndicator indicator)

Parameters

area IChartArea

Chart area.

element IChartIndicatorElement

The chart element.

candleSeries CandleSeries

Candles series.

indicator IIndicator

Indicator.

AddElement(IChartArea, IChartOrderElement, Security)

To add an element to the chart.

public void AddElement(IChartArea area, IChartOrderElement element, Security security)

Parameters

area IChartArea

Chart area.

element IChartOrderElement

The chart element.

security Security

Security.

AddElement(IChartArea, IChartTradeElement, Security)

To add an element to the chart.

public void AddElement(IChartArea area, IChartTradeElement element, Security security)

Parameters

area IChartArea

Chart area.

element IChartTradeElement

The chart element.

security Security

Security.

CancelOrders(Func<Order, bool>)

Cancel orders that were added to this instance of Chart. This method does not cancel orders by itself. It just notifies subscribers with CancelOrder event.

public void CancelOrders(Func<Order, bool> predicate = null)

Parameters

predicate Func<Order, bool>

CreateActiveOrdersElement()

Create IChartActiveOrdersElement instance.

public IChartActiveOrdersElement CreateActiveOrdersElement()

Returns

IChartActiveOrdersElement

IChartActiveOrdersElement instance.

CreateAnnotation()

Create IChartAnnotation instance.

public IChartAnnotation CreateAnnotation()

Returns

IChartAnnotation

IChartAnnotation instance.

CreateArea()

Create IChartArea instance.

public IChartArea CreateArea()

Returns

IChartArea

IChartArea instance.

CreateAxis()

Create IChartAxis instance.

public IChartAxis CreateAxis()

Returns

IChartAxis

IChartAxis instance.

CreateBandElement()

Create IChartBandElement instance.

public IChartBandElement CreateBandElement()

Returns

IChartBandElement

IChartBandElement instance.

CreateBubbleElement()

Create IChartLineElement instance.

public IChartLineElement CreateBubbleElement()

Returns

IChartLineElement

IChartLineElement instance.

CreateCandleElement()

Create IChartCandleElement instance.

public IChartCandleElement CreateCandleElement()

Returns

IChartCandleElement

IChartCandleElement instance.

CreateData()

Create IChartDrawData instance.

public IChartDrawData CreateData()

Returns

IChartDrawData

IChartDrawData instance.

CreateIndicatorElement()

Create IChartIndicatorElement instance.

public IChartIndicatorElement CreateIndicatorElement()

Returns

IChartIndicatorElement

IChartIndicatorElement instance.

CreateLineElement()

Create IChartLineElement instance.

public IChartLineElement CreateLineElement()

Returns

IChartLineElement

IChartLineElement instance.

CreateOrderElement()

Create IChartOrderElement instance.

public IChartOrderElement CreateOrderElement()

Returns

IChartOrderElement

IChartOrderElement instance.

CreateTradeElement()

Create IChartTradeElement instance.

public IChartTradeElement CreateTradeElement()

Returns

IChartTradeElement

IChartTradeElement instance.

Draw(IChartDrawData)

To process the new data.

public void Draw(IChartDrawData data)

Parameters

data IChartDrawData

New data.

GetIndicator(IChartIndicatorElement)

To get an indicator which is associated with IChartIndicatorElement.

public IIndicator GetIndicator(IChartIndicatorElement element)

Parameters

element IChartIndicatorElement

The chart element.

Returns

IIndicator

Indicator.

GetSource(IChartElement)

To get the data source for IChartElement.

public object GetSource(IChartElement element)

Parameters

element IChartElement

The chart element.

Returns

object

Market-data source.

InitializeComponent()

InitializeComponent

public void InitializeComponent()

Load(SettingsStorage)

Load settings.

public void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

ReSubscribeElements()

To re-subscribe to getting data for all elements.

public void ReSubscribeElements()

RemoveArea(IChartArea)

To remove the area from the chart.

public void RemoveArea(IChartArea area)

Parameters

area IChartArea

Chart area.

Reset(IEnumerable<IChartElement>)

To reset the chart elements values drawn previously.

public void Reset(IEnumerable<IChartElement> elements)

Parameters

elements IEnumerable<IChartElement>

Chart elements.

Save(SettingsStorage)

Save settings.

public void Save(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

SetSource(IChartElement, object)

To set the source for the element.

public void SetSource(IChartElement element, object source)

Parameters

element IChartElement

The chart element.

source object

Source.

Events

AddCandles

The chart element creation event.

public event Action<ChartArea> AddCandles

Event Type

Action<ChartArea>

AddIndicator

The chart element creation event.

public event Action<ChartArea> AddIndicator

Event Type

Action<ChartArea>

AddOrders

The chart element creation event.

public event Action<ChartArea> AddOrders

Event Type

Action<ChartArea>

AddTrades

The chart element creation event.

public event Action<ChartArea> AddTrades

Event Type

Action<ChartArea>

AnnotationCreated

Annotation created event.

public event Action<IChartAnnotation> AnnotationCreated

Event Type

Action<IChartAnnotation>

AnnotationDeleted

Annotation deleted event.

public event Action<IChartAnnotation> AnnotationDeleted

Event Type

Action<IChartAnnotation>

AnnotationModified

Annotation created event.

public event Action<IChartAnnotation, ChartDrawData.AnnotationData> AnnotationModified

Event Type

Action<IChartAnnotation, ChartDrawData.AnnotationData>

AnnotationSelected

Annotation selection event.

public event Action<IChartAnnotation, ChartDrawData.AnnotationData> AnnotationSelected

Event Type

Action<IChartAnnotation, ChartDrawData.AnnotationData>

AreaAdded

Areas added event.

public event Action<IChartArea> AreaAdded

Event Type

Action<IChartArea>

AreaAdding

The chart area creation event.

public event Action AreaAdding

Event Type

Action

AreaRemoved

Areas removed event.

public event Action<IChartArea> AreaRemoved

Event Type

Action<IChartArea>

CancelOrder

Cancel order event.

public event Action<Order> CancelOrder

Event Type

Action<Order>

CreateOrder

The new order creation event.

public event Action<ChartArea, Order> CreateOrder

Event Type

Action<ChartArea, Order>

MoveOrder

Move order event.

public event Action<Order, decimal> MoveOrder

Event Type

Action<Order, decimal>

RebuildCandles

Rebuild candles event.

public event Action<IChartElement, CandleSeries> RebuildCandles

Event Type

Action<IChartElement, CandleSeries>

RemoveElement

The chart element removal event.

public event Action<IChartElement> RemoveElement

Event Type

Action<IChartElement>

SubscribeCandleElement

The event of the subscription to getting data for the element.

public event Action<IChartCandleElement, CandleSeries> SubscribeCandleElement

Event Type

Action<IChartCandleElement, CandleSeries>

SubscribeIndicatorElement

The event of the subscription to getting data for the element.

public event Action<IChartIndicatorElement, CandleSeries, IIndicator> SubscribeIndicatorElement

Event Type

Action<IChartIndicatorElement, CandleSeries, IIndicator>

SubscribeOrderElement

The event of the subscription to getting data for the element.

public event Action<IChartOrderElement, Security> SubscribeOrderElement

Event Type

Action<IChartOrderElement, Security>

SubscribeTradeElement

The event of the subscription to getting data for the element.

public event Action<IChartTradeElement, Security> SubscribeTradeElement

Event Type

Action<IChartTradeElement, Security>

UnSubscribeElement

The event of the unsubscribe from getting data for the element.

public event Action<IChartElement> UnSubscribeElement

Event Type

Action<IChartElement>