HL Averages TF Multi free


Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.
Formula / Source Code
Language: C#
Trading Platform: cAlgocTrader
´╗┐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 HLAveragesTFStochMulti : Indicator
        [Parameter("Custom TF", DefaultValue = "Hour")]
        public TimeFrame customTimeFrame { get; set; }

        [Output("Result1", LineColor = "Green")]
        public IndicatorDataSeries Result1 { get; set; }

        [Output("Result2", LineColor = "Orange")]
        public IndicatorDataSeries Result2 { get; set; }

        private HLAveragesTFStoch hlcurrentTF;
        private HLAveragesTFStoch hlcustomTF;

        protected override void Initialize()
            hlcurrentTF = Indicators.GetIndicator<HLAveragesTFStoch>(Bars.TimeFrame);
            hlcustomTF = Indicators.GetIndicator<HLAveragesTFStoch>(customTimeFrame);

        public override void Calculate(int index)
            Result1[index] = hlcustomTF.Result[index];
            Result2[index] = hlcurrentTF.Result[index];