Skip to content

ChartElliottTriangle

interface cAlgo.API Since 5.10

DesktopCLICloud

Represents the Elliott Triangle Wave (A-B-C-D-E) chart object - a five-leg triangle over six pivots (origin and A to E).

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 ChartElliottTriangle

Namespace: cAlgo.API · Group: Drawings · Implements: ChartElliottWaveBase, ChartObject

Examples

using cAlgo.API;

namespace cAlgo
{
    // This sample shows how to use Chart.DrawElliottTriangle method to draw an Elliott Triangle Wave
    public partial class ElliottTriangleSample : Indicator
    {
        protected override void Initialize()
        {
            var i = Chart.FirstVisibleBarIndex;
            var s = (Chart.LastVisibleBarIndex - i) / 6;
            var t = Bars.OpenTimes;
            var c = Bars.ClosePrices;

            Chart.DrawElliottTriangle("Triangle",
                new ChartPoint(t[i], c[i]),
                new ChartPoint(t[i + s], c[i + s]),
                new ChartPoint(t[i + 2 * s], c[i + 2 * s]),
                new ChartPoint(t[i + 3 * s], c[i + 3 * s]),
                new ChartPoint(t[i + 4 * s], c[i + 4 * s]),
                new ChartPoint(t[i + 5 * s], c[i + 5 * s]),
                Color.Green);
        }

        public override void Calculate(int index)
        {
        }
    }
}
import clr
clr.AddReference("cAlgo.API")

from cAlgo.API import *

class Test():
    def initialize(self):
        i = api.Chart.FirstVisibleBarIndex
        s = (api.Chart.LastVisibleBarIndex - i) // 6
        t = api.Bars.OpenTimes
        c = api.Bars.ClosePrices
        triangle = api.Chart.DrawElliottTriangle("Triangle",
            ChartPoint(t[i], c[i]), ChartPoint(t[i + s], c[i + s]), ChartPoint(t[i + 2 * s], c[i + 2 * s]),
            ChartPoint(t[i + 3 * s], c[i + 3 * s]), ChartPoint(t[i + 4 * s], c[i + 4 * s]), ChartPoint(t[i + 5 * s], c[i + 5 * s]),
            Color.Green)
        triangle.IsInteractive = True
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": true
}

Properties

Name Description
OriginDesktopCLICloudChartPoint Gets or sets the origin (wave 0) anchor point.
WaveADesktopCLICloudChartPoint Gets or sets the wave A anchor point.
WaveBDesktopCLICloudChartPoint Gets or sets the wave B anchor point.
WaveCDesktopCLICloudChartPoint Gets or sets the wave C anchor point.
WaveDDesktopCLICloudChartPoint Gets or sets the wave D anchor point.
WaveEDesktopCLICloudChartPoint Gets or sets the wave E anchor point.

Inherited members

From ChartElliottWaveBase: Degree, ShowLabels, Thickness, Color, LineStyle

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

See also