Chart for .NET / User's Guide / Chart Types / Three Line Break / Three Line Break

In This Topic
    Three Line Break
    In This Topic

    Three Line Break charts display a series of vertical boxes ("lines") that are based on changes in prices. A new rising line is drawn if the closing price is higher than the previous one. A new falling line is drawn if the closing price is lower than the previous one. If a rally or a sell-off is powerful enough to form several consecutive lines with the same direction, then prices must reverse by the extreme price of the last several lines in order to create a new line. Usually three consecutive lines are used for the reversal criterion, hence the name Three Line Break. As with Kagi, Point and Figure, and Renko charts, Three Line Break charts ignore the passage of time. The following figure displays a Three Line Break chart.




    Figure 1.

     Creating a Three Line Break series

    To display a Three Line Break chart you have to create an instance of the NThreeLineBreakSeries type and add it to the series collection of a Cartesian chart.

    Three Line Break series can be displayed only in 2D mode only
    C#
    Copy Code
    // obtain a reference to the Cartesian chart that is created by default
    NChart chart = nChartControl1.Charts[0];
    
    // create a Three Line Break series
    NThreeLineBreakSeries series = new NThreeLineBreakSeries();
    
    // add the series to the chart series collection
    chart.Series.Add(series);
    
    Visual Basic
    Copy Code
    ' obtain a reference to the Cartesian chart that is created by default
    Dim chart As NChart = NChartControl1.Charts(0)
    
    ' create a Three Line Break series
    Dim series As New NThreeLineBreakSeries
    
    ' add the series to the chart series collection
    chart.Series.Add(series)
    
     Passing Data

    Once the Three Line Break series is created you can add some data in it. Three Line Break series use the Values data series for price values and the XValues data series for date-time values associated with the prices. The date-time values are used only for annotation of the X axis and do not influence the actual X positions of the data points.

    Please note, that Three Line Break chart transforms the data before displaying it and there is no direct correspondence between values and displayed data points.

     Configuring the X Axis Scale
    The X axis can be set to display date-time labels with the help of a special scale configurator. You have to assign an instance of the NPriceScaleConfigurator type to the ScaleConfigurator property of the X axis. The date-time values must be filled in the XValues data series of the Three Line Break series and the UseXValues property must be set to true. The scale configurator will automatically extract the date-time information for the axis labels from the Three Line Break series.
     Three Line Break Options
    The number of lines that must be "broken" in order for a reversal to happen is configurable and can be specified through the NumberOfLinesToBreak property. By default this number is set to three for a three-line-break, but you can change it to create for example a four-line-break chart.
     Related Examples
    Chart Gallery\Three Line Break\...
    See Also