Table of Contents

Class ChartPanel

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

The extended graphical component for candle charts displaying.

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

Constructors

ChartPanel()

Initializes a new instance of the ChartPanel.

public ChartPanel()

Fields

AddAreaCommand

The command to add the area to the chart.

public static readonly RoutedCommand AddAreaCommand

Field Value

RoutedCommand

AddCandlesCommand

The command to add candles to the chart.

public static readonly RoutedCommand AddCandlesCommand

Field Value

RoutedCommand

AddIndicatorCommand

The command to add the indicator to the chart.

public static readonly RoutedCommand AddIndicatorCommand

Field Value

RoutedCommand

RegisterOrderCommand

The command for the order registration.

public static readonly RoutedCommand RegisterOrderCommand

Field Value

RoutedCommand

ShareCommand

The command for share chart as an image.

public static readonly RoutedCommand ShareCommand

Field Value

RoutedCommand

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

Areas

Chart areas.

public IEnumerable<IChartArea> Areas { get; }

Property Value

IEnumerable<IChartArea>

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

OrderSettings

Chart order registering settings.

public ChartPanelOrderSettings OrderSettings { get; }

Property Value

ChartPanelOrderSettings

SecurityProvider

The provider of information about instruments.

public ISecurityProvider SecurityProvider { get; set; }

Property Value

ISecurityProvider

ShareSettings

Chart share (upload image to web) settings.

public ChartPanelShareSettings ShareSettings { get; }

Property Value

ChartPanelShareSettings

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

TimeFrames

Available time-frames.

public ICollection<TimeSpan> TimeFrames { get; }

Property Value

ICollection<TimeSpan>

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.

CancelOrders(Func<Order, bool>)

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.

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.

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()

RegisterCandleStyle(string, Func<string>, ChartCandleDrawStyles)

Register candle style.

public static void RegisterCandleStyle(string image, Func<string> getName, ChartCandleDrawStyles style)

Parameters

image string

Image.

getName Func<string>

Name.

style ChartCandleDrawStyles

Style of candles rendering.

RemoveArea(IChartArea)

To remove the area from the chart.

public void RemoveArea(IChartArea area)

Parameters

area IChartArea

Chart area.

RemoveElement(IChartArea, IChartElement)

To remove the element from the chart.

public void RemoveElement(IChartArea area, IChartElement element)

Parameters

area IChartArea

Chart area.

element IChartElement

The chart element.

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

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 modified 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>

AreaRemoved

Areas removed event.

public event Action<IChartArea> AreaRemoved

Event Type

Action<IChartArea>

CancelOrder

The event of the order cancellation.

public event Action<Order> CancelOrder

Event Type

Action<Order>

MoveOrder

The event of the order re-registration.

public event Action<Order, decimal> MoveOrder

Event Type

Action<Order, decimal>

RegisterOrder

The event of the order registration.

public event Action<IChartArea, Order> RegisterOrder

Event Type

Action<IChartArea, Order>

SettingsChanged

The chart settings change event.

public event Action SettingsChanged

Event Type

Action

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>