Skip to content

ChartGannSquare

interface cAlgo.API Since 5.7

DesktopCLICloud

Represents the Gann Square 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 ChartGannSquare

Namespace: cAlgo.API · Group: Gann · Implements: ChartGannBase, ChartObject

Examples

using cAlgo.API;

namespace cAlgo
{
    // This sample shows how to use Chart.DrawGannSquare method to draw a Gann Square
    public partial class GannSquareSample : Indicator
    {
        protected override void Initialize()
        {
            Chart.DrawGannSquare("GannSquare", Chart.FirstVisibleBarIndex, Bars.ClosePrices[Chart.FirstVisibleBarIndex], Chart.LastVisibleBarIndex, Bars.ClosePrices[Chart.LastVisibleBarIndex], Color.Blue);
        }

        public override void Calculate(int index)
        {
        }
    }
}
gannSquare = api.Chart.DrawGannSquare("GannSquare", api.Chart.FirstVisibleBarIndex, api.Bars.ClosePrices[api.Chart.FirstVisibleBarIndex], api.Chart.LastVisibleBarIndex, api.Bars.ClosePrices[api.Chart.LastVisibleBarIndex], Color.Blue)
gannSquare.IsInteractive = True
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": true
}

Methods

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

Inherited members

From ChartGannBase: GannLevels, DisplayPrices, Thickness, Color, LineStyle, Time1, Time2, Y1, Y2

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

See also