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
-
IPersistableINotifyPropertyChangedEx
- 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
AllowAddAxis
Allow user to add new chart axis.
public bool AllowAddAxis { get; set; }
Property Value
AllowAddCandles
Allow user to add new candles elements.
public bool AllowAddCandles { get; set; }
Property Value
AllowAddIndicators
Allow user to add new indicator elements.
public bool AllowAddIndicators { get; set; }
Property Value
AllowAddOrders
Allow user to add new orders elements.
public bool AllowAddOrders { get; set; }
Property Value
AllowAddOwnTrades
Allow user to add new own trades elements.
public bool AllowAddOwnTrades { get; set; }
Property Value
AnnotationType
The prompt message type for drawing on the chart.
public ChartAnnotationTypes AnnotationType { get; set; }
Property Value
Areas
Chart areas.
public IEnumerable<IChartArea> Areas { get; }
Property Value
AutoRangeByAnnotations
To use annotations to define the visible range for the Y-axis.
public bool AutoRangeByAnnotations { get; set; }
Property Value
AutoRangeInterval
Chart range/scroll interval. Default is 200ms.
public TimeSpan AutoRangeInterval { get; set; }
Property Value
ChartTheme
The name of the graphic theme.
public string ChartTheme { get; set; }
Property Value
CrossHair
Crosshair.
public bool CrossHair { get; set; }
Property Value
CrossHairAxisLabels
To show values on the axis for the crosshair.
public bool CrossHairAxisLabels { get; set; }
Property Value
CrossHairTooltip
To show the prompt message for the crosshair.
public bool CrossHairTooltip { get; set; }
Property Value
DisableIndicatorReset
Disable tracking indicator reset.
public bool DisableIndicatorReset { get; set; }
Property Value
IndicatorTypes
The list of available indicators types.
public IList<IndicatorType> IndicatorTypes { get; }
Property Value
IsAutoRange
To use automatic range for the X-axis. The default is off.
public bool IsAutoRange { get; set; }
Property Value
IsAutoScroll
To scroll Areas areas automatically when new data occurred. The default is enabled.
public bool IsAutoScroll { get; set; }
Property Value
IsInteracted
The interactive mode. The default is off.
public bool IsInteracted { get; set; }
Property Value
MinimumRange
The minimum number of visible candles.
public int MinimumRange { get; set; }
Property Value
OrderCreationMode
The order creation mode. The default is off.
public bool OrderCreationMode { get; set; }
Property Value
SecurityProvider
The provider of information about instruments.
public ISecurityProvider SecurityProvider { get; set; }
Property Value
ShowLegend
To show the legend.
public bool ShowLegend { get; set; }
Property Value
ShowNonFormedIndicators
Show non formed indicators values.
public bool ShowNonFormedIndicators { get; set; }
Property Value
ShowOverview
To show the preview area.
public bool ShowOverview { get; set; }
Property Value
ShowPerfStats
Show FPS.
public bool ShowPerfStats { get; set; }
Property Value
TimeZone
Local time zone for all DateTimeOffset values conversion.
public TimeZoneInfo TimeZone { get; set; }
Property Value
Methods
AddArea(IChartArea)
To add an area to the chart.
public void AddArea(IChartArea area)
Parameters
area
IChartAreaChart area.
AddElement(IChartArea, IChartCandleElement, CandleSeries)
To add an element to the chart.
public void AddElement(IChartArea area, IChartCandleElement element, CandleSeries candleSeries)
Parameters
area
IChartAreaChart area.
element
IChartCandleElementThe chart element.
candleSeries
CandleSeriesCandles series.
AddElement(IChartArea, IChartElement)
To add an element to the chart.
public void AddElement(IChartArea area, IChartElement element)
Parameters
area
IChartAreaChart area.
element
IChartElementThe 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
IChartAreaChart area.
element
IChartIndicatorElementThe chart element.
candleSeries
CandleSeriesCandles series.
indicator
IIndicatorIndicator.
AddElement(IChartArea, IChartOrderElement, Security)
To add an element to the chart.
public void AddElement(IChartArea area, IChartOrderElement element, Security security)
Parameters
area
IChartAreaChart area.
element
IChartOrderElementThe chart element.
security
SecuritySecurity.
AddElement(IChartArea, IChartTradeElement, Security)
To add an element to the chart.
public void AddElement(IChartArea area, IChartTradeElement element, Security security)
Parameters
area
IChartAreaChart area.
element
IChartTradeElementThe chart element.
security
SecuritySecurity.
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
CreateActiveOrdersElement()
Create IChartActiveOrdersElement instance.
public IChartActiveOrdersElement CreateActiveOrdersElement()
Returns
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
IChartDrawDataNew data.
GetIndicator(IChartIndicatorElement)
To get an indicator which is associated with IChartIndicatorElement.
public IIndicator GetIndicator(IChartIndicatorElement element)
Parameters
element
IChartIndicatorElementThe chart element.
Returns
- IIndicator
Indicator.
GetSource(IChartElement)
To get the data source for IChartElement.
public object GetSource(IChartElement element)
Parameters
element
IChartElementThe chart element.
Returns
- object
Market-data source.
InitializeComponent()
InitializeComponent
public void InitializeComponent()
Load(SettingsStorage)
Load settings.
public void Load(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings 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
IChartAreaChart 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
SettingsStorageSettings storage.
SetSource(IChartElement, object)
To set the source for the element.
public void SetSource(IChartElement element, object source)
Parameters
element
IChartElementThe chart element.
source
objectSource.
Events
AddCandles
The chart element creation event.
public event Action<ChartArea> AddCandles
Event Type
AddIndicator
The chart element creation event.
public event Action<ChartArea> AddIndicator
Event Type
AddOrders
The chart element creation event.
public event Action<ChartArea> AddOrders
Event Type
AddTrades
The chart element creation event.
public event Action<ChartArea> AddTrades
Event Type
AnnotationCreated
Annotation created event.
public event Action<IChartAnnotation> AnnotationCreated
Event Type
AnnotationDeleted
Annotation deleted event.
public event Action<IChartAnnotation> AnnotationDeleted
Event Type
AnnotationModified
Annotation created event.
public event Action<IChartAnnotation, ChartDrawData.AnnotationData> AnnotationModified
Event Type
AnnotationSelected
Annotation selection event.
public event Action<IChartAnnotation, ChartDrawData.AnnotationData> AnnotationSelected
Event Type
AreaAdded
Areas added event.
public event Action<IChartArea> AreaAdded
Event Type
AreaAdding
The chart area creation event.
public event Action AreaAdding
Event Type
AreaRemoved
Areas removed event.
public event Action<IChartArea> AreaRemoved
Event Type
CancelOrder
Cancel order event.
public event Action<Order> CancelOrder
Event Type
CreateOrder
The new order creation event.
public event Action<ChartArea, Order> CreateOrder
Event Type
MoveOrder
Move order event.
public event Action<Order, decimal> MoveOrder
Event Type
RebuildCandles
Rebuild candles event.
public event Action<IChartElement, CandleSeries> RebuildCandles
Event Type
RemoveElement
The chart element removal event.
public event Action<IChartElement> RemoveElement
Event Type
SubscribeCandleElement
The event of the subscription to getting data for the element.
public event Action<IChartCandleElement, CandleSeries> SubscribeCandleElement
Event Type
SubscribeIndicatorElement
The event of the subscription to getting data for the element.
public event Action<IChartIndicatorElement, CandleSeries, IIndicator> SubscribeIndicatorElement
Event Type
SubscribeOrderElement
The event of the subscription to getting data for the element.
public event Action<IChartOrderElement, Security> SubscribeOrderElement
Event Type
SubscribeTradeElement
The event of the subscription to getting data for the element.
public event Action<IChartTradeElement, Security> SubscribeTradeElement
Event Type
UnSubscribeElement
The event of the unsubscribe from getting data for the element.
public event Action<IChartElement> UnSubscribeElement