Skip to content

ChartArea.DrawFibonacciArc

method · ChartArea · cAlgo.API Since 5.10

DesktopCLICloud

Draws a Fibonacci arc.

Environment behaviour

CLI — works differently. The object is created and returned, but never drawn: the CLI displays no chart.

Cloud — works differently. The object is created and returned, but never drawn: the cloud displays no chart.

Overloads

DrawFibonacciArc(string name, DateTime time1, double y1, DateTime time2, double y2, Color color)

Draws a Fibonacci arc.

ChartFibonacciArc DrawFibonacciArc(string name, DateTime time1, double y1, DateTime time2, double y2, Color color)
chartArea.DrawFibonacciArc(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color) -> ChartFibonacciArc

Parameters

Name C# type Python type Description
name string str The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name.
time1 DateTime DateTime The time value of the Fibonacci arc start point location on the X-axis.
y1 double float The Y-axis value of the Fibonacci arc start point location.
time2 DateTime DateTime The time value of the Fibonacci arc end point location on the X-axis.
y2 double float The Y-axis value of the Fibonacci arc end point location.
color Color Color The Fibonacci arc lines color.

Returns ChartFibonacciArc — ChartFibonacciArc.

Examples

var arc = Chart.DrawFibonacciArc("arc", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red);
Print("Fibonacci arc levels: {0}", arc.FibonacciLevels.Count);
arc = api.Chart.DrawFibonacciArc("arc", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red)
api.Print(f"Fibonacci arc levels: {arc.FibonacciLevels.Count}")

DrawFibonacciArc(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness)

Draws a Fibonacci arc.

ChartFibonacciArc DrawFibonacciArc(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness)
chartArea.DrawFibonacciArc(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int) -> ChartFibonacciArc

Parameters

Name C# type Python type Description
name string str The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name.
time1 DateTime DateTime The time value of the Fibonacci arc start point location on the X-axis.
y1 double float The Y-axis value of the Fibonacci arc start point location.
time2 DateTime DateTime The time value of the Fibonacci arc end point location on the X-axis.
y2 double float The Y-axis value of the Fibonacci arc end point location.
color Color Color The Fibonacci arc lines color.
thickness int int The Fibonacci arc lines thickness.

Returns ChartFibonacciArc — ChartFibonacciArc.

Examples

var arc = Chart.DrawFibonacciArc("arc", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red, 2);
Print("Fibonacci arc thickness: {0}", arc.Thickness);
arc = api.Chart.DrawFibonacciArc("arc", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red, 2)
api.Print(f"Fibonacci arc thickness: {arc.Thickness}")

DrawFibonacciArc(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle)

Draws a Fibonacci arc.

