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.

strategy stops sending orders
 Post subject: strategy stops sending orders Post rating: 0   New post Posted: Thu 29 Mar, 2012, 22:08 
User avatar

User rating: 0
Joined: Mon 30 Jan, 2012, 21:50
Posts: 32
Location: Czech Republic, Staré Buky
support, pls this strategy did run well. Now is not sending orders.
pls should you recognise why?

thanks


Attachments:
MACD_STOCH_Strat2.java [15.06 KiB]
Downloaded 291 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: strategy stops sending orders Post rating: 0   New post Posted: Fri 30 Mar, 2012, 08:13 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Consider adding logging statements to understand which execution paths get taken and why:
https://www.dukascopy.com/wiki/#IConsole/Logging_values
Note that with the new JForex-API version it is more convenient to calculate the indicators over range bars, see:
https://www.dukascopy.com/wiki/#Indicato ... d_by_shift


 
 Post subject: Re: strategy stops sending orders Post rating: 0   New post Posted: Mon 02 Apr, 2012, 14:07 
User avatar

User rating: 0
Joined: Mon 30 Jan, 2012, 21:50
Posts: 32
Location: Czech Republic, Staré Buky
Thank you support,
I am trying code it as you recomend, but without success. I see that I am copy-paste-error programmer. Pls Should you do this strategy function?
Thank you


 
 Post subject: Re: strategy stops sending orders Post rating: 0   New post Posted: Tue 03 Apr, 2012, 09:43 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Try:
Attachment:
MACD_STOCH_Strat3.java [15.41 KiB]
Downloaded 317 times


 
 Post subject: strategy stops sending orders II. Post rating: 0   New post Posted: Tue 03 Apr, 2012, 16:46 
User avatar

User rating: 0
Joined: Mon 30 Jan, 2012, 21:50
Posts: 32
Location: Czech Republic, Staré Buky
Hello support,
because you locked viewtopic.php?t=47011&f=65

I am writing new but same topic.

Firstly thank you, but I tested posted strategy MACD_STOCH_Strat3. Strategy finishes with same result. Zero sending orders.
Are you sure, that you posted right release of strategy? Difference is only removed row #15.

Thank you for your help


 
 Post subject: Re: strategy stops sending orders II. Post rating: 0   New post Posted: Wed 04 Apr, 2012, 11:12 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
We adjusted the strategy to compile with the latest JForex-API version.


 
 Post subject: Re: strategy stops sending orders Post rating: 0   New post Posted: Wed 04 Apr, 2012, 12:48 
User avatar

User rating: 0
Joined: Mon 30 Jan, 2012, 21:50
Posts: 32
Location: Czech Republic, Staré Buky
thank you for response, but in the new API must be next difference, because on old API the same strategy run and sent orders. Now with new API not.


 
 Post subject: Re: strategy stops sending orders Post rating: 0   New post Posted: Thu 05 Apr, 2012, 15:22 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
The strategy does trade. The only problem is that the indicators on range bars get calculated for a prolonged time period - this will get fixed with the next release of JForex.
We adjusted the strategy to use the latest JForex-API functionality regarding range bar usage.


Attachments:
MACD_STOCH_Strat4.java [8.3 KiB]
Downloaded 300 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: strategy stops sending orders Post rating: 0   New post Posted: Thu 05 Apr, 2012, 18:52 
User avatar

User rating: 0
Joined: Mon 30 Jan, 2012, 21:50
Posts: 32
Location: Czech Republic, Staré Buky
good job, thank you. Strategy is running on API 2.6.64.

Q: will run on new version of API, as you said as is, or must by strategy changed again?


 
 Post subject: Re: strategy stops sending orders Post rating: 0   New post Posted: Fri 06 Apr, 2012, 07:46 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
merlin wrote:
Q: will run on new version of API, as you said as is, or must by strategy changed again?
It should not be the case.


 
 Post subject: Re: strategy stops sending orders Post rating: 0   New post Posted: Thu 10 May, 2012, 15:26 
User avatar

User rating: 0
Joined: Mon 30 Jan, 2012, 21:50
Posts: 32
Location: Czech Republic, Staré Buky
strategy MACD_STOCH_Strat3 is now running on historical tester. But on Demo API 2.6.66 do this error
(is reason different ver of API?)

