Chart

StockSharp.Xaml.Charting

The graphic component of the candles charts display.

Inherits: UserControl

Implements: IWpfChart, IChart, IChartBuilder, IThemeableChart, IPersistable, INotifyPropertyChangedEx, INotifyPropertyChanged, IComponentConnector

Constructors

Chart
public Chart()
chart = Chart()

Initializes a new instance of the Chart.

Properties

AllowAddArea
public bool AllowAddArea { get; set; }
value = chart.AllowAddArea
chart.AllowAddArea = value

Allow user to add new chart area.

AllowAddAxis
public bool AllowAddAxis { get; set; }
value = chart.AllowAddAxis
chart.AllowAddAxis = value

Allow user to add new chart axis.

AllowAddCandles
public bool AllowAddCandles { get; set; }
value = chart.AllowAddCandles
chart.AllowAddCandles = value

Allow user to add new candles elements.

AllowAddIndicators
public bool AllowAddIndicators { get; set; }
value = chart.AllowAddIndicators
chart.AllowAddIndicators = value

Allow user to add new indicator elements.

AllowAddOrders
public bool AllowAddOrders { get; set; }
value = chart.AllowAddOrders
chart.AllowAddOrders = value

Allow user to add new orders elements.

AllowAddOwnTrades
public bool AllowAddOwnTrades { get; set; }
value = chart.AllowAddOwnTrades
chart.AllowAddOwnTrades = value

Allow user to add new own trades elements.

AnnotationType
public ChartAnnotationTypes AnnotationType { get; set; }
value = chart.AnnotationType
chart.AnnotationType = value

The prompt message type for drawing on the chart.

Areas
public IEnumerable<IChartArea> Areas { get; }
value = chart.Areas

Chart areas.

AutoRangeByAnnotations
public bool AutoRangeByAnnotations { get; set; }
value = chart.AutoRangeByAnnotations
chart.AutoRangeByAnnotations = value

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

AutoRangeInterval
public TimeSpan AutoRangeInterval { get; set; }
value = chart.AutoRangeInterval
chart.AutoRangeInterval = value

Chart range/scroll interval. Default is 200ms.

ChartTheme
public string ChartTheme { get; set; }
value = chart.ChartTheme
chart.ChartTheme = value

The name of the graphic theme.

CrossHair
public bool CrossHair { get; set; }
value = chart.CrossHair
chart.CrossHair = value

Crosshair.

CrossHairAxisLabels
public bool CrossHairAxisLabels { get; set; }
value = chart.CrossHairAxisLabels
chart.CrossHairAxisLabels = value

To show values on the axis for the crosshair.

CrossHairTooltip
public bool CrossHairTooltip { get; set; }
value = chart.CrossHairTooltip
chart.CrossHairTooltip = value

To show the prompt message for the crosshair.

DefaultCandlesSettings
public MarketDataMessage DefaultCandlesSettings { get; set; }
value = chart.DefaultCandlesSettings
chart.DefaultCandlesSettings = value

Default settings for the candles subscription.

DisableIndicatorReset
public bool DisableIndicatorReset { get; set; }
value = chart.DisableIndicatorReset
chart.DisableIndicatorReset = value

Disable tracking indicator reset.

IndicatorTypes
public IList<IndicatorType> IndicatorTypes { get; }
value = chart.IndicatorTypes

The list of available indicators types.

IsAutoRange
public bool IsAutoRange { get; set; }
value = chart.IsAutoRange
chart.IsAutoRange = value

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

IsAutoScroll
public bool IsAutoScroll { get; set; }
value = chart.IsAutoScroll
chart.IsAutoScroll = value

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

IsInteracted
public bool IsInteracted { get; set; }
value = chart.IsInteracted
chart.IsInteracted = value

The interactive mode. The default is off.

MinimumRange
public int MinimumRange { get; set; }
value = chart.MinimumRange
chart.MinimumRange = value

The minimum number of visible candles.

OrderCreationMode
public bool OrderCreationMode { get; set; }
value = chart.OrderCreationMode
chart.OrderCreationMode = value

The order creation mode. The default is off.

Security
internal Security Security { get; private set; }
value = chart.Security
chart.Security = value

Chart main security.

SecurityProvider
public ISecurityProvider SecurityProvider { get; set; }
value = chart.SecurityProvider
chart.SecurityProvider = value

The provider of information about instruments.

ShowLegend
public bool ShowLegend { get; set; }
value = chart.ShowLegend
chart.ShowLegend = value

