Category Other  Published on 09/03/2021

Reference for TDFI

Description

this indicator is needed to perform the TDFI correctly. I would have been lucky to build the TDFI without that reference indicator, but I was not able to achive (and thanks to Panagiotis, you pointed me is this direction). This indicator multiplies the Close Proce by 1000, and this is needed as input for the TDFI, which I will publish very soon. Without the TDFI, this indicator is nearly useless...


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 BARSCLOSE1000 : Indicator
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }

        [Output("Main")]
        public IndicatorDataSeries Result { get; set; }

        public override void Calculate(int index)
        {
            Result[index] = Bars.ClosePrices.LastValue * 1000;
        }
    }
}


xabbu's avatar
xabbu

Joined on 20.07.2020

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: Bars.Closemal1000.algo
  • Rating: 0
  • Installs: 1177
Comments
Log in to add a comment.
No comments found.