ChartFibonacciRetracement


Summary

Represents the Fibonacci Retracement chart object.

Syntax

public interface ChartFibonacciRetracement : ChartFibonacciBase, ChartObject

Members

NameTypeSummary
Time1 PropertyGets or sets the value 1 on the Time line.
Time2 PropertyGets or sets the value 2 on the Time line.
Y1 PropertyGets or sets the value 1 on the Y-axis.
Y2 PropertyGets or sets the value 2 on the Y-axis.

Example 1

using cAlgo.API;
namespace cAlgo
{
    // This indicator shows how to use the Chart.DrawFibonacciRetracement method to draw a Fibonacci Retracement
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class FibonacciRetracementSample : Indicator
    {
        protected override void Initialize()
        {
            var period = Chart.LastVisibleBarIndex - Chart.FirstVisibleBarIndex;
            var max = Bars.HighPrices.Maximum(period);
            var min = Bars.LowPrices.Minimum(period);
            Chart.DrawFibonacciRetracement("FibonacciRetracement", Chart.FirstVisibleBarIndex, max, Chart.LastVisibleBarIndex, min, Color.Red);
        }
        public override void Calculate(int index)
        {
        }
    }
}
Reference