Dukascopy Support Board http://www.dukascopy.com/swiss/english/forex/jforex/forum/ |
|
com.dukascopy.api.JFException: Instrument [...] not opened http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=16&t=50982 |
Page 1 of 1 |
Author: | hyperscalper [ Wed 26 Mar, 2014, 20:51 ] |
Post subject: | com.dukascopy.api.JFException: Instrument [...] not opened |
Hi, This exception appears to be due to an inability to fetch data for an SMA indicator. Is this just historical database unavailability? All of the instruments are subscribed by the strategy. I'm a Live FXDD client. Switching to a Live Dukascopy account did not throw these errors. Then restarting the strategy on the Live FXDD account, and running both Live accounts side-by-side also showed no further errors. So it just looks like indicators in the Strategy lost contact with the database server needed for indicator calculations. Once the historical database contact is lost in calculation of an indicator such as SMA, is there any action we can take programmatically to re-establish the connection? Can we some how re-initialize the IIndicators object from within the Strategy? Looks like restarting the Strategy running in the JForex platform did the trick.... Both platforms just fine. Each subscribed to 28 Currency pairs. HyperScalper FXDD Live platform FXDD ver. 2.32.4 JForex API ver. 2.9.6.2 Dukas Live platform ver. 2.32.4 JForex API ver. 2.9.6.2 log getMAClosePriceArray error !! |
Author: | hyperscalper [ Wed 26 Mar, 2014, 21:01 ] |
Post subject: | Re: com.dukascopy.api.JFException: Instrument [...] not opened |
Hey, I think I know what went wrong. The Strategy is running fine, subscribed to 28 pairs. Then I manually used "Remove All" on the platform within the Instruments window, and that seems to result in the errors show in the previous post. I thought that was NOT suppose to happen. So this appears to be a bug either in the API or JForex platform, where the Strategy is denied access to its currently subscribed instrument data, and this in turn affects the ability to fetch SMA for the now "closed" instruments. I think this information is supposed to be "locked" when the Strategy subscribes to its instrument set. So I guess if I see this exception, I can just re-subscribe to the original instrument set and restore operation ? Thanks for looking into this, HyperScalper |
Author: | hyperscalper [ Wed 26 Mar, 2014, 21:19 ] |
Post subject: | Re: com.dukascopy.api.JFException: Instrument [...] not opened |
OK, I can confirm that catching this exception and then re-subscribing to the Instrument set recovers from the problem. Hoping you can fix this in a future release, but this workaround works for me ! Thanks, HyperScalper |
Page 1 of 1 |