Drawing indicatorDataseries line in cBot.

Created at 23 Jul 2022, 16:57
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!
SH

Shares4us

Joined 01.04.2020

Drawing indicatorDataseries line in cBot.
23 Jul 2022, 16:57


would be a help to have the functionality to draw an IndicatorDataSeries line in a cBot

The alternative is drawing tons of Trendlines and not very appealing.

using cAlgo.API;
using cAlgo.API.Indicators;

namespace cAlgo.Robots
{
    [Robot(AccessRights = AccessRights.None)]
    public class NewcBot5 : Robot
    {
        [Output("Main", LineColor = "yellow")]
        public IndicatorDataSeries Result { get; set; }

        protected override void OnTick()
        {
            Result[Bars.Count-1]= (Bars[Bars.Count-1].Open + Bars[Bars.Count-1].Close)/2;
        }
    }
}

cTrader Automate
@Shares4us