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.

ITesterClient startStrategy function not returning
 Post subject: ITesterClient startStrategy function not returning Post rating: 0   New post Posted: Tue 07 Feb, 2012, 23:49 

User rating: 1
Joined: Tue 30 Aug, 2011, 08:54
Posts: 19
Location: AustraliaAustralia
I am trying to run a back test from a swing GUI application. When I call the startStrategy function the call never returns and the strategy doesn't start. Running this strategy from a non GUI test application (TesterMain) the call to startStrategy returns and the strategy starts. Note: I am using 2.6.55.


 
 Post subject: Re: ITesterClient startStrategy function not returning Post rating: 0   New post Posted: Wed 08 Feb, 2012, 14:09 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Do you use the example strategy and GUI program or modified ones?


 
 Post subject: Re: ITesterClient startStrategy function not returning Post rating: 0   New post Posted: Thu 09 Feb, 2012, 02:41 

User rating: 1
Joined: Tue 30 Aug, 2011, 08:54
Posts: 19
Location: AustraliaAustralia
I use the supplied test programs but replace MA_PLay with my strategy.


 
 Post subject: Re: ITesterClient startStrategy function not returning Post rating: 0   New post Posted: Thu 09 Feb, 2012, 09:17 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Does the MA_Play work? How do you detect that your strategy "does not work" or "does not start"? For more efficient assistance, could you please provide a sample strategy which replicates the issue?


 
 Post subject: Re: ITesterClient startStrategy function not returning Post rating: 0   New post Posted: Thu 09 Feb, 2012, 22:42 

User rating: 1
Joined: Tue 30 Aug, 2011, 08:54
Posts: 19
Location: AustraliaAustralia
No MA_PLay does not work either. Calling ITesterClient.startStrategy just doesn't return from the call. There is nothing wrong with the strategy, as I can start it from the test program. When debugging, I step over the staretStrategy call but the next line is never reached and the onStart function in the strategy is never entered (I have break points on the line after the startStrategy and inside the onStart function of the strategy).


 
 Post subject: Re: ITesterClient startStrategy function not returning Post rating: 0   New post Posted: Mon 13 Feb, 2012, 10:31 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
We successfully debugged the TesterMain program with MA_Play strategy.


 
 Post subject: Re: ITesterClient startStrategy function not returning Post rating: 0   New post Posted: Mon 27 Feb, 2012, 02:15 

User rating: 1
Joined: Tue 30 Aug, 2011, 08:54
Posts: 19
Location: AustraliaAustralia
I was calling the startStrategy from within a SwingWorker thread. Removing that code enabled it to work, but until it starts I cannot respond to any UI events. Is there a way of starting this from within a thread?


 
 Post subject: Re: ITesterClient startStrategy function not returning Post rating: 0   New post Posted: Mon 27 Feb, 2012, 10:45 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
brucieE wrote:
Is there a way of starting this from within a thread?
TesterMainGUIMode example within JForexStandaloneLibrary runs the strategy within its own thread.


 

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