Instrument.USDCNH.getSecondaryCurrency() always gives null. Why?
It seems like a new instrument, but not working with the getSecondaryCurrency() function.
Example given.
If you start the following program with the relevant code snippet
for (Instrument instr : Instrument.values()) {
try{
console.getOut().println("instr = "+instr.toString());
console.getOut().println("primary currency = "+instr.getPrimaryCurrency().toString());
console.getOut().println("secondary currency = "+instr.getSecondaryCurrency().toString());
}
catch(Exception e){
e.printStackTrace(console.getErr());
}
}
you will find the following output, generated in the messages from down to top:
[...]
00:05:22 at java.lang.Thread.run(Unknown Source)
00:05:22 at com.dukascopy.api.impl.execution.g$a.run(Unknown Source)
00:05:22 at com.dukascopy.api.impl.execution.g$a.f(Unknown Source)
00:05:22 at java.util.concurrent.FutureTask.run(Unknown Source)
00:05:22 at com.dukascopy.api.impl.execution.k.call(Unknown Source)
00:05:22 at com.dukascopy.api.impl.connect.bk.call(Unknown Source)
00:05:22 at com.dukascopy.api.impl.connect.bk.bz(Unknown Source)
00:05:22 at com.dukascopy.api.impl.connect.ag.a(Unknown Source)
00:05:22 at com.dukascopy.api.impl.execution.u.call(Unknown Source)
00:05:22 at com.dukascopy.api.impl.execution.u.call(Unknown Source)
00:05:22 at jforex.InstrumentValuesBug.onStart(InstrumentValuesBug.java:28)
00:05:22 java.lang.NullPointerException
00:05:22 primary currency = USD
00:05:22 instr = USD/CNH
[...]
seen in JForex DEMO 2.34.1 and 2.34, also in the last LIVE version