Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

String to Instrument
 Post subject: String to Instrument Post rating: 0   New post Posted: Tue 10 Jan, 2017, 12:10 
User avatar

User rating: 0
Joined: Wed 29 May, 2013, 04:14
Posts: 62
hello, do you know how convert String to Instrument?

String cross="EUR/JPY";
Instrument instr = Instrument.cross; // wrong!!!



 
 Post subject: Re: String to Instrument Post rating: 0   New post Posted: Tue 10 Jan, 2017, 14:29 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
This is the way to do it
Instrument instrument = Instrument.fromString("EUR/USD");


 

Jump to:  

  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com