Chart bar color methods not working?

Created at 27 Dec 2024, 03:45
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!
RF

rfs199

Joined 20.05.2024

Chart bar color methods not working?
27 Dec 2024, 03:45


I have an issue with the Chart.SetBarFillColor, SetBarOutlineColor and SetBarColor methods. They seem to be working just fine in the Windows version but I can't get it to work here. Even a basic example from a blank indicator template doesn't seem to be working.

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

namespace cAlgo
{
    [Indicator(AccessRights = AccessRights.None, IsOverlay = true)]
    public class MacOSBarColorTest : Indicator
    {
        [Parameter(DefaultValue = "Hello world!")]
        public string Message { get; set; }

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

        protected override void Initialize()
        {
            // To learn more about cTrader Automate visit our Help Center:
            // https://help.ctrader.com/ctrader-automate
            
            Print(Message);
        }

        public override void Calculate(int index)
        {
            // Calculate value at specified index
            // Result[index] = 
            Chart.SetBarFillColor(index,Color.Green);   
            Chart.SetBarOutlineColor(index,Color.Red);
            Chart.SetBarColor(index,Color.Orange);     
        }
    }
}

For the time being I resorted to how I was doing this way back in windows before the bar color methods, which building the candles with lines. But maybe there's something I'm missing? Just wanted to know if there's something wrong on my end or if it's an issue with the Mac version.

Thanks in advance!


@rfs199
Replies

PanagiotisCharalampous
27 Dec 2024, 09:58

Hi there,

This is a known issue and will be fixed in the following updates.

Best regards,

Panagiotis


@PanagiotisCharalampous