Skip to content

ChartArea.DrawGannSquareFixed

method · ChartArea · cAlgo.API Since 5.7

DesktopCLICloud

Draws a Gann square fixed.

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

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

Draws a Gann square fixed.

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

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 Gann square fixed anchor point location on the X-axis.
y1 double float The Y-axis value of the Gann square fixed anchor point location.
time2 DateTime DateTime The time value of the Gann square fixed control point location on the X-axis.
y2 double float The Y-axis value of the Gann square fixed control point location.
color Color Color The Gann square fixed lines color.

Returns ChartGannSquareFixed — ChartGannSquareFixed.

Examples

var gannSquareFixed = Chart.DrawGannSquareFixed("gannSquareFixed", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue);
Print("Gann square fixed levels: {0}", gannSquareFixed.GannLevels.Count);
gannSquareFixed = api.Chart.DrawGannSquareFixed("gannSquareFixed", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue)
api.Print(f"Gann square fixed levels: {gannSquareFixed.GannLevels.Count}")

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

Draws a Gann square fixed.

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

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 Gann square fixed anchor point location on the X-axis.
y1 double float The Y-axis value of the Gann square fixed anchor point location.
time2 DateTime DateTime The time value of the Gann square fixed control point location on the X-axis.
y2 double float The Y-axis value of the Gann square fixed control point location.
color Color Color The Gann square fixed lines color.
thickness int int The Gann square fixed lines thickness.

Returns ChartGannSquareFixed — ChartGannSquareFixed.

Examples

var gannSquareFixed = Chart.DrawGannSquareFixed("gannSquareFixed", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue, 2);
Print("Gann square fixed thickness: {0}", gannSquareFixed.Thickness);
gannSquareFixed = api.Chart.DrawGannSquareFixed("gannSquareFixed", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue, 2)
api.Print(f"Gann square fixed thickness: {gannSquareFixed.Thickness}")

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

Draws a Gann square fixed.

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

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 Gann square fixed anchor point location on the X-axis.
y1 double float The Y-axis value of the Gann square fixed anchor point location.
time2 DateTime DateTime The time value of the Gann square fixed control point location on the X-axis.
y2 double float The Y-axis value of the Gann square fixed control point location.
color Color Color The Gann square fixed lines color.
thickness int int The Gann square fixed lines thickness.
lineStyle LineStyle LineStyle The Gann square fixed lines style.

Returns ChartGannSquareFixed — ChartGannSquareFixed.

Examples

var gannSquareFixed = Chart.DrawGannSquareFixed("gannSquareFixed", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue, 2, LineStyle.Dots);
Print("Gann square fixed style: {0}", gannSquareFixed.LineStyle);
gannSquareFixed = api.Chart.DrawGannSquareFixed("gannSquareFixed", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue, 2, LineStyle.Dots)
api.Print(f"Gann square fixed style: {gannSquareFixed.LineStyle}")

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

Draws a Gann square fixed.

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

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 Gann square fixed anchor point location on the X-axis.
y1 double float The Y-axis value of the Gann square fixed anchor point location.
barIndex2 int int The bar index of the Gann square fixed control point location on the X-axis.
y2 double float The Y-axis value of the Gann square fixed control point location.
color Color Color The Gann square fixed lines color.

Returns ChartGannSquareFixed — ChartGannSquareFixed.

Examples

var index = Bars.Count - 1;
var gannSquareFixed = Chart.DrawGannSquareFixed("gannSquareFixed", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Blue);
Print("Gann square fixed levels: {0}", gannSquareFixed.GannLevels.Count);
index = api.Bars.Count - 1
gannSquareFixed = api.Chart.DrawGannSquareFixed("gannSquareFixed", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Blue)
api.Print(f"Gann square fixed levels: {gannSquareFixed.GannLevels.Count}")

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

Draws a Gann square fixed.

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

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 Gann square fixed anchor point location on the X-axis.
y1 double float The Y-axis value of the Gann square fixed anchor point location.
barIndex2 int int The bar index of the Gann square fixed control point location on the X-axis.
y2 double float The Y-axis value of the Gann square fixed control point location.
color Color Color The Gann square fixed lines color.
thickness int int The Gann square fixed lines thickness.

Returns ChartGannSquareFixed — ChartGannSquareFixed.

Examples

var index = Bars.Count - 1;
var gannSquareFixed = Chart.DrawGannSquareFixed("gannSquareFixed", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Blue, 2);
Print("Gann square fixed thickness: {0}", gannSquareFixed.Thickness);
index = api.Bars.Count - 1
gannSquareFixed = api.Chart.DrawGannSquareFixed("gannSquareFixed", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Blue, 2)
api.Print(f"Gann square fixed thickness: {gannSquareFixed.Thickness}")

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

Draws a Gann square fixed.

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

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 Gann square fixed anchor point location on the X-axis.
y1 double float The Y-axis value of the Gann square fixed anchor point location.
barIndex2 int int The bar index of the Gann square fixed control point location on the X-axis.
y2 double float The Y-axis value of the Gann square fixed control point location.
color Color Color The Gann square fixed lines color.
thickness int int The Gann square fixed lines thickness.
lineStyle LineStyle LineStyle The Gann square fixed lines style.

Returns ChartGannSquareFixed — ChartGannSquareFixed.

Examples

var index = Bars.Count - 1;
var gannSquareFixed = Chart.DrawGannSquareFixed("gannSquareFixed", index - 30, Bars.LowPrices[index - 30], index, Bars.HighPrices[index], Color.Blue, 2, LineStyle.Dots);
Print("Gann square fixed style: {0}", gannSquareFixed.LineStyle);
index = api.Bars.Count - 1
gannSquareFixed = api.Chart.DrawGannSquareFixed("gannSquareFixed", index - 30, api.Bars.LowPrices[index - 30], index, api.Bars.HighPrices[index], Color.Blue, 2, LineStyle.Dots)
api.Print(f"Gann square fixed style: {gannSquareFixed.LineStyle}")