remove the Source parameter from an indicator

Created at 09 Feb 2016, 22:33
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!
davidvandewalle's avatar

davidvandewalle

Joined 09.02.2016

remove the Source parameter from an indicator
09 Feb 2016, 22:33


Hello,

I want to remove:

[Parameter()]
public DataSeries Source { get; set; }

from an indicator, so it's not possible to change the value when running the indicator.

How do I set 'Source' default on 'Close', so the indicator keeps working ?

I guess:

private DataSeries Source = ?

Thanks in advance !


@davidvandewalle
Replies

whis.gg
09 Feb 2016, 22:48

RE:

Hi, you mean like that?

private DataSeries Source;

protected override void Initialize()
{
    Source = MarketSeries.Close;
}

 


@whis.gg

davidvandewalle
09 Feb 2016, 22:59

Yes, that's exactly what I need. It works.

Thanks a lot !


@davidvandewalle