How to open position on alien symbol ?

Created at 02 Feb 2017, 20:12
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!
SA

sartsarsart

Joined 02.02.2017

How to open position on alien symbol ?
02 Feb 2017, 20:12


I'really beginner...

Bot works on EURUSD, in one or other way i get as string _symbol = "GBPUSD (as example),

how to open position not on current Symbol but on my _symbol   ?

 

Regards,

Sart


@sartsarsart
Replies

sartsartsart
03 Feb 2017, 00:03

RE:

sartsarsart said:

I'really beginner...

Bot works on EURUSD, in one or other way i get as string _symbol = "GBPUSD (as example),

how to open position not on current Symbol but on my _symbol   ?

 

Regards,

Sart

well, i found answer already, here:

Trading multiple symbols

Robots in cAlgo can execute orders for different symbols. To do this, the robot must request the needed symbol by its code. Then, it will be possible to use it in a trade request:

?

1

2

 Symbol symbol = MarketData.GetSymbol("GBPCHF");

 ExecuteMarketOrder(TradeType.Buy, symbol, 10000);

 


@sartsartsart