Parameter with a custom selection

Created at 29 Feb 2016, 20:16
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!
Waxy's avatar

Waxy

Joined 12.05.2015

Parameter with a custom selection
29 Feb 2016, 20:16


Hello

I would like to build a bot in which its parameters have custom selections, for example:

Instead of being a booled variable which shows only Yes or No, it could show Option 1, Option 2, Option 3, etc.

I'm not sure if I made it clear, but is there any way to do this?

Thank you


@Waxy
Replies

croucrou
29 Feb 2016, 21:48

RE:

Hello,

 

you can do this, but you need to refer to C# syntax rather than cAlgo.


@croucrou

cyfer
01 Mar 2016, 13:03

I tried it so many times with enum and array and not a single Success 

Spotware is not providing a Parameter that can hold a collection , so no matter what hacks you can do .. you just can't get around this limitation

there is no type we can access that can hold a collection , only Spotware built-in types like TimeFrame & Symbol 

 

 


@cyfer

... Deleted by UFO ...

Waxy
01 Mar 2016, 16:16

I-ve tried some time ago with no success using diferent types of variables, but I don-t really get it, you can use a menu to select the currency pair on where the cbot will work, why it shouldn-t work when we try to do it?


@Waxy

cyfer
01 Mar 2016, 16:36

Because Spotware provided us "Retail Traders/Developers" with a limited API 

you can use the Currency Pair & TimeFrame because they built those as a collection 

even when you want to make a collection of Strings[] , you can't

the only way is (int) with a Max & Min values .. so you'll get the slider but other than that , AFAIK there is nothing .

 

Speaking of Limitations , you'll face the need for a scanner that goes through various currency pairs , then you'll meet another limitations 

for example , we should've had the ability to create a custom window that docks into the platform "like news in FXpro"platform or Favorites in currency tab

we also should be able to make Algos without the need to inherit from indicators or Bots / or inherit specific Functions only "Like OnBar & OnTick"

did you notice that we can't even display a visual alert "like the one you see when you set a Price Alert" and we have to go for winAPI & Extern methods ? 

unfortunately , that's the way it is . 

I hope I'm wrong .. but I don't think so .


@cyfer

Waxy
01 Mar 2016, 22:37

Thank you guys, I hope they add this functionality in the future soon.

Also croucrou that's a GUI extension and not sure how to do it.


@Waxy

croucrou
02 Mar 2016, 14:56

Hello,

 

just hinting at possible solution. Using Windows Forms gives you access to all types of elements you might potentially be interested in.

 

I am sure it is not a rocket science, if you are familiar with programming and C# and if you really need it of course.


@croucrou