heicheng / trade-manager

Automatically exported from code.google.com/p/trade-manager
0 stars 0 forks source link

Null exception when trying to run strategy #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, seems like a really nice piece of code, but I got some troubles running it

What steps will reproduce the problem?
1. Connect -> Live
2. Run Strategy

What is the expected output? What do you see instead?
popup with null pointer

What version of the product are you using? On what operating system?
lates / windows

Please provide any additional information below.
I got the null pointer from StrategyData
92: series.createSeries(candleDataset, 0);
the createSeries from MovingAverageSeries cannot do the getLength, as 
this.getValueCode(LENGTH) provoke the null pointer

full log:
2012-01-11 15:37:49.456 [WARN] org.hibernate.ejb.Ejb3Configuration:1105 - 
hibernate.connection.autocommit = false break the EJB3 specification
2012-01-11 15:38:18.979 [ERROR] org.trade.ui.base.BasePanel:219 - 
org.trade.broker.BrokerManagerModelException
    at org.trade.broker.TWSManagerModel.onBrokerData(TWSManagerModel.java: null
    at org.trade.broker.TWSManagerModel.onBrokerData(TWSManagerModel.java:312)
    at org.trade.ui.MainControllerPanel$BrokerDataRequestProgressMonitor.doInBackground(MainControllerPanel.java:1457)
    at org.trade.ui.MainControllerPanel$BrokerDataRequestProgressMonitor.doInBackground(MainControllerPanel.java:1412)
    at javax.swing.SwingWorker$1.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at javax.swing.SwingWorker.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Original issue reported on code.google.com by charles....@gmail.com on 11 Jan 2012 at 8:43

GoogleCodeExporter commented 9 years ago
Ok this issue should be fixed in the 1.3.6 build you need to update your DB as 
changes have been made. To run a strategy you need symbols for that day and for 
the 5min bar strategy you need to run b4 9:30EST as the trigger for entry is 
the completion of the 9:35am bar if you ran outside that time frame the 
strategy will run and close on the next completion of a bar after 10:30am. 
Probably best to go to strategy tab and check the strategy code for all the 
rules.
Thanks

Original comment by simon.allen on 11 Jan 2012 at 9:59

GoogleCodeExporter commented 9 years ago
OK 1.3.8 build will run with 1.6/1.7 JDK there was a problem with class loader 
that occured in JDK 1.6.26 and later versions.

Original comment by simon.allen on 14 Jan 2012 at 3:47

GoogleCodeExporter commented 9 years ago

Original comment by simon.allen on 3 Jul 2012 at 1:26