Skip to content

ChartFibonacciRetracement

interface cAlgo.API

DesktopCLICloud

Represents the Fibonacci Retracement chart object.

Environment behaviour

CLI — works differently. Created and kept with all its properties, but never drawn: the CLI displays no chart.

Cloud — works differently. Created and kept with all its properties, but never drawn: the cloud displays no chart.

Definition

public interface ChartFibonacciRetracement

Namespace: cAlgo.API · Group: Fibonacci · Implements: ChartFibonacciBase, ChartObject

Examples

using cAlgo.API;

namespace cAlgo
{
    // This indicator shows how to use the Chart.DrawFibonacciRetracement method to draw a Fibonacci Retracement
    public partial 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)
        {
        }
    }
}
import clr
clr.AddReference("cAlgo.API")

from cAlgo.API import *

class Test():
    def initialize(self):
        period = api.Chart.LastVisibleBarIndex - api.Chart.FirstVisibleBarIndex
        maxValue = Functions.Maximum(api.Bars.HighPrices, period)
        minValue = Functions.Minimum(api.Bars.LowPrices, period)
        api.Chart.DrawFibonacciRetracement("FibonacciRetracement", api.Chart.FirstVisibleBarIndex, maxValue, api.Chart.LastVisibleBarIndex, minValue, Color.Red)
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": true
}

Methods

Name Description
CalculateY 2 overloadsDesktopCLIClouddouble Calculates Y-axis value corresponding the specified bar index.

Properties

Name Description
Time1DesktopCLICloudDateTime Gets or sets the value 1 on the Time line.
Time2DesktopCLICloudDateTime Gets or sets the value 2 on the Time line.
Y1DesktopCLIClouddouble Gets or sets the value 1 on the Y-axis.
Y2DesktopCLIClouddouble Gets or sets the value 2 on the Y-axis.

Inherited members

From ChartFibonacciBase: FibonacciLevels, DisplayPrices, Thickness, Color, LineStyle

From ChartObject: Name, Comment, ObjectType, IsInteractive, IsLocked, IsHidden, ZIndex, IsAlive

See also