Oscillator level lines' default color

10 Feb 2019, 17:52Oscillator level lines' default color#1
Ogacha posts: 4since: 26 May 2018

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?

11 Feb 2019, 10:35#2
Panagiotis Charalampousposts: 2610since: 13 Jan 2017

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


Head of Community Management at cTrader
13 Feb 2019, 08:47RE:#3
Ogacha posts: 4since: 26 May 2018

 

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; }
    ……
}

 

13 Feb 2019, 10:47#4
Panagiotis Charalampousposts: 2610since: 13 Jan 2017

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


Head of Community Management at cTrader
13 Feb 2019, 11:55RE:#5
Ogacha posts: 4since: 26 May 2018

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.

 

13 Feb 2019, 12:27#6
Panagiotis Charalampousposts: 2610since: 13 Jan 2017

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


Head of Community Management at cTrader
13 Feb 2019, 12:55RE:#7
Ogacha posts: 4since: 26 May 2018

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