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.

What could cause this exception?
 Post subject: What could cause this exception? Post rating: 0   New post Posted: Wed 23 Apr, 2014, 15:07 

User rating: 1
Joined: Tue 14 Jan, 2014, 16:13
Posts: 21
Location: United KingdomUnited Kingdom
My strategy loads a large amount of ticks in the onStart routine for analysis. In the past it has never given an error, but today the last line of this code

to = history.getTimeOfLastTick(Instrument.EURUSD);
        from = to - 180L * 24 * 3600 * 1000;
        List<ITick> trainTicks = history.getTicks(Instrument.EURUSD, from, to);


has given a JForexException each of two times I have tried it. What might cause this "thread death"?

loadingFinished: instrument=EUR/USD, allDataLoaded=true, start=18-04-2014 13:47:57, end=23-04-2014 13:47:57, currentPosition=23-04-2014 13:47:57
2014-04-23 14:48:24.573 WARN JFRunnableProcessor - Killing strategy thread []
Killing strategy thread []
2014-04-23 14:48:24.573 INFO Main - Strategy stopped: 47
2014-04-23 14:48:24.581 ERROR LoadDataAction -
java.lang.ThreadDeath
at java.lang.Thread.stop(Thread.java:850)
at com.dukascopy.api.impl.execution.ScienceThreadPoolExecutor.kill(ScienceThreadPoolExecutor.java:1217)
at com.dukascopy.api.impl.connect.JFRunnableProcessor.halt(JFRunnableProcessor.java:199)
at com.dukascopy.api.impl.connect.JForexTaskManager$2.run(JForexTaskManager.java:702)
com.dukascopy.api.JFException: Error while loading ticks @ com.dukascopy.api.impl.History.getTicksSecured(History.java:391)
Error while loading ticks: com.dukascopy.api.JFException: Error while loading ticks
at com.dukascopy.api.impl.History.getTicksSecured(History.java:391)
at com.dukascopy.api.impl.History$4.run(History.java:349)
at com.dukascopy.api.impl.History$4.run(History.java:346)
at java.security.AccessController.doPrivileged(Native Method)
at com.dukascopy.api.impl.History.getTicks(History.java:346)
at com.rochefx.svm.StrategySVM.onStart(StrategySVM.java:111)


 
 Post subject: Re: What could cause this exception? Post rating: 0   New post Posted: Tue 29 Apr, 2014, 15:14 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
For huge data amounts consider loading tick asynchronously - without blocking the strategy execution, see IHistory.readTicks.


 

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