Initiate indicator per Indicators.GetIndicator

Created at 12 Aug 2022, 13:00
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!
BE

benjaminwolf123454321

Joined 12.08.2022

Initiate indicator per Indicators.GetIndicator
12 Aug 2022, 13:00


Hey,

 

I try to use the TSV indicator in my cBot. Unfortunately, at the start of the Bot, the Log says "Crashed in OnStart with ArgumentException: Incorrect parameters count. (Parameter 'parameterValues')"

 

Now I wonder, which parameters I have to pass in the following method:

var tsv = Indicators.GetIndicator<TSV>(???);

 

Maybe someone can help me with this. Thank you!

 

https://ctrader.com/algos/indicators/show/2750


@benjaminwolf123454321
Replies

firemyst
14 Aug 2022, 19:17

the indicator has 3 parameters, so you need to provide the 3 values in their expected order:

var tsv = Indicators.GetIndicator<TSV>(Length, MaType, MaPeriod);


@firemyst