To show the legend.

ShowNonFormedIndicators
public bool ShowNonFormedIndicators { get; set; }
value = chart.ShowNonFormedIndicators
chart.ShowNonFormedIndicators = value

Show non formed indicators values.

ShowOverview
public bool ShowOverview { get; set; }
value = chart.ShowOverview
chart.ShowOverview = value

To show the preview area.

ShowPerfStats
public bool ShowPerfStats { get; set; }
value = chart.ShowPerfStats
chart.ShowPerfStats = value

Show FPS.

Subscription
internal Subscription Subscription { get; private set; }
value = chart.Subscription
chart.Subscription = value

Chart main candle series.

Subscriptions
public IEnumerable<Subscription> Subscriptions { get; }
value = chart.Subscriptions

Subscriptions.

TimeZone
public TimeZoneInfo TimeZone { get; set; }
value = chart.TimeZone
chart.TimeZone = value

Local time zone for all DateTime values conversion.

Methods

AddArea
public void AddArea(IChartArea area)
chart.AddArea(area)

To add an area to the chart.

area
Chart area.
AddElement
public void AddElement(IChartArea area, IChartCandleElement element, Subscription subscription)
chart.AddElement(area, element, subscription)

To add a candle element to the chart.

area
Chart area.
element
The candle chart element.
subscription
Subscription.
AddElement
public void AddElement(IChartArea area, IChartTradeElement element, Subscription subscription)
chart.AddElement(area, element, subscription)

To add an element to the chart.

area
Chart area.
element
The chart element.
subscription
Subscription.
AddElement
public void AddElement(IChartArea area, IChartOrderElement element, Subscription subscription)
chart.AddElement(area, element, subscription)

To add an element to the chart.

area
Chart area.
element
The chart element.
subscription
Subscription.
AddElement
public void AddElement(IChartArea area, IChartIndicatorElement element, Subscription subscription, IIndicator indicator)
chart.AddElement(area, element, subscription, indicator)

To add an indicator element to the chart.

area
Chart area.
element
The indicator chart element.
subscription
Subscription.
indicator
Indicator.
AddElement
public void AddElement(IChartArea area, IChartElement element)
chart.AddElement(area, element)

To add an element to the chart.

area
Chart area.
element
The chart element.
CancelOrders
public void CancelOrders(Func<Order, bool> predicate)
chart.CancelOrders(predicate)

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.

CreateActiveOrdersElement
public IChartActiveOrdersElement CreateActiveOrdersElement()
result = chart.CreateActiveOrdersElement()

Create IChartActiveOrdersElement instance.

Returns: IChartActiveOrdersElement instance.

CreateAnnotation
public IChartAnnotationElement CreateAnnotation()
result = chart.CreateAnnotation()

Create IChartAnnotationElement instance.

Returns: IChartAnnotationElement instance.

CreateArea
public IChartArea CreateArea()
result = chart.CreateArea()

Create IChartArea instance.

Returns: IChartArea instance.

CreateAxis
public IChartAxis CreateAxis()
result = chart.CreateAxis()

Create IChartAxis instance.

Returns: IChartAxis instance.

CreateBandElement
public IChartBandElement CreateBandElement()
result = chart.CreateBandElement()

Create IChartBandElement instance.

Returns: IChartBandElement instance.

CreateBubbleElement
public IChartLineElement CreateBubbleElement()
result = chart.CreateBubbleElement()

Create IChartLineElement instance.

Returns: IChartLineElement instance.

CreateCandleElement
public IChartCandleElement CreateCandleElement()
result = chart.CreateCandleElement()

Create IChartCandleElement instance.

Returns: IChartCandleElement instance.

CreateData
public IChartDrawData CreateData()
result = chart.CreateData()

Create IChartDrawData instance.

Returns: IChartDrawData instance.

CreateIndicatorElement
public IChartIndicatorElement CreateIndicatorElement()
result = chart.CreateIndicatorElement()

Create IChartIndicatorElement instance.

Returns: IChartIndicatorElement instance.

CreateLineElement
public IChartLineElement CreateLineElement()
result = chart.CreateLineElement()

Create IChartLineElement instance.

Returns: IChartLineElement instance.

CreateOrderElement
public IChartOrderElement CreateOrderElement()
result = chart.CreateOrderElement()

Create IChartOrderElement instance.

Returns: IChartOrderElement instance.

CreateTradeElement
public IChartTradeElement CreateTradeElement()
result = chart.CreateTradeElement()

Create IChartTradeElement instance.

Returns: IChartTradeElement instance.

Draw
public void Draw(IChartDrawData data)
chart.Draw(data)

To process the new data.

data
New data.
GetIndicator
public IIndicator GetIndicator(IChartIndicatorElement element)
result = chart.GetIndicator(element)

To get an indicator which is associated with IChartIndicatorElement.

element
The chart element.

Returns: Indicator.

InitializeComponent
public void InitializeComponent()
chart.InitializeComponent()

InitializeComponent

Load
public void Load(SettingsStorage storage)
chart.Load(storage)

Load settings.

storage
Settings storage.
RemoveArea
public void RemoveArea(IChartArea area)
chart.RemoveArea(area)

To remove the area from the chart.

area
Chart area.
Reset
public void Reset(IEnumerable<IChartElement> elements)
chart.Reset(elements)

To reset the chart elements values drawn previously.

elements
Chart elements.
ReSubscribeElements
public void ReSubscribeElements()
chart.ReSubscribeElements()

To re-subscribe to getting data for all elements.

Save
public void Save(SettingsStorage storage)
chart.Save(storage)

Save settings.

storage
Settings storage.
SetSubscription
public void SetSubscription(IChartElement element, Subscription subscription)
chart.SetSubscription(element, subscription)

To set the source for the element.

element
The chart element.
subscription
Subscription.
TryGetSubscription
public Subscription TryGetSubscription(IChartElement element)
result = chart.TryGetSubscription(element)

To get the data source for IChartElement.

element
The chart element.

Returns: Market-data source.

Events

AddCandles
public event Action<ChartArea> AddCandles
chart.AddCandles += handler

The chart element creation event.

AddIndicator
public event Action<ChartArea> AddIndicator
chart.AddIndicator += handler

The chart element creation event.

AddOrders
public event Action<ChartArea> AddOrders
chart.AddOrders += handler

The chart element creation event.

AddTrades
public event Action<ChartArea> AddTrades
chart.AddTrades += handler

The chart element creation event.

AnnotationCreated
public event Action<IChartAnnotationElement> AnnotationCreated
chart.AnnotationCreated += handler

Annotation created event.

AnnotationDeleted
public event Action<IChartAnnotationElement> AnnotationDeleted
chart.AnnotationDeleted += handler

Annotation deleted event.

AnnotationModified
public event Action<IChartAnnotationElement, AnnotationData> AnnotationModified
chart.AnnotationModified += handler

Annotation created event.

AnnotationSelected
public event Action<IChartAnnotationElement, AnnotationData> AnnotationSelected
chart.AnnotationSelected += handler

Annotation selection event.

AreaAdded
public event Action<IChartArea> AreaAdded
chart.AreaAdded += handler

Areas added event.

AreaAdding
public event Action AreaAdding
chart.AreaAdding += handler

The chart area creation event.

AreaRemoved
public event Action<IChartArea> AreaRemoved
chart.AreaRemoved += handler

Areas removed event.

CancelOrder
public event Action<Order> CancelOrder
chart.CancelOrder += handler

Cancel order event.

CreateOrder
public event Action<ChartArea, Order> CreateOrder
chart.CreateOrder += handler

The new order creation event.

MoveOrder
public event Action<Order, decimal> MoveOrder
chart.MoveOrder += handler

Move order event.

RebuildCandles
public event Action<IChartElement, Subscription> RebuildCandles
chart.RebuildCandles += handler

Rebuild candles event.

RemoveElement
public event Action<IChartElement> RemoveElement
chart.RemoveElement += handler

The chart element removal event.

SecurityChanged
internal event Action SecurityChanged
chart.SecurityChanged += handler

The event indicates that chart's main security was changed.

SubscribeCandleElement
public event Action<IChartCandleElement, Subscription> SubscribeCandleElement
chart.SubscribeCandleElement += handler

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

SubscribeIndicatorElement
public event Action<IChartIndicatorElement, Subscription, IIndicator> SubscribeIndicatorElement
chart.SubscribeIndicatorElement += handler

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

SubscribeOrderElement
public event Action<IChartOrderElement, Subscription> SubscribeOrderElement
chart.SubscribeOrderElement += handler

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

SubscribeTradeElement
public event Action<IChartTradeElement, Subscription> SubscribeTradeElement
chart.SubscribeTradeElement += handler

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

UnSubscribeElement
public event Action<IChartElement> UnSubscribeElement
chart.UnSubscribeElement += handler

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