Color indicator with error

Created at 08 May 2020, 16:39
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!
EL

eliezer_barros

Joined 21.12.2018

Color indicator with error
08 May 2020, 16:39


Hi,

The new version request to update in this color expression, please can you check why the error continue?

 

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

namespace cAlgo
{
    [Indicator(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class AAteste : Indicator
    {
        [Parameter("Source")]
        public DataSeries Source { get; set; }

        [Parameter(DefaultValue = 13, MinValue = 2)]
        public int Periods { get; set; }

        [Output("Result", Color = Colors.Orange, PlotType = PlotType.Line)]

        public IndicatorDataSeries Result { get; set; }

        protected override void Initialize()
        {

        }

        public override void Calculate(int index)
        {
/////
        }
    }
}


@eliezer_barros
Replies

firemyst
28 May 2020, 15:07

RE:

eliezer_barros said:

Hi,

The new version request to update in this color expression, please can you check why the error continue?

 

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

namespace cAlgo
{
    [Indicator(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class AAteste : Indicator
    {
        [Parameter("Source")]
        public DataSeries Source { get; set; }

        [Parameter(DefaultValue = 13, MinValue = 2)]
        public int Periods { get; set; }

        [Output("Result", Color = Colors.Orange, PlotType = PlotType.Line)]

        public IndicatorDataSeries Result { get; set; }

        protected override void Initialize()
        {

        }

        public override void Calculate(int index)
        {
/////
        }
    }
}

You need to say, LineColor = "Orange" instead of "Color = Colors.Orange".


@firemyst