Hello Support,
i ran into some issues with backtesting via API. My codebase has been pretty stable for thel ast months, so i guess something changed on the server side
or has been pulled by maven. First issue is an Nullpointer Exception thrown at connect:
Quote:
2017-02-06 11:02:47.258 ERROR AuthorizationClient -
java.lang.NullPointerException
at com.dukascopy.api.impl.connect.AuthorizationClient.getAPIsAndTicketUsingLogin_SRP6(AuthorizationClient.java:736)
at com.dukascopy.api.impl.connect.AuthorizationClient.getAPIsAndTicketUsingLogin_SRP6(AuthorizationClient.java:715)
at com.dukascopy.api.impl.connect.TesterClientImpl.authenticateAPI(TesterClientImpl.java:466)
at com.dukascopy.api.impl.connect.TesterClientImpl.connect(TesterClientImpl.java:238)
at com.dukascopy.api.impl.connect.TesterClientImpl.connect(TesterClientImpl.java:229)
at singlejartest.GP.Dc_connect_V2.initDC(Dc_connect_V2.java:145)
at singlejartest.Singlestrat_Main.main(Singlestrat_Main.java:81)
2017-02-06 11:02:47.272 INFO AuthorizationClient - Auth step 1 request [ ]
2017-02-06 11:02:48.427 INFO AuthorizationClient - Auth step 1 response [ServerResponseObject [passwordServerResponse=Step1ServerResponse [serverPublicValueB= , saltS=503e80fc28d85e51ea13fd06a5981338, safePrimeN= , correspondingGeneratorG=2, hashAlgorithmH=SHA-256, srpProtocolVersion=1], ]]
2017-02-06 11:02:48.529 INFO AuthorizationClient - Auth step 2 request A [ ], M1 [24683693447833261037151667119048958198460053904896408070822620270793776584353]
2017-02-06 11:02:49.333 INFO AuthorizationClient - Auth step 2 response [ServerResponseObject [passwordServerResponse=Step2ServerResponse [serverEvidenceMessageM2=2fa2fa4648505cddf7d482ae35c61d9a6d683c13e8ce0d1f15743709d7a53b67, srpProtocolVersion=1], ]]
2017-02-06 11:02:49.334 INFO AuthorizationClient - Auth step 3 request
2017-02-06 11:02:50.426 INFO AuthorizationClient - Auth step 3 response [ServerResponseObject [passwordServerResponse=Step3ServerResponse [serverResponse={"occasus":" \r\nYS91dGlsL1Byb3BlcnRpZX...","authApiURLs":["d-ja-gva-101-135-154.dukascopy.com:10443","d-ja-usa-e-96-4-a.dukascopy.com:10443","d-ja-sgn-04-b.dukascopy.com:10443","d-ja-jpn-102-100-c.dukascopy.com:10443","d-ja-hk-110-04.dukascopy.com:10443","d-ja-msk-10.dukascopy.com:10443"],"srp_versio":"1"}], responseHeaderFields={Transfer-Encoding=[chunked], null=[HTTP/1.1 200], CF-RAY=[32cdc4cac8ff1ac9-DUS], Server=[cloudflare-nginx], Connection=[keep-alive], Client-Country=[DE], Pragma=[no-cache], Last-Modified=[Mon, 06 Feb 2017 10:02:49 GMT], Date=[Mon, 06 Feb 2017 10:02:50 GMT], Cache-Control=[no-cache, must-revalidate, no-store, max-age=0], Access-Control-Allow-Credentials=[true], Client-IP=[211.16.124.27], Vary=[Accept-Encoding], Set-Cookie=[__cfduid=db4fd16f9eeda79bd55867e7e135cf3c21486375369; expires=Tue, 06-Feb-18 10:02:49 GMT; path=/; domain=.dukascopy.com; HttpOnly], Expires=[Thu, 01 Jan 1970 00:00:00 GMT], Content-Type=[text/plain;charset=UTF-8]}]]
2017-02-06 11:02:50.427 INFO AuthorizationClient - authorization, PlatformSessionKey=de8c9d0657884f39b1777239f6ce06ed97b4e33d478f8a1dd3b17d60411783fd
Connection code is basicvally from the tutorial:
private static String jnlpUrl = "https://platform.dukascopy.com/demo/jforex.jnlp";
...
this.client.connect(jnlpUrl, userName, password);
However, it seems to connect. The next more severe problem is execution of the strategies. The IStrategie does not get any data, so the last thing executed is the constructor, not even onStart() or onTick() gets called. The output is
Quote:
Exception in thread "StrategyRunner Thread" java.lang.NullPointerException: Could not load tick before test interval start 2017-01-21 00:00:00:000
at com.dukascopy.dds2.greed.agent.strategy.tester.dataload.HTCandlesCreator.<init>(HTCandlesCreator.java:85)
at com.dukascopy.dds2.greed.agent.strategy.tester.dataload.HistoricalTesterDataManager.createCandlesLoader(HistoricalTesterDataManager.java:712)
at com.dukascopy.dds2.greed.agent.strategy.tester.dataload.HistoricalTesterDataManager.createAndAddCandlesLoader(HistoricalTesterDataManager.java:240)
at com.dukascopy.dds2.greed.agent.strategy.tester.dataload.HistoricalTesterDataManager.createAndAddDefaultDataLoaders(HistoricalTesterDataManager.java:890)
at com.dukascopy.dds2.greed.agent.strategy.tester.dataload.HistoricalTesterDataManager.createAndAddDefaultDataLoaders(HistoricalTesterDataManager.java:224)
at com.dukascopy.dds2.greed.agent.strategy.tester.StrategyRunner.initBeforeRun(StrategyRunner.java:273)
at com.dukascopy.dds2.greed.agent.strategy.tester.StrategyRunner.run(StrategyRunner.java:323)
at java.lang.Thread.run(Thread.java:745)
after startStrategy() is called.
It worked fine until at least the 29.Jab 2017. My next run at the 4.Feb complained about the missing data. I purged my local history data, to no avail.
I reran maven after encountering the problems, API Version is now at 2.13.28, DDS2-jClient-JForex at 3.0.18