List of Symbols

Created at 06 Feb 2014, 14:55
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!
EL

Elogos

Joined 23.01.2014

List of Symbols
06 Feb 2014, 14:55


Hi, 

After exploring the API quite a bit, I can't find any collection of available symbols.

 

Is there a way to get such symbols?

The alternative is to supply a huge list and try-catch any that don't match, but I'd rather not.

 

Many Thanks,

 


@Elogos
Replies

jeremysprite
08 Feb 2014, 11:33

Hi Elogos,

I had the same question, apparently this is not available :(

/forum/cbot-support/2391

Here's my code below - there's a few pairs missing like NZDCHF that didn't exist on my cAlgo demo :\

 public string[] currencyPairs = new string[] 
        {
            "EURUSD",
            "EURGBP",
            "EURJPY",
            "EURCAD",
            "EURAUD",
            "EURCHF",
            "USDJPY",
            "USDCAD",
            "USDCHF",
            "GBPUSD",
            "GBPJPY",
            "GBPCAD",
            "GBPAUD",
            "GBPNZD",
            "GBPCHF",
            "CADJPY",
            "CADCHF",
            "AUDUSD",
            "AUDJPY",
            "AUDCAD",
            "AUDCHF",
            "NZDUSD"
        };

 


@jeremysprite

Elogos
08 Feb 2014, 14:58

Yeah,

 

It would be nice to be able to have a collection somewhere of at least symbol codes.

 

I did a similar thing but made it a parameter and Split(',') them in initialisation so I could change it on different instances of the indicator.


@Elogos