ChartFibonacciArc DrawFibonacciArc(string name, DateTime time1, double y1, DateTime time2, double y2, Color color, int thickness, LineStyle lineStyle)
chartArea.DrawFibonacciArc(name: str, time1: DateTime, y1: float, time2: DateTime, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartFibonacciArc

Parameters

Name C# type Python type Description
name string str The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name.
time1 DateTime DateTime The time value of the Fibonacci arc start point location on the X-axis.
y1 double float The Y-axis value of the Fibonacci arc start point location.
time2 DateTime DateTime The time value of the Fibonacci arc end point location on the X-axis.
y2 double float The Y-axis value of the Fibonacci arc end point location.
color Color Color The Fibonacci arc lines color.
thickness int int The Fibonacci arc lines thickness.
lineStyle LineStyle LineStyle The Fibonacci arc lines style.

Returns ChartFibonacciArc — ChartFibonacciArc.

Examples

var arc = Chart.DrawFibonacciArc("arc", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red, 2, LineStyle.Dots);
Print("Fibonacci arc style: {0}", arc.LineStyle);
arc = api.Chart.DrawFibonacciArc("arc", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Red, 2, LineStyle.Dots)
api.Print(f"Fibonacci arc style: {arc.LineStyle}")

DrawFibonacciArc(string name, int barIndex1, double y1, int barIndex2, double y2, Color color)

Draws a Fibonacci arc.

ChartFibonacciArc DrawFibonacciArc(string name, int barIndex1, double y1, int barIndex2, double y2, Color color)
chartArea.DrawFibonacciArc(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color) -> ChartFibonacciArc

Parameters

Name C# type Python type Description
name string str The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name.
barIndex1 int int The bar index of the Fibonacci arc start point location on the X-axis.
y1 double float The Y-axis value of the Fibonacci arc start point location.
barIndex2 int int The bar index of the Fibonacci arc end point location on the X-axis.
y2 double float The Y-axis value of the Fibonacci arc end point location.
color Color Color The Fibonacci arc lines color.

Returns ChartFibonacciArc — ChartFibonacciArc.

Examples

var index = Bars.Count - 1;
var arc = Chart.DrawFibonacciArc("arc", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Red);
Print("Fibonacci arc levels: {0}", arc.FibonacciLevels.Count);
index = api.Bars.Count - 1
arc = api.Chart.DrawFibonacciArc("arc", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Red)
api.Print(f"Fibonacci arc levels: {arc.FibonacciLevels.Count}")

DrawFibonacciArc(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness)

Draws a Fibonacci arc.

ChartFibonacciArc DrawFibonacciArc(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness)
chartArea.DrawFibonacciArc(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int) -> ChartFibonacciArc

Parameters

Name C# type Python type Description
name string str The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name.
barIndex1 int int The bar index of the Fibonacci arc start point location on the X-axis.
y1 double float The Y-axis value of the Fibonacci arc start point location.
barIndex2 int int The bar index of the Fibonacci arc end point location on the X-axis.
y2 double float The Y-axis value of the Fibonacci arc end point location.
color Color Color The Fibonacci arc lines color.
thickness int int The Fibonacci arc lines thickness.

Returns ChartFibonacciArc — ChartFibonacciArc.

Examples

var index = Bars.Count - 1;
var arc = Chart.DrawFibonacciArc("arc", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Red, 2);
Print("Fibonacci arc thickness: {0}", arc.Thickness);
index = api.Bars.Count - 1
arc = api.Chart.DrawFibonacciArc("arc", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Red, 2)
api.Print(f"Fibonacci arc thickness: {arc.Thickness}")

DrawFibonacciArc(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle)

Draws a Fibonacci arc.

ChartFibonacciArc DrawFibonacciArc(string name, int barIndex1, double y1, int barIndex2, double y2, Color color, int thickness, LineStyle lineStyle)
chartArea.DrawFibonacciArc(name: str, barIndex1: int, y1: float, barIndex2: int, y2: float, color: Color, thickness: int, lineStyle: LineStyle) -> ChartFibonacciArc

Parameters

Name C# type Python type Description
name string str The chart object name - a unique name that can be only used once for a chart area. If duplicated, the chart object will be replaced with a new one of the same name.
barIndex1 int int The bar index of the Fibonacci arc start point location on the X-axis.
y1 double float The Y-axis value of the Fibonacci arc start point location.
barIndex2 int int The bar index of the Fibonacci arc end point location on the X-axis.
y2 double float The Y-axis value of the Fibonacci arc end point location.
color Color Color The Fibonacci arc lines color.
thickness int int The Fibonacci arc lines thickness.
lineStyle LineStyle LineStyle The Fibonacci arc lines style.

Returns ChartFibonacciArc — ChartFibonacciArc.

Examples

var index = Bars.Count - 1;
var arc = Chart.DrawFibonacciArc("arc", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Red, 2, LineStyle.Dots);
Print("Fibonacci arc style: {0}", arc.LineStyle);
index = api.Bars.Count - 1
arc = api.Chart.DrawFibonacciArc("arc", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Red, 2, LineStyle.Dots)
api.Print(f"Fibonacci arc style: {arc.LineStyle}")