2012-05-10 13:52:04 Strategy "MACD_STOCH_Strat3" is stopped at 2012-05-10 13:52:04.295 GMT on the local computer with parameters "Price range (pips)"=[3], "Instrument"=[EUR/USD], "Offer Side"=[Bid], "Amount"=[0.8], "Slippage"=[0.0], "Take profit pips"=[0], "Stop loss in pips"=[0], "MACD Fast period"=[6], "MACD Slow period"=[13], "MACD Signal period"=[4], "STOCH Fast K period"=[5], "STOCH Slow K period"=[3], "STOCH K MA Type"=[EMA], "STOCH Slow D period"=[3], "STOCH D MA Type"=[EMA]
2012-05-10 13:52:04 Stopping "MACD_STOCH_Strat3" strategy at 2012-05-10 13:52:04.289 GMT on the local computer

150 double[] macd0 = getMACD(closePrices[CLOSE], 0);

2012-05-10 13:52:04 java.lang.NullPointerException @ jforex.strategies.MACD_STOCH_Strat3.execOnBar(MACD_STOCH_Strat3.java:150)
2012-05-10 13:49:18 Strategy "MACD_STOCH_Strat3" is started at 2012-05-10 13:49:18.836 GMT on the local computer with parameters "Price range (pips)"=[3], "Instrument"=[EUR/USD], "Offer Side"=[Bid], "Amount"=[0.8], "Slippage"=[0.0], "Take profit pips"=[0], "Stop loss in pips"=[0], "MACD Fast period"=[6], "MACD Slow period"=[13], "MACD Signal period"=[4], "STOCH Fast K period"=[5], "STOCH Slow K period"=[3], "STOCH K MA Type"=[EMA], "STOCH Slow D period"=[3], "STOCH D MA Type"=[EMA]
2012-05-10 13:49:18 Starting "MACD_STOCH_Strat3" strategy at 2012-05-10 13:49:18.809 GMT on the local computer


 
 Post subject: Re: strategy stops sending orders Post rating: 0   New post Posted: Tue 15 May, 2012, 08:23 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
please use MACD_STOCH_Strat4.java


 
 Post subject: Re: strategy stops sending orders Post rating: 0   New post Posted: Tue 15 May, 2012, 09:53 
User avatar

User rating: 0
Joined: Mon 30 Jan, 2012, 21:50
Posts: 32
Location: Czech Republic, Staré Buky
pls let me know why MACD_STOCH_Strat4 can not by run remotelly?

@RequiresFullAccess
public class MACD_STOCH_Strat4 implements IStrategy {


and results on historical tester
messages

2012-05-15 08:46:58 ORDER_FILL_OK - Order filled order: FILLED SELL 2.243446 @ 1.30616
2012-05-15 08:46:58 ORDER_SUBMIT_OK - Order submitted order: OPENED SELL 4.0 @ 0.0
2012-05-15 08:46:58 ORDER_CLOSE_OK - Order closed order: CLOSED BUY 1.123798 @ 1.30603
2012-05-15 08:46:57 at java.lang.Thread.run(Unknown Source)
2012-05-15 08:46:57 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
2012-05-15 08:46:57 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
2012-05-15 08:46:57 at com.dukascopy.dds2.greed.actions.c.run(Unknown Source)
2012-05-15 08:46:57 at com.dukascopy.dds2.greed.actions.StrategyTesterAction.yo(Unknown Source)
2012-05-15 08:46:57 at com.dukascopy.dds2.greed.actions.StrategyTesterAction.yO(Unknown Source)
2012-05-15 08:46:57 at com.dukascopy.dds2.greed.agent.strategy.tester.b.a(Unknown Source)
2012-05-15 08:46:57 at com.dukascopy.dds2.greed.agent.strategy.tester.t.run(Unknown Source)
2012-05-15 08:46:57 at com.dukascopy.dds2.greed.agent.strategy.tester.b.a(Unknown Source)
2012-05-15 08:46:57 at com.dukascopy.dds2.greed.agent.strategy.a.b.a(Unknown Source)
2012-05-15 08:46:57 at com.dukascopy.dds2.greed.agent.strategy.a.c.c.a(Unknown Source)
2012-05-15 08:46:57 at com.dukascopy.dds2.greed.agent.strategy.a.c.c.a(Unknown Source)
2012-05-15 08:46:57 at jforex.strategies.MACD_STOCH_Strat4$1.onBar(MACD_STOCH_Strat4.java:90)
2012-05-15 08:46:57 at jforex.strategies.MACD_STOCH_Strat4.access$0(MACD_STOCH_Strat4.java:99)
2012-05-15 08:46:57 at jforex.strategies.MACD_STOCH_Strat4.execOnBar(MACD_STOCH_Strat4.java:109)
2012-05-15 08:46:57 at com.dukascopy.api.impl.bv.calculateIndicator(Unknown Source)
2012-05-15 08:46:57 at com.dukascopy.api.impl.i.a(Unknown Source)
2012-05-15 08:46:57 at com.dukascopy.api.impl.b.b.a(Unknown Source)
2012-05-15 08:46:57 com.dukascopy.api.JFException: Passed Time [2012-04-05 15:08:15.000] has to be in interval [2007-03-30 16:01:15.688; 2012-04-05 15:08:14.734]
2012-05-15 08:46:57 at java.lang.Thread.run(Unknown Source)


 
 Post subject: Re: strategy stops sending orders Post rating: 0   New post Posted: Wed 16 May, 2012, 11:26 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
merlin wrote:
pls let me know why MACD_STOCH_Strat4 can not by run remotelly?

@RequiresFullAccess
public class MACD_STOCH_Strat4 implements IStrategy {
Try removing the annotation
merlin wrote:
and results on historical tester
messages

2012-05-15 08:46:58 ORDER_FILL_OK - Order filled order: FILLED SELL 2.243446 @ 1.30616
2012-05-15 08:46:58 ORDER_SUBMIT_OK - Order submitted order: OPENED SELL 4.0 @ 0.0
2012-05-15 08:46:58 ORDER_CLOSE_OK - Order closed order: CLOSED BUY 1.123798 @ 1.30603
2012-05-15 08:46:57 at java.lang.Thread.run(Unknown Source)
2012-05-15 08:46:57 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
2012-05-15 08:46:57 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
2012-05-15 08:46:57 at com.dukascopy.dds2.greed.actions.c.run(Unknown Source)
2012-05-15 08:46:57 at com.dukascopy.dds2.greed.actions.StrategyTesterAction.yo(Unknown Source)
2012-05-15 08:46:57 at com.dukascopy.dds2.greed.actions.StrategyTesterAction.yO(Unknown Source)
2012-05-15 08:46:57 at com.dukascopy.dds2.greed.agent.strategy.tester.b.a(Unknown Source)
2012-05-15 08:46:57 at com.dukascopy.dds2.greed.agent.strategy.tester.t.run(Unknown Source)
2012-05-15 08:46:57 at com.dukascopy.dds2.greed.agent.strategy.tester.b.a(Unknown Source)
2012-05-15 08:46:57 at com.dukascopy.dds2.greed.agent.strategy.a.b.a(Unknown Source)
2012-05-15 08:46:57 at com.dukascopy.dds2.greed.agent.strategy.a.c.c.a(Unknown Source)
2012-05-15 08:46:57 at com.dukascopy.dds2.greed.agent.strategy.a.c.c.a(Unknown Source)
2012-05-15 08:46:57 at jforex.strategies.MACD_STOCH_Strat4$1.onBar(MACD_STOCH_Strat4.java:90)
2012-05-15 08:46:57 at jforex.strategies.MACD_STOCH_Strat4.access$0(MACD_STOCH_Strat4.java:99)
2012-05-15 08:46:57 at jforex.strategies.MACD_STOCH_Strat4.execOnBar(MACD_STOCH_Strat4.java:109)
2012-05-15 08:46:57 at com.dukascopy.api.impl.bv.calculateIndicator(Unknown Source)
2012-05-15 08:46:57 at com.dukascopy.api.impl.i.a(Unknown Source)
2012-05-15 08:46:57 at com.dukascopy.api.impl.b.b.a(Unknown Source)
2012-05-15 08:46:57 com.dukascopy.api.JFException: Passed Time [2012-04-05 15:08:15.000] has to be in interval [2007-03-30 16:01:15.688; 2012-04-05 15:08:14.734]
2012-05-15 08:46:57 at java.lang.Thread.run(Unknown Source)
This should be fixed with the following platform release (JForex-API 2.6.67)


 

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