Skip to content

ChartArea.DrawFibonacciFan

method · ChartArea · cAlgo.API

DesktopCLICloud

Draws a Fibonacci fan.

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

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

Draws a Fibonacci fan.

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

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 fan start point location on the X-axis.
y1 double float The Y-axis value of the Fibonacci fan start point location.
time2 DateTime DateTime The time value of the Fibonacci fan end point location on the X-axis.
y2 double float The Y-axis value of the Fibonacci fan end point location.
color Color Color The Fibonacci fan lines color.

Returns ChartFibonacciFan — ChartFibonacciFan.

Examples

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

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

Draws a Fibonacci fan.

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

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 fan start point location on the X-axis.
y1 double float The Y-axis value of the Fibonacci fan start point location.
time2 DateTime DateTime The time value of the Fibonacci fan end point location on the X-axis.
y2 double float The Y-axis value of the Fibonacci fan end point location.
color Color Color The Fibonacci fan lines color.
thickness int int The Fibonacci fan lines thickness.

Returns ChartFibonacciFan — ChartFibonacciFan.

Examples

var fan = Chart.DrawFibonacciFan("fan", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red, 2);
Print("Fibonacci fan thickness: {0}", fan.Thickness);
fan = api.Chart.DrawFibonacciFan("fan", 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 fan thickness: {fan.Thickness}")

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

Draws a Fibonacci fan.

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

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 fan start point location on the X-axis.
y1 double float The Y-axis value of the Fibonacci fan start point location.
time2 DateTime DateTime The time value of the Fibonacci fan end point location on the X-axis.
y2 double float The Y-axis value of the Fibonacci fan end point location.
color Color Color The Fibonacci fan lines color.
thickness int int The Fibonacci fan lines thickness.
lineStyle LineStyle LineStyle The Fibonacci fan lines style.

Returns ChartFibonacciFan — ChartFibonacciFan.

Examples

var fan = Chart.DrawFibonacciFan("fan", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Red, 2, LineStyle.Dots);
Print("Fibonacci fan style: {0}", fan.LineStyle);
fan = api.Chart.DrawFibonacciFan("fan", 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 fan style: {fan.LineStyle}")

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

Draws a Fibonacci fan.

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

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 fan start point location on the X-axis.
y1 double float The Y-axis value of the Fibonacci fan start point location.
barIndex2 int int The Y-axis value of the Fibonacci fan end point location.
y2 double float The Y-axis value of the Fibonacci fan end point location.
color Color Color The Fibonacci fan lines color.

Returns ChartFibonacciFan — ChartFibonacciFan.

Examples

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

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

Draws a Fibonacci fan.

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

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 fan start point location on the X-axis.
y1 double float The Y-axis value of the Fibonacci fan start point location.
barIndex2 int int The Y-axis value of the Fibonacci fan end point location.
y2 double float The Y-axis value of the Fibonacci fan end point location.
color Color Color The Fibonacci fan lines color.
thickness int int The Fibonacci fan lines thickness.

Returns ChartFibonacciFan — ChartFibonacciFan.

Examples

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

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

Draws a Fibonacci fan.

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

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 fan start point location on the X-axis.
y1 double float The Y-axis value of the Fibonacci fan start point location.
barIndex2 int int The Y-axis value of the Fibonacci fan end point location.
y2 double float The Y-axis value of the Fibonacci fan end point location.
color Color Color The Fibonacci fan lines color.
thickness int int The Fibonacci fan lines thickness.
lineStyle LineStyle LineStyle The Fibonacci fan lines style.

Returns ChartFibonacciFan — ChartFibonacciFan.

Examples

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