ChartPanel

StockSharp.Xaml.Charting

The extended graphical component for candle charts displaying.

Inherits: UserControl

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

Constructors

ChartPanel
public ChartPanel()
chartPanel = ChartPanel()

Initializes a new instance of the ChartPanel.

Properties

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

Allow user to add new chart area.

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

Allow user to add new chart axis.

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

Allow user to add new candles elements.

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

Allow user to add new indicator elements.

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

Allow user to add new orders elements.

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

Allow user to add new own trades elements.

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

Chart areas.

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

The name of the graphic theme.

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

Crosshair.

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

To show values on the axis for the crosshair.

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

To show the prompt message for the crosshair.

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

Disable tracking indicator reset.

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

The list of available indicators types.

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

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

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

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

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

The interactive mode. The default is off.

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

The minimum number of visible candles.

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

The order creation mode. The default is off.

OrderSettings
public ChartPanelOrderSettings OrderSettings { get; }
value = chartPanel.OrderSettings

Chart order registering settings.

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

The provider of information about instruments.

ShareSettings
public ChartPanelShareSettings ShareSettings { get; }
value = chartPanel.ShareSettings

Chart share (upload image to web) settings.

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

To show the legend.

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

Show non formed indicators values.

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

To show the preview area.

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

Show FPS.

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

Subscriptions.

TimeFrames
public ICollection<TimeSpan> TimeFrames { get; }
value = chartPanel.TimeFrames

Available time-frames.

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

Local time zone for all DateTime values conversion.

UnderlyingChart
public IChart UnderlyingChart { get; }
value = chartPanel.UnderlyingChart

Underlying chart.

Methods

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

To add an area to the chart.

area
Chart area.
AddElement
public void AddElement(IChartArea area, IChartOrderElement element, Subscription subscription)
chartPanel.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, IChartElement element)
chartPanel.AddElement(area, element)

To add an element to the chart.

area
Chart area.
element
The chart element.
AddElement
public void AddElement(IChartArea area, IChartCandleElement element, Subscription subscription)
chartPanel.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, IChartIndicatorElement element, Subscription subscription, IIndicator indicator)
chartPanel.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, IChartTradeElement element, Subscription subscription)
chartPanel.AddElement(area, element, subscription)

To add an element to the chart.

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

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

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

Create IChartActiveOrdersElement instance.

Returns: IChartActiveOrdersElement instance.

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

Create IChartAnnotationElement instance.

Returns: IChartAnnotationElement instance.

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

Create IChartArea instance.

Returns: IChartArea instance.

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

Create IChartAxis instance.

Returns: IChartAxis instance.

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

Create IChartBandElement instance.

Returns: IChartBandElement instance.

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

Create IChartLineElement instance.

Returns: IChartLineElement instance.

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

Create IChartCandleElement instance.

Returns: IChartCandleElement instance.

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

Create IChartDrawData instance.

Returns: IChartDrawData instance.

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

Create IChartIndicatorElement instance.

Returns: IChartIndicatorElement instance.

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

Create IChartLineElement instance.

Returns: IChartLineElement instance.

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

Create IChartOrderElement instance.

Returns: IChartOrderElement instance.

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

Create IChartTradeElement instance.

Returns: IChartTradeElement instance.

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

To process the new data.

data
New data.
InitializeComponent
public void InitializeComponent()
chartPanel.InitializeComponent()

InitializeComponent

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

Load settings.

storage
Settings storage.
RegisterCandleStyle
public static void RegisterCandleStyle(string image, Func<string> getName, ChartCandleDrawStyles style)
ChartPanel.RegisterCandleStyle(image, getName, style)

Register candle style.

image
Image.
getName
Name.
style
Style of candles rendering.
RemoveArea
public void RemoveArea(IChartArea area)
chartPanel.RemoveArea(area)

To remove the area from the chart.

area
Chart area.
RemoveElement
public void RemoveElement(IChartArea area, IChartElement element)
chartPanel.RemoveElement(area, element)

To remove the element from the chart.

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

To reset the chart elements values drawn previously.

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

To re-subscribe to getting data for all elements.

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

Save settings.

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

To set the source for the element.

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

To get the data source for IChartElement.

element
The chart element.

Returns: Market-data source.

Events

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

Annotation created event.

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

Annotation deleted event.

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

Annotation modified event.

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

Annotation selection event.

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

Areas added event.

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

Areas removed event.

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

The event of the order cancellation.

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

The event of the order re-registration.

RegisterOrder
public event Action<IChartArea, Order> RegisterOrder
chartPanel.RegisterOrder += handler

The event of the order registration.

SettingsChanged
public event Action SettingsChanged
chartPanel.SettingsChanged += handler

The chart settings change event.

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

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

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

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

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

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

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

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

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

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

Fields

AddAreaCommand
public static readonly RoutedCommand AddAreaCommand
value = ChartPanel.AddAreaCommand

The command to add the area to the chart.

AddCandlesCommand
public static readonly RoutedCommand AddCandlesCommand
value = ChartPanel.AddCandlesCommand

The command to add candles to the chart.

AddIndicatorCommand
public static readonly RoutedCommand AddIndicatorCommand
value = ChartPanel.AddIndicatorCommand

The command to add the indicator to the chart.

PatternCommand
public static readonly RoutedCommand PatternCommand
value = ChartPanel.PatternCommand

The command for the pattern creation.

RegisterOrderCommand
public static readonly RoutedCommand RegisterOrderCommand
value = ChartPanel.RegisterOrderCommand

The command for the order registration.

ShareCommand
public static readonly RoutedCommand ShareCommand
value = ChartPanel.ShareCommand

The command for share chart as an image.