Chart
The graphic component of the candles charts display.
Inherits: UserControl
Implements: IWpfChart, IChart, IChartBuilder, IThemeableChart, IPersistable, INotifyPropertyChangedEx, INotifyPropertyChanged, IComponentConnector
Constructors
Properties
public bool AllowAddArea { get; set; }
value = chart.AllowAddArea
chart.AllowAddArea = value
Allow user to add new chart area.
public bool AllowAddAxis { get; set; }
value = chart.AllowAddAxis
chart.AllowAddAxis = value
Allow user to add new chart axis.
public bool AllowAddCandles { get; set; }
value = chart.AllowAddCandles
chart.AllowAddCandles = value
Allow user to add new candles elements.
public bool AllowAddIndicators { get; set; }
value = chart.AllowAddIndicators
chart.AllowAddIndicators = value
Allow user to add new indicator elements.
public bool AllowAddOrders { get; set; }
value = chart.AllowAddOrders
chart.AllowAddOrders = value
Allow user to add new orders elements.
public bool AllowAddOwnTrades { get; set; }
value = chart.AllowAddOwnTrades
chart.AllowAddOwnTrades = value
Allow user to add new own trades elements.
public ChartAnnotationTypes AnnotationType { get; set; }
value = chart.AnnotationType
chart.AnnotationType = value
The prompt message type for drawing on the chart.
public bool AutoRangeByAnnotations { get; set; }
value = chart.AutoRangeByAnnotations
chart.AutoRangeByAnnotations = value
To use annotations to define the visible range for the Y-axis.
public TimeSpan AutoRangeInterval { get; set; }
value = chart.AutoRangeInterval
chart.AutoRangeInterval = value
Chart range/scroll interval. Default is 200ms.
public string ChartTheme { get; set; }
value = chart.ChartTheme
chart.ChartTheme = value
The name of the graphic theme.
public bool CrossHair { get; set; }
value = chart.CrossHair
chart.CrossHair = value
Crosshair.
public bool CrossHairAxisLabels { get; set; }
value = chart.CrossHairAxisLabels
chart.CrossHairAxisLabels = value
To show values on the axis for the crosshair.
public bool CrossHairTooltip { get; set; }
value = chart.CrossHairTooltip
chart.CrossHairTooltip = value
To show the prompt message for the crosshair.
public MarketDataMessage DefaultCandlesSettings { get; set; }
value = chart.DefaultCandlesSettings
chart.DefaultCandlesSettings = value
Default settings for the candles subscription.
public bool DisableIndicatorReset { get; set; }
value = chart.DisableIndicatorReset
chart.DisableIndicatorReset = value
Disable tracking indicator reset.
public IList<IndicatorType> IndicatorTypes { get; }
value = chart.IndicatorTypes
The list of available indicators types.
public bool IsAutoRange { get; set; }
value = chart.IsAutoRange
chart.IsAutoRange = value
To use automatic range for the X-axis. The default is off.
public bool IsAutoScroll { get; set; }
value = chart.IsAutoScroll
chart.IsAutoScroll = value
To scroll Areas areas automatically when new data occurred. The default is enabled.
public bool IsInteracted { get; set; }
value = chart.IsInteracted
chart.IsInteracted = value
The interactive mode. The default is off.
public int MinimumRange { get; set; }
value = chart.MinimumRange
chart.MinimumRange = value
The minimum number of visible candles.
public bool OrderCreationMode { get; set; }
value = chart.OrderCreationMode
chart.OrderCreationMode = value
The order creation mode. The default is off.
internal Security Security { get; private set; }
value = chart.Security
chart.Security = value
Chart main security.
public ISecurityProvider SecurityProvider { get; set; }
value = chart.SecurityProvider
chart.SecurityProvider = value
The provider of information about instruments.
public bool ShowLegend { get; set; }
value = chart.ShowLegend
chart.ShowLegend = value
To show the legend.
public bool ShowNonFormedIndicators { get; set; }
value = chart.ShowNonFormedIndicators
chart.ShowNonFormedIndicators = value
Show non formed indicators values.
public bool ShowOverview { get; set; }
value = chart.ShowOverview
chart.ShowOverview = value
To show the preview area.
public bool ShowPerfStats { get; set; }
value = chart.ShowPerfStats
chart.ShowPerfStats = value
Show FPS.
internal Subscription Subscription { get; private set; }
value = chart.Subscription
chart.Subscription = value
Chart main candle series.
public IEnumerable<Subscription> Subscriptions { get; }
value = chart.Subscriptions
Subscriptions.
public TimeZoneInfo TimeZone { get; set; }
value = chart.TimeZone
chart.TimeZone = value
Local time zone for all DateTime values conversion.
Methods
public void AddArea(IChartArea area)
chart.AddArea(area)
To add an area to the chart.
- area
- Chart area.
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.
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.
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.
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.
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.
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.
public IChartActiveOrdersElement CreateActiveOrdersElement()
result = chart.CreateActiveOrdersElement()
Create IChartActiveOrdersElement instance.
Returns: IChartActiveOrdersElement instance.
public IChartAnnotationElement CreateAnnotation()
result = chart.CreateAnnotation()
Create IChartAnnotationElement instance.
Returns: IChartAnnotationElement instance.
public IChartArea CreateArea()
result = chart.CreateArea()
Create IChartArea instance.
Returns: IChartArea instance.
public IChartAxis CreateAxis()
result = chart.CreateAxis()
Create IChartAxis instance.
Returns: IChartAxis instance.
public IChartBandElement CreateBandElement()
result = chart.CreateBandElement()
Create IChartBandElement instance.
Returns: IChartBandElement instance.
public IChartLineElement CreateBubbleElement()
result = chart.CreateBubbleElement()
Create IChartLineElement instance.
Returns: IChartLineElement instance.
public IChartCandleElement CreateCandleElement()
result = chart.CreateCandleElement()
Create IChartCandleElement instance.
Returns: IChartCandleElement instance.
public IChartDrawData CreateData()
result = chart.CreateData()
Create IChartDrawData instance.
Returns: IChartDrawData instance.
public IChartIndicatorElement CreateIndicatorElement()
result = chart.CreateIndicatorElement()
Create IChartIndicatorElement instance.
Returns: IChartIndicatorElement instance.
public IChartLineElement CreateLineElement()
result = chart.CreateLineElement()
Create IChartLineElement instance.
Returns: IChartLineElement instance.
public IChartOrderElement CreateOrderElement()
result = chart.CreateOrderElement()
Create IChartOrderElement instance.
Returns: IChartOrderElement instance.
public IChartTradeElement CreateTradeElement()
result = chart.CreateTradeElement()
Create IChartTradeElement instance.
Returns: IChartTradeElement instance.
public IIndicator GetIndicator(IChartIndicatorElement element)
result = chart.GetIndicator(element)
To get an indicator which is associated with IChartIndicatorElement.
- element
- The chart element.
Returns: Indicator.
public void InitializeComponent()
chart.InitializeComponent()
InitializeComponent
public void Load(SettingsStorage storage)
chart.Load(storage)
Load settings.
- storage
- Settings storage.
public void RemoveArea(IChartArea area)
chart.RemoveArea(area)
To remove the area from the chart.
- area
- Chart area.
public void Reset(IEnumerable<IChartElement> elements)
chart.Reset(elements)
To reset the chart elements values drawn previously.
- elements
- Chart elements.
public void ReSubscribeElements()
chart.ReSubscribeElements()
To re-subscribe to getting data for all elements.
public void Save(SettingsStorage storage)
chart.Save(storage)
Save settings.
- storage
- Settings storage.
public void SetSubscription(IChartElement element, Subscription subscription)
chart.SetSubscription(element, subscription)
To set the source for the element.
- element
- The chart element.
- subscription
- Subscription.
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
public event Action<ChartArea> AddCandles
chart.AddCandles += handler
The chart element creation event.
public event Action<ChartArea> AddIndicator
chart.AddIndicator += handler
The chart element creation event.
public event Action<ChartArea> AddOrders
chart.AddOrders += handler
The chart element creation event.
public event Action<ChartArea> AddTrades
chart.AddTrades += handler
The chart element creation event.
public event Action<IChartAnnotationElement> AnnotationCreated
chart.AnnotationCreated += handler
Annotation created event.
public event Action<IChartAnnotationElement> AnnotationDeleted
chart.AnnotationDeleted += handler
Annotation deleted event.
public event Action<IChartAnnotationElement, AnnotationData> AnnotationModified
chart.AnnotationModified += handler
Annotation created event.
public event Action<IChartAnnotationElement, AnnotationData> AnnotationSelected
chart.AnnotationSelected += handler
Annotation selection event.
public event Action AreaAdding
chart.AreaAdding += handler
The chart area creation event.
public event Action<IChartArea> AreaRemoved
chart.AreaRemoved += handler
Areas removed event.
public event Action<ChartArea, Order> CreateOrder
chart.CreateOrder += handler
The new order creation event.
public event Action<Order, decimal> MoveOrder
chart.MoveOrder += handler
Move order event.
public event Action<IChartElement, Subscription> RebuildCandles
chart.RebuildCandles += handler
Rebuild candles event.
public event Action<IChartElement> RemoveElement
chart.RemoveElement += handler
The chart element removal event.
internal event Action SecurityChanged
chart.SecurityChanged += handler
The event indicates that chart's main security was changed.
public event Action<IChartCandleElement, Subscription> SubscribeCandleElement
chart.SubscribeCandleElement += handler
The event of the subscription to getting data for the element.
public event Action<IChartIndicatorElement, Subscription, IIndicator> SubscribeIndicatorElement
chart.SubscribeIndicatorElement += handler
The event of the subscription to getting data for the element.
public event Action<IChartOrderElement, Subscription> SubscribeOrderElement
chart.SubscribeOrderElement += handler
The event of the subscription to getting data for the element.
public event Action<IChartTradeElement, Subscription> SubscribeTradeElement
chart.SubscribeTradeElement += handler
The event of the subscription to getting data for the element.
public event Action<IChartElement> UnSubscribeElement
chart.UnSubscribeElement += handler
The event of the unsubscribe from getting data for the element.