Directional Movement System of a different timefram

Created at 10 Feb 2018, 15:32
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
irmscher9's avatar

irmscher9

Joined 22.12.2016

Directional Movement System of a different timefram
10 Feb 2018, 15:32


How do I create Directional Movement System instance of a different timeframe?

private MarketSeries m5;

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

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class testdel : Robot
    {
        [Parameter(DefaultValue = 0.0)]
        public double Parameter { get; set; }

        public MarketSeries m5;
        public DirectionalMovementSystem _dms5m;


        protected override void OnStart()
        {
            m5 = MarketData.GetSeries(TimeFrame.Minute5);
            _dms5m = Indicators.DirectionalMovementSystem(m5.Close, 14);
        }

    }
}

 

The code above seem doesn;t work...


@irmscher9