looping through cBot and Indicator params

Created at 17 Oct 2022, 03:34
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!
DR

drewisdad

Joined 27.04.2022

looping through cBot and Indicator params
17 Oct 2022, 03:34


Is it possible to loop through the params of my cBot/indicator to get the names and attributes of them?

 

Thanks again

 


@drewisdad
Replies

PanagiotisChar
17 Oct 2022, 11:11

Hi drewisdad,

You can use reflection to get the parameters of a class.

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

 


@PanagiotisChar

firemyst
01 Nov 2022, 13:06

Keep in mind that when using reflection in C#, those operations are costly and relatively slow, so use sparingly. If you need your cBot to run and react fast to market conditions, you'd want to limit the amount of reflection you use in your code.


@firemyst