Skip to main content
A newer version of this page is available. .

RateOfChange Class

A Rate of Change indicator.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v19.2.dll

Declaration

public class RateOfChange :
    SeparatePaneIndicatorWithPoints

Remarks

The Rate of Change indicator looks as follows:

RateOfChange

The Chart Control uses the following formula to calculate the indicator’s values:

  • CurrentValue - A current point value at the given value level (the default value is Close).
  • Value - A point value at the given value level (the default value is Close).
  • n - The PointsCount property’s value. The default value is 14.

Example

This example shows how to create a Rate of Change indicator, configure its parameters, and display it in a separate pane.

<dxc:ChartControl x:Name="chart">
    <dxc:XYDiagram2D>
        <dxc:StockSeries2D x:Name="financialSeries ...>
            <dxc:StockSeries2D.Indicators>
                <dxc:RateOfChange                
                    PointsCount="14"
                    ValueLevel="Close"
                    LegendText="Rate of Change"
                    ShowInLegend="True"
                    DisplayName="RoC"
                    CrosshairEnabled="True"
                    AxisY="{Binding ElementName=rocYAxis}"
                    Pane="{Binding ElementName=rocPane}"
                    Legend="{Binding ElementName=rocLegend}" 
                    CrosshairLabelPattern="{}{I}: {V:f3}"/>
            </dxc:StockSeries2D.Indicators>
        </dxc:StockSeries2D>
        <dxc:XYDiagram2D.Panes>
            <dxc:Pane x:Name="rocPane"/>
        </dxc:XYDiagram2D.Panes>
        <dxc:XYDiagram2D.SecondaryAxesY>
            <dxc:SecondaryAxisY2D x:Name="rocYAxis"/>
        </dxc:XYDiagram2D.SecondaryAxesY>
    </dxc:XYDiagram2D>
    <dxc:ChartControl.Legends>
        <dxc:Legend x:Name="rocLegend" DockTarget="{Binding ElementName=rocPane}" HorizontalPosition="Left"/>
    </dxc:ChartControl.Legends>
</dxc:ChartControl>

Implements

Inheritance

See Also