Version

Indicator Panes

Purpose

This topic demonstrates the Indicator Panes of the XamFinancialChart control.

The below screenshot highlights the Indicator Panes of the chart and the drop down that is used to adjust the chart type at run time.

financialchart wpf pane indicator.png

Enabling Indicator Panes

Property Name Type Description

FinancialIndicatorTypeCollection

Gets or Sets the collection of Indicator Types: FinancialIndicatorType.

IndicatorDisplayTypeCollection

Gets or sets the collection of Indicator Display Types: IndicatorDisplayType.

By default the Indicator Panes are not displayed. You can set the indicator types through code as follows:

In XAML:

<ig:XamFinancialChart>
    <ig:XamFinancialChart.IndicatorTypes>
        <ig:FinancialIndicatorTypeCollection>
            <ig:FinancialIndicatorType>AverageTrueRange</ig:FinancialIndicatorType>
            <ig:FinancialIndicatorType>MassIndex</ig:FinancialIndicatorType>
        </ig:FinancialIndicatorTypeCollection>
    </ig:XamFinancialChart.IndicatorTypes>
    <ig:XamFinancialChart.IndicatorDisplayTypes>
        <ig:IndicatorDisplayTypeCollection>
            <ig:IndicatorDisplayType>Area</ig:IndicatorDisplayType>
            <ig:IndicatorDisplayType>Column</ig:IndicatorDisplayType>
        </ig:IndicatorDisplayTypeCollection>
    </ig:XamFinancialChart.IndicatorDisplayTypes>
</ig:XamFinancialChart>

In Visual Basic:

Dim chart as New XamFinancialChart()
chart.IndicatorTypes = new FinancialIndicatorTypeCollection()
chart.IndicatorTypes.Add(Infragistics.Controls.Charts.FinancialIndicatorType.AverageTrueRange)
chart.IndicatorTypes.Add(Infragistics.Controls.Charts.FinancialIndicatorType.MassIndex)

chart.IndicatorDisplayTypes = new IndicatorDisplayTypeCollection()
chart.IndicatorDisplayTypes.Add(Infragistics.Controls.Charts.IndicatorDisplayType.Area)
chart.IndicatorDisplayTypes.Add(Infragistics.Controls.Charts.IndicatorDisplayType.Column)

In C#:

var chart = new XamFinancialChart();
chart.IndicatorTypes = new FinancialIndicatorTypeCollection();
chart.IndicatorTypes.Add(Infragistics.Controls.Charts.FinancialIndicatorType.AverageTrueRange);
chart.IndicatorTypes.Add(Infragistics.Controls.Charts.FinancialIndicatorType.MassIndex);

chart.IndicatorDisplayTypes = new IndicatorDisplayTypeCollection();
chart.IndicatorDisplayTypes.Add(Infragistics.Controls.Charts.IndicatorDisplayType.Area);
chart.IndicatorDisplayTypes.Add(Infragistics.Controls.Charts.IndicatorDisplayType.Column);

Configuring Indicator Panes

Property Name Type Description

int

Gets or sets the IndicatorLongPeriod period which applies only to these indicator types:

MovingAverageConvergenceDivergenceIndicator
AbsoluteVolumeOscillatorIndicator
ChaikinOscillatorIndicator
PercentagePriceOscillatorIndicator
PercentageVolumeOscillatorIndicator

int

Gets or sets the IndicatorPeriod period which applies only to these indicator types:

BollingerBandWidthIndicator
FullStochasticOscillatorIndicator
AverageDirectionalIndexIndicator
AverageTrueRangeIndicator
BollingerBandsOverlay
ChaikinVolatilityIndicator
CommodityChannelIndexIndicator
DetrendedPriceOscillatorIndicator
FastStochasticOscillatorIndicator
ForceIndexIndicator
MoneyFlowIndexIndicator
PriceChannelOverlay
RateOfChangeAndMomentumIndicator
RelativeStrengthIndexIndicator
SlowStochasticOscillatorIndicator
StandardDeviationIndicator
StochRSIIndicator
TRIXIndicator
WilliamsPercentRIndicator

int

Gets or sets the IndicatorShortPeriod period which applies only to these indicator types:

MovingAverageConvergenceDivergenceIndicator
AbsoluteVolumeOscillatorIndicator
ChaikinOscillatorIndicator
PercentagePriceOscillatorIndicator
PercentageVolumeOscillatorIndicator

int

Gets or sets the IndicatorSignalPeriod period which applies only to these indicator types:

MovingAverageConvergenceDivergenceIndicator

int

Gets or sets the IndicatorSmoothingPeriod period which applies only to these indicator types:

FullStochasticOscillatorIndicator

double

Gets or sets the IndicatorMultiplier period which applies only to these indicator types:

BollingerBandWidthIndicator

Styling Indicator Panes

Property Name Type Description

BrushCollection

Gets or sets the palette of brushes to use for coloring of positive values of indicators in order they were defined in IndicatorTypes property

BrushCollection

Gets or sets the palette of brushes to use for coloring of negative values of indicators in order they were defined in IndicatorTypes property

double

Gets or sets the thickness of all indicators

In XAML:

<ig:XamFinancialChart IndicatorTypes="Area"
    IndicatorBrushes="Blue"
    IndicatorNegativeBrushes="Red"
    IndicatorThickness="2" />

In Visual Basic:

Dim chart as New XamFinancialChart()
chart.IndicatorBrushes = New Infragistics.BrushCollection()
Dim brush = As SolidColorBrush = New SolidColorBrush()
brush.Color = Colors.Blue;
chart.IndicatorBrushes.Add(brush)

chart.IndicatorNegativeBrushes = new Infragistics.BrushCollection()
Dim brush2 = As SolidColorBrush = New SolidColorBrush()
brush2.Color = Colors.Red
chart.IndicatorNegativeBrushes.Add(brush2)

chart.IndicatorThickness = 2

In C#:

var chart = new XamFinancialChart();
chart.IndicatorBrushes = new Infragistics.BrushCollection();
SolidColorBrush brush = new SolidColorBrush();
brush.Color = Colors.Blue;
chart.IndicatorBrushes.Add(brush);

chart.IndicatorNegativeBrushes = new Infragistics.BrushCollection();
SolidColorBrush brush2 = new SolidColorBrush();
brush2.Color = Colors.Red;
chart.IndicatorNegativeBrushes.Add(brush2);

chart.IndicatorThickness = 2;
financialchart wpf pane indicator style.png
Topic Purpose

This article is an overview of the different chart panes.