ChartFibonacciExpansion


Summary

Represents the Fibonacci Expansion chart object.

Syntax

public interface ChartFibonacciExpansion : 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.
Time3 PropertyGets or sets the value 3 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.
Y3 PropertyGets or sets the value 3 on the Y-axis.

Example 1

using cAlgo.API;
namespace cAlgo
{
    // A sample indicator for showing how to use the Chart.DrawFibonacciExpansion method
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class FibonacciExpansionSample : Indicator
    {
        protected override void Initialize()
        {
            var period = Chart.LastVisibleBarIndex - Chart.FirstVisibleBarIndex;
            var fibonacciExpansion = Chart.DrawFibonacciExpansion("fibonacciExpansion", Chart.FirstVisibleBarIndex, Bars.LowPrices[Chart.FirstVisibleBarIndex], Chart.FirstVisibleBarIndex, Bars.LowPrices.Minimum(period), Chart.LastVisibleBarIndex, Bars.HighPrices.Maximum(period), Color.Red);
            fibonacciExpansion.IsInteractive = true;
        }
        public override void Calculate(int index)
        {
        }
    }
}
Reference