Category Trend  Published on 17/06/2019

Genesis Matrix

Description

Follow my cTrader Telegram group at https://t.me/cTraderCommunity; it's a new community but it will grow fast, plus everyone can talk about cTrader indicators and algorithm without restrictions, though it is not allowed to spam commercial indicators to sell them.

This is the conversion of the genesis matrix for cTrader.

If you need some indicators to experiment with this code, feel free to join the telegram channel posted above and ask directly to me.

The genesis matrix incorporates signals from 4 different indicators and is part of a wider trading system; for more info search for 'Genesis Matrix' on ForexFactory.com.


using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;

namespace cAlgo
{
    [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class GenesisMatrix : Indicator
    {

        private CommodityChannelIndex cci;
        private GannHighLow ghl;
        private T3MA t3ma;
        private _TVI tvi;


        protected override void Initialize()
        {
            cci = Indicators.CommodityChannelIndex(20);
            ghl = Indicators.GetIndicator<GannHighLow>(10);
            t3ma = Indicators.GetIndicator<T3MA>(MarketSeries.Close, 14, 0, 0.7);
            tvi = Indicators.GetIndicator<_TVI>(12, 12, 5);

            IndicatorArea.DrawText("tvi", "TVI", Chart.BarsTotal + 5, 0.88, Color.White);
            IndicatorArea.DrawText("T3", "T3", Chart.BarsTotal + 5, 0.63, Color.White);
            IndicatorArea.DrawText("ghl", "G H-L", Chart.BarsTotal + 5, 0.38, Color.White);
            IndicatorArea.DrawText("cci", "CCI", Chart.BarsTotal + 5, 0.12, Color.White);

            IndicatorArea.DrawHorizontalLine("0", 0.25, Color.White);
            IndicatorArea.DrawHorizontalLine("1", 0.5, Color.White);
            IndicatorArea.DrawHorizontalLine("2", 0.75, Color.White);
            IndicatorArea.DrawHorizontalLine("3", 1, Color.White);
            IndicatorArea.DrawHorizontalLine("4", 0, Color.White);

        }

        public override void Calculate(int i)
        {
            if (cci.Result[i] > 0)
                DrawLine_(i, 1, Colors.RoyalBlue, "cci");
            else
                DrawLine_(i, 1, Colors.Red, "cci");

            if (ghl.Result[i] < MarketSeries.Close[i])
                DrawLine_(i, 2, Colors.RoyalBlue, "ghl");
            else
                DrawLine_(i, 2, Colors.Red, "ghl");

            if (t3ma.Result[i] > t3ma.Result[i - 1])
                DrawLine_(i, 3, Colors.RoyalBlue, "t3");
            else
                DrawLine_(i, 3, Colors.Red, "t3");

            if (tvi.TVI__Result[i] > tvi.TVI__Result[i - 1])
                DrawLine_(i, 4, Colors.RoyalBlue, "tvi");
            else
                DrawLine_(i, 4, Colors.Red, "tvi");
        }

        private void DrawLine_(int i, int y, Colors color, string code)
        {
            ChartObjects.DrawLine(code + i, i, (y - 1) * 0.25, i, y * 0.25, color, 3, LineStyle.Solid);
            return;
        }
    }
}


CY
cysecsbin.01

Joined on 10.11.2018 Blocked

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: Genesis MAtrix.algo
  • Rating: 0
  • Installs: 1638
Comments
Log in to add a comment.
Tarwada's avatar
Tarwada · 4 months ago

hello. thank you for your hard work.
but i think the indicator is late by 1 to 2 candles compared to the one from FF