Dukascopy
 
 
Wiki JStore Search Login

JFOREX-3698 Connector: Instrument [EUR/USD] not opened
 Post subject: JFOREX-3698 Connector: Instrument [EUR/USD] not opened Post rating: 0   New post Posted: Tue 10 Apr, 2012, 16:02 

User rating: 5
Joined: Thu 29 Mar, 2012, 15:00
Posts: 19
I've tried this today and it seems to work well... there is one little issue though. Every time the indicator is run I get the following:

ERROR controller.ConnectorController com.dukascopy.api.JFException: Instrument [EUR/USD] not opened
com.dukascopy.api.JFException: Instrument [EUR/USD] not opened
at com.dukascopy.api.impl.History.getLastTick(History.java:112)
at com.dukascopy.connector.controller.ConnectorController.getLastTickTime(ConnectorController.java:98)
at com.dukascopy.connector.controller.IndicatorController.onCalculate(IndicatorController.java:257)
at com.dukascopy.connector.engine.MQL4ConnectorIndicator.calculate(MQL4ConnectorIndicator.java:139)
at com.dukascopy.api.impl.Indicators.calculateIndicator(Indicators.java:4750)
at com.dukascopy.api.impl.Indicators.calculateIndicatorReturnSourceData(Indicators.java:4659)
at com.dukascopy.api.impl.Indicators.calculateIndicator(Indicators.java:4492)
at com.dukascopy.dds2.greed.agent.strategy.tester.TesterIndicators.calculateIndicator(TesterIndicators.java:46)
at FPM.FPMStrat.RSX(FPMStrat.java:264)
at FPM.FPMStrat.onBar(FPMStrat.java:155)
at com.dukascopy.dds2.greed.agent.strategy.tester.AbstractStrategyRunner.historicalCandleReceived(AbstractStrategyRunner.java:646)
at com.dukascopy.dds2.greed.agent.strategy.tester.StrategyRunner.run(StrategyRunner.java:464)
at java.lang.Thread.run(Thread.java:662)
com.dukascopy.api.JFException: Instrument [EUR/USD] not opened

It does, however, give me the correct values.


 
 Post subject: Re: JFOREX-3698 Connector: Instrument [EUR/USD] not opened Post rating: 0   New post Posted: Wed 11 Apr, 2012, 10:11 

User rating: 5
Joined: Thu 29 Mar, 2012, 15:00
Posts: 19
Just to note, this happens when using the following indicator in a stand-alone strategy.

It happens on whatever currency you're using and it comes from calling the following in onBar

            rsxResultsArray = this.indicators.calculateIndicator(ins, per, new OfferSide[] { OfferSide.BID }, "RSXConnector",
                    new IIndicators.AppliedPrice[] { IIndicators.AppliedPrice.CLOSE }, new Object[] { 3000, 0, 0, true, 500, false }, Filter.NO_FILTER, 500, time, 0);


Attachments:
RSXConnector.java [6.17 KiB]
Downloaded 312 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: JFOREX-3698 Connector: Instrument [EUR/USD] not opened Post rating: 0   New post Posted: Wed 11 Apr, 2012, 15:38 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
In general the exception means that the instrument has not been subscribed, see:
https://www.dukascopy.com/wiki/#Subscribe_to_an_instrument

tommy5d wrote:
It happens on whatever currency you're using and it comes from calling the following in onBar

            rsxResultsArray = this.indicators.calculateIndicator(ins, per, new OfferSide[] { OfferSide.BID }, "RSXConnector",
                    new IIndicators.AppliedPrice[] { IIndicators.AppliedPrice.CLOSE }, new Object[] { 3000, 0, 0, true, 500, false }, Filter.NO_FILTER, 500, time, 0);



Please be advised that MQL4ConnectorIndicator class method signatures are subject to change with upcoming releases, so it is not recommended to use the conversion result for any other than informative purposes.


 

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