Behavior of IndicatorDataSeries, DataSeries and Output regarding IsOverlay Indicator

Created at 02 Feb 2014, 10:03
WhiteSage's avatar

WhiteSage

Joined 02.02.2014

Behavior of IndicatorDataSeries, DataSeries and Output regarding IsOverlay Indicator
02 Feb 2014, 10:03


I have an overlay indicator that has hidden components I use for calculation. Interestingly I cannot make them actually hidden on the chart without adversely effecting the behavior of the indicator.

Currently I create the data series like so 

[Output("Hidden Series")]
        public IndicatorDataSeries xm { get; set; }

and everything works well, however this series is visible on screen. This would be forgivable if it was data around the price range, but if it is something else (a %, a bool state etc) the view is destroyed.

When taking away the Output attribute the indicator compiles with no errors,

        public IndicatorDataSeries xm;

but then displays no data. Finally making it a plain DataSeries causes a compiler error 'Error CS0200: Property or indexer 'cAlgo.API.DataSeries.this[int]' cannot be assigned to -- it is read only' leading me to my question:

How can I hide this series and still get the same results?

 

Apologies if this is an already answer question, I did search but couldn't find anything.


@WhiteSage
Replies

Spotware
03 Feb 2014, 12:16

If you don't want to expose DataSeries from indicator, you don't need to use Output attribute. But in this case you need to initialize DataSeries manually using CreateDataSeries method:

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

        private IndicatorDataSeries HiddenDataSeries;

        protected override void Initialize()
        {
            HiddenDataSeries = CreateDataSeries();
        }

 


@Spotware

felipetto
25 Oct 2014, 06:31

RE:

Spotware said:

If you don't want to expose DataSeries from indicator, you don't need to use Output attribute. But in this case you need to initialize DataSeries manually using CreateDataSeries method:

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

        private IndicatorDataSeries HiddenDataSeries;

        protected override void Initialize()
        {
            HiddenDataSeries = CreateDataSeries();
        }

 

Can I set the visibility of the indicator at runtime?.. starting visible and then hide (vice-versa)!


@felipetto

Spotware
27 Oct 2014, 09:24

RE: RE:

felipetto said:

Spotware said:

If you don't want to expose DataSeries from indicator, you don't need to use Output attribute. But in this case you need to initialize DataSeries manually using CreateDataSeries method:

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

        private IndicatorDataSeries HiddenDataSeries;

        protected override void Initialize()
        {
            HiddenDataSeries = CreateDataSeries();
        }

 

Can I set the visibility of the indicator at runtime?.. starting visible and then hide (vice-versa)!

You can use PlotType.DiscontinuousLine


@Spotware

ogima.515@gmail.com
02 May 2018, 07:38

Thank you.This my problem now.


@ogima.515@gmail.com

... Deleted by UFO ...

... Deleted by UFO ...