ChartPanel
The extended graphical component for candle charts displaying.
Inherits: UserControl
Implements: IWpfChart, IChart, IChartBuilder, IThemeableChart, IPersistable, INotifyPropertyChangedEx, INotifyPropertyChanged, IComponentConnector, IStyleConnector
Constructors
public ChartPanel()
chartPanel = ChartPanel()
Initializes a new instance of the ChartPanel.
Properties
public bool AllowAddArea { get; set; }
value = chartPanel.AllowAddArea
chartPanel.AllowAddArea = value
Allow user to add new chart area.
public bool AllowAddAxis { get; set; }
value = chartPanel.AllowAddAxis
chartPanel.AllowAddAxis = value
Allow user to add new chart axis.
public bool AllowAddCandles { get; set; }
value = chartPanel.AllowAddCandles
chartPanel.AllowAddCandles = value
Allow user to add new candles elements.
public bool AllowAddIndicators { get; set; }
value = chartPanel.AllowAddIndicators
chartPanel.AllowAddIndicators = value
Allow user to add new indicator elements.
public bool AllowAddOrders { get; set; }
value = chartPanel.AllowAddOrders
chartPanel.AllowAddOrders = value
Allow user to add new orders elements.
public bool AllowAddOwnTrades { get; set; }
value = chartPanel.AllowAddOwnTrades
chartPanel.AllowAddOwnTrades = value
Allow user to add new own trades elements.
public string ChartTheme { get; set; }
value = chartPanel.ChartTheme
chartPanel.ChartTheme = value
The name of the graphic theme.
public bool CrossHair { get; set; }
value = chartPanel.CrossHair
chartPanel.CrossHair = value
Crosshair.
public bool CrossHairAxisLabels { get; set; }
value = chartPanel.CrossHairAxisLabels
chartPanel.CrossHairAxisLabels = value
To show values on the axis for the crosshair.
public bool CrossHairTooltip { get; set; }
value = chartPanel.CrossHairTooltip
chartPanel.CrossHairTooltip = value
To show the prompt message for the crosshair.
public bool DisableIndicatorReset { get; set; }
value = chartPanel.DisableIndicatorReset
chartPanel.DisableIndicatorReset = value
Disable tracking indicator reset.
public IList<IndicatorType> IndicatorTypes { get; }
value = chartPanel.IndicatorTypes
The list of available indicators types.
public bool IsAutoRange { get; set; }
value = chartPanel.IsAutoRange
chartPanel.IsAutoRange = value
To use automatic range for the X-axis. The default is off.
public bool IsAutoScroll { get; set; }
value = chartPanel.IsAutoScroll
chartPanel.IsAutoScroll = value
To scroll Areas areas automatically when new data occurred. The default is enabled.
public bool IsInteracted { get; set; }
value = chartPanel.IsInteracted
chartPanel.IsInteracted = value
The interactive mode. The default is off.
public int MinimumRange { get; set; }
value = chartPanel.MinimumRange
chartPanel.MinimumRange = value
The minimum number of visible candles.
public bool OrderCreationMode { get; set; }
value = chartPanel.OrderCreationMode
chartPanel.OrderCreationMode = value
The order creation mode. The default is off.
public ChartPanelOrderSettings OrderSettings { get; }
value = chartPanel.OrderSettings
Chart order registering settings.
public ISecurityProvider SecurityProvider { get; set; }
value = chartPanel.SecurityProvider
chartPanel.SecurityProvider = value
The provider of information about instruments.
public bool ShowLegend { get; set; }
value = chartPanel.ShowLegend
chartPanel.ShowLegend = value
To show the legend.
public bool ShowNonFormedIndicators { get; set; }
value = chartPanel.ShowNonFormedIndicators
chartPanel.ShowNonFormedIndicators = value
Show non formed indicators values.
public bool ShowOverview { get; set; }
value = chartPanel.ShowOverview
chartPanel.ShowOverview = value
To show the preview area.
public bool ShowPerfStats { get; set; }
value = chartPanel.ShowPerfStats
chartPanel.ShowPerfStats = value
Show FPS.
public IEnumerable<Subscription> Subscriptions { get; }
value = chartPanel.Subscriptions
Subscriptions.
public ICollection<TimeSpan> TimeFrames { get; }
value = chartPanel.TimeFrames
Available time-frames.
public TimeZoneInfo TimeZone { get; set; }
value = chartPanel.TimeZone
chartPanel.TimeZone = value
Local time zone for all DateTime values conversion.
public IChart UnderlyingChart { get; }
value = chartPanel.UnderlyingChart
Underlying chart.
Methods
public void AddArea(IChartArea area)
chartPanel.AddArea(area)
To add an area to the chart.
- area
- Chart area.
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.
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.
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.
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.
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.
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.
public IChartActiveOrdersElement CreateActiveOrdersElement()
result = chartPanel.CreateActiveOrdersElement()
Create IChartActiveOrdersElement instance.
Returns: IChartActiveOrdersElement instance.
public IChartAnnotationElement CreateAnnotation()
result = chartPanel.CreateAnnotation()
Create IChartAnnotationElement instance.
Returns: IChartAnnotationElement instance.
public IChartArea CreateArea()
result = chartPanel.CreateArea()
Create IChartArea instance.
Returns: IChartArea instance.
public IChartAxis CreateAxis()
result = chartPanel.CreateAxis()
Create IChartAxis instance.
Returns: IChartAxis instance.
public IChartBandElement CreateBandElement()
result = chartPanel.CreateBandElement()
Create IChartBandElement instance.
Returns: IChartBandElement instance.
public IChartLineElement CreateBubbleElement()
result = chartPanel.CreateBubbleElement()
Create IChartLineElement instance.
Returns: IChartLineElement instance.
public IChartCandleElement CreateCandleElement()
result = chartPanel.CreateCandleElement()
Create IChartCandleElement instance.
Returns: IChartCandleElement instance.
public IChartDrawData CreateData()
result = chartPanel.CreateData()
Create IChartDrawData instance.
Returns: IChartDrawData instance.
public IChartIndicatorElement CreateIndicatorElement()
result = chartPanel.CreateIndicatorElement()
Create IChartIndicatorElement instance.
Returns: IChartIndicatorElement instance.
public IChartLineElement CreateLineElement()
result = chartPanel.CreateLineElement()
Create IChartLineElement instance.
Returns: IChartLineElement instance.
public IChartOrderElement CreateOrderElement()
result = chartPanel.CreateOrderElement()
Create IChartOrderElement instance.
Returns: IChartOrderElement instance.
public IChartTradeElement CreateTradeElement()
result = chartPanel.CreateTradeElement()
Create IChartTradeElement instance.
Returns: IChartTradeElement instance.
public void Draw(IChartDrawData data)
chartPanel.Draw(data)
To process the new data.
- data
- New data.
public void InitializeComponent()
chartPanel.InitializeComponent()
InitializeComponent
public void Load(SettingsStorage storage)
chartPanel.Load(storage)
Load settings.
- storage
- Settings storage.
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.
public void RemoveArea(IChartArea area)
chartPanel.RemoveArea(area)
To remove the area from the chart.
- area
- Chart area.
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.
public void Reset(IEnumerable<IChartElement> elements)
chartPanel.Reset(elements)
To reset the chart elements values drawn previously.
- elements
- Chart elements.
public void ReSubscribeElements()
chartPanel.ReSubscribeElements()
To re-subscribe to getting data for all elements.
public void Save(SettingsStorage storage)
chartPanel.Save(storage)
Save settings.
- storage
- Settings storage.
public void SetSubscription(IChartElement element, Subscription subscription)
chartPanel.SetSubscription(element, subscription)
To set the source for the element.
- element
- The chart element.
- subscription
- Subscription.
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
public event Action<IChartAnnotationElement> AnnotationCreated
chartPanel.AnnotationCreated += handler
Annotation created event.
public event Action<IChartAnnotationElement> AnnotationDeleted
chartPanel.AnnotationDeleted += handler
Annotation deleted event.
public event Action<IChartAnnotationElement, AnnotationData> AnnotationModified
chartPanel.AnnotationModified += handler
Annotation modified event.
public event Action<IChartAnnotationElement, AnnotationData> AnnotationSelected
chartPanel.AnnotationSelected += handler
Annotation selection event.
public event Action<IChartArea> AreaAdded
chartPanel.AreaAdded += handler
Areas added event.
public event Action<IChartArea> AreaRemoved
chartPanel.AreaRemoved += handler
Areas removed event.
public event Action<Order> CancelOrder
chartPanel.CancelOrder += handler
The event of the order cancellation.
public event Action<Order, decimal> MoveOrder
chartPanel.MoveOrder += handler
The event of the order re-registration.
public event Action<IChartArea, Order> RegisterOrder
chartPanel.RegisterOrder += handler
The event of the order registration.
public event Action SettingsChanged
chartPanel.SettingsChanged += handler
The chart settings change event.
public event Action<IChartCandleElement, Subscription> SubscribeCandleElement
chartPanel.SubscribeCandleElement += handler
The event of the subscription to getting data for the element.
public event Action<IChartIndicatorElement, Subscription, IIndicator> SubscribeIndicatorElement
chartPanel.SubscribeIndicatorElement += handler
The event of the subscription to getting data for the element.
public event Action<IChartOrderElement, Subscription> SubscribeOrderElement
chartPanel.SubscribeOrderElement += handler
The event of the subscription to getting data for the element.
public event Action<IChartTradeElement, Subscription> SubscribeTradeElement
chartPanel.SubscribeTradeElement += handler
The event of the subscription to getting data for the element.
public event Action<IChartElement> UnSubscribeElement
chartPanel.UnSubscribeElement += handler
The event of the unsubscribe from getting data for the element.
Fields
public static readonly RoutedCommand AddAreaCommand
value = ChartPanel.AddAreaCommand
The command to add the area to the chart.
public static readonly RoutedCommand AddCandlesCommand
value = ChartPanel.AddCandlesCommand
The command to add candles to the chart.
public static readonly RoutedCommand AddIndicatorCommand
value = ChartPanel.AddIndicatorCommand
The command to add the indicator to the chart.
public static readonly RoutedCommand PatternCommand
value = ChartPanel.PatternCommand
The command for the pattern creation.
public static readonly RoutedCommand RegisterOrderCommand
value = ChartPanel.RegisterOrderCommand
The command for the order registration.