|
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.
debugging a strategy called by API in Eclipse - breakpoints |
RoadRunner
|
Post subject: debugging a strategy called by API in Eclipse - breakpoints |
Post rating: 0
|
Posted: Sun 16 May, 2010, 13:12
|
|
User rating: 3
Joined: Wed 18 May, 2011, 16:25 Posts: 331 Location: SwitzerlandSwitzerland
|
Hi,
I'm trying to debug a strategy code that is called through an instance of the TesterFactory in Eclipse (Eclipse 3.6.0., Java 1.6.0_20 64bit).
While I can set and use breakpoints in onBar without any problems, breakpoints in onTick or functions called from onTick are only triggered once in a run and then getting ignored.
Do you know why the onTick breakpoints are only triggered one time and if there is a workaround to be able to fully the debug strategy code called from onTick ?
Best, RR.
|
|
|
|
 |
[Phantal]
|
Post subject: Re: debugging a strategy called by API in Eclipse - breakpoi |
Post rating: 0
|
Posted: Mon 17 May, 2010, 05:05
|
|
User rating: 0
Joined: Fri 07 May, 2010, 02:59 Posts: 61
|
I don't have an answer for you on this, though I'll play with it a bit and see whether I run into any problems on my end. I'm using Netbeans.
As an aside, have you had any luck testing orders with the ITesterClient & TesterFactory stuff? My orders never leave the 'CREATED' state.
-Brian
|
|
|
|
 |
[Phantal]
|
Post subject: Re: debugging a strategy called by API in Eclipse - breakpoi |
Post rating: 0
|
Posted: Mon 17 May, 2010, 06:00
|
|
User rating: 0
Joined: Fri 07 May, 2010, 02:59 Posts: 61
|
I tried setting a breakpoint in onTick(), but my onTick doesn't even get executed it would seem. I tried adding an if statement with a breakpoint inside of it, and the was never hit, so I added a System.out.println outside the if statement and that never prints anything. Not sure what the deal is.
-Brian
|
|
|
|
 |
RoadRunner
|
Post subject: Re: debugging a strategy called by API in Eclipse - breakpoi |
Post rating: 0
|
Posted: Mon 17 May, 2010, 13:17
|
|
User rating: 3
Joined: Wed 18 May, 2011, 16:25 Posts: 331 Location: SwitzerlandSwitzerland
|
Hi Brian, hi support team,
I've got the debugging going with our own strategy codes. I now can fully debug the strategy including conditional breakpoints in onTick. I'm not sure what finally did the trick. The initial post was referring to playing around with debugging MA_PLAY.java, that is included in DK release. Basically I've now taken the TesterMain.java-template and included a time range through setDataInterval, set the CacheDirectory and called our own strategy code in startStretegy and the debugging is working like a charm.
Brian, there was a bug in the JVM prior to (and including?) 1.6.0_16, that has been leading to skipping break points due to internally returning wrong thread ids. If you haven't done so, I suggest you update to the latest build (1.6.0_20) and try again.
And yes, I can submit trades and they get filled. So up to now everything is working for me.
Best regrads, RR.
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|