Parameter with a custom selection
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
Replies
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 ...
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
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
croucrou
29 Feb 2016, 21:48
RE:
Hello,
you can do this, but you need to refer to C# syntax rather than cAlgo.
@croucrou