Oscillator level lines' default color

Created at 10 Feb 2019, 17:52
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!
Ogacha's avatar

Ogacha

Joined 26.05.2018

Oscillator level lines' default color
10 Feb 2019, 17:52


I want to specify the default colors and line styles to the oscillator level lines.

LevelAttribute provides only a function of specification of numeric values.

Is it possible to set default colors or styles?


@Ogacha
Replies

PanagiotisCharalampous
11 Feb 2019, 10:35

Hi Ogacha,

Thanks for posting in our forum. There is no such feature at the moment for built in indicators. You can do this for custom indicators only.

Best Regards,

Panagiotis


@PanagiotisCharalampous

Ogacha
13 Feb 2019, 08:47

RE:

 

There is no such feature at the moment for built in indicators. You can do this for custom indicators only.

Thank you for replying, Panagiotis.

I mean about a custom indicator.

It is possible to set numeric values (20, 50, 80) with LevelsAttribute. I want to know if it is possible to set a line color, style and thickness like OutputAttribute.

[Levels(20, 50, 80)]
[Indicator(IsOverlay = false)]
public class CustomIndicator : Indicator
{
    [Output("Yellow Line", LineColor = "Yellow", LineStyle = LineStyle.Lines, Thickness = 1f)]
    public IndicatorDataSeries YellowLine { get; set; }
    ……
}

 


@Ogacha

PanagiotisCharalampous
13 Feb 2019, 10:47

Hi Ogacha,

Yes it is. See an example below

        [Output("Test Series", PlotType = PlotType.Histogram, Color = Colors.Green, LineStyle = LineStyle.Solid, Thickness = 2)]
        public IndicatorDataSeries TestSeries{ get; set; }

Best Regards,

Panagiotis


@PanagiotisCharalampous

Ogacha
13 Feb 2019, 11:55

RE:

Perhaps, my English is poor, you don't understand what I want to ask. Excuse me.

I know how to setting color, style of DataSerries.

But I want to set color and style of horizonrtal level lines of (20, 50, 80). Not about DataSeries.

 


@Ogacha

PanagiotisCharalampous
13 Feb 2019, 12:27

Hi Ogacha,

Thanks I understood now. Unfortunately this is not possible at the moment. You can only specify the level value at the moment.

Best Regards,

Panagiotis


@PanagiotisCharalampous

Ogacha
13 Feb 2019, 12:55

RE:

I expect to be brushed up the feature of LevelsAttribute, thank you Panagiotis!


@Ogacha