indicator not plot in the past

Created at 19 Aug 2018, 17:36
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!
swingfish's avatar

swingfish

Joined 25.06.2016

indicator not plot in the past
19 Aug 2018, 17:36


is there a way to have a indicator NOT plot past a certain amount of days ? 

IE just plot for the current day as example ? 

 


@swingfish
Replies

PanagiotisCharalampous
20 Aug 2018, 10:07

Hi swingfish,

You can use PlotType.Points and leave the indices you don't want to be displayed empty

        [Output("Result", Color = Colors.Red, PlotType = PlotType.Points)]
        public IndicatorDataSeries Result{ get; set; }

This way you will get points only for the period you wish to see.

Best Regards,

Panagiotis


@PanagiotisCharalampous

swingfish
27 Aug 2018, 19:11

hello and thanks for the hint, however the PlotType does not limit the output range, it just changes the way how it's displayed.

what i want to accomplish is simply that the line starts at the point where its started to be calculated and disregard all the previous periods.

 


@swingfish

swingfish
27 Aug 2018, 19:17

sorry, please disregard my previous comment, it works just fine with the parameter 

the line is cut now as expected.

thank you very much


@swingfish

swingfish
27 Aug 2018, 19:21

is there a way to "completly" disregard the old data from displaying it ? 

the "problem" iam still facing is that the chart is getting shrinked down because the previous line is still there, especially if there is a large gap

once the gap is not visible anymore the chart resets to the proper zoom, so my idea was to completly disregard the previous data

 


@swingfish

PanagiotisCharalampous
29 Aug 2018, 12:44

Hi swingfish,

There is no bulit in way to do so. If you don't want the indicator to be displayed for past periods, you need to empty the  IndicatorDataSeries values (set to NaN) for that specific time period.

Best Regards,

Panagiotis


@PanagiotisCharalampous