|
help, strategy si not running only on contest accnt |
merlin
|
Post subject: help, strategy si not running only on contest accnt |
Post rating: 0
|
Posted: Thu 26 Apr, 2012, 18:00
|
|
User rating: 0
Joined: Mon 30 Jan, 2012, 21:50 Posts: 32 Location: Czech Republic, Staré Buky
|
pls help for May contest, the enclosed strategy is not running only on strategy contest accnt. On remote slot on Demo accnt is running well, log file is without errors, strategy is sending and closing orders. On contest accnt strategy is executed and running only for couple of seconds. When restarted it, running and then stops. Again and again. Log file is EMPTY and EMPTY and ... Should somebody help me solve this? Thanks a lot contest support ? Attachment:
AL_MACDSTOCH_v5_remote.java [13.26 KiB]
Downloaded 483 times
|
|
|
|
 |
Antilochus
|
Post subject: Re: help, strategy si not running only on contest accnt |
Post rating: 0
|
Posted: Thu 26 Apr, 2012, 19:01
|
|
User rating: 1
Joined: Mon 25 Jul, 2011, 11:46 Posts: 29 Location: United Kingdom, Burnley
|
Hi Merlin. The java file you attached here is not the one that is showing for April's contest.
The contest java file did not contain the subscription to instruments that is present in the file you attached. I would expect the April file to not open orders in the contest, but would open them for local and remote demo accounts, which is what you describe.
Unless I've missed something, I see no reason why the strategy you've attached wouldn't open orders for May's contest if it's opening orders now in your demo account.
|
|
|
|
 |
drishti
|
Post subject: Re: help, strategy si not running only on contest accnt |
Post rating: 0
|
Posted: Thu 26 Apr, 2012, 19:27
|
|
User rating: 8
Joined: Tue 31 Jan, 2012, 11:24 Posts: 72 Location: India, Gurgaon
|
Change your slippage to 10 or 5, and then run this strategy. It will work. slippage - slippage. The value of slippage means following: - if negative then default value of 5 pips is used - if Double.isNaN(slippage) == true then no slippage is used - otherwise, slippage is set in pips, you should pass 1, not 0.0001
|
|
|
|
 |
Arthus
|
Post subject: Re: help, strategy si not running only on contest accnt |
Post rating: 0
|
Posted: Thu 26 Apr, 2012, 19:49
|
|
User rating: 0
Joined: Thu 26 Apr, 2012, 19:32 Posts: 2 Location: Czech Republic, Praha
|
Tank you for help. Contest support ask me for new April subscription, because accnt not generate log file.
To Antilochus - my Apríl subscription name is Arthus - sorry for ... There are uploaded two strategies, changed on instrument subscription only
To drishti - thanks for advice, I can change it for May subscription only. What I can not understand is, that strategy log file is empty - when strategy was executed and for couple of sec or mins runs after restarting ...
|
|
|
|
 |
Arthus
|
Post subject: Re: help, strategy si not running only on contest accnt |
Post rating: 0
|
Posted: Thu 26 Apr, 2012, 20:07
|
|
User rating: 0
Joined: Thu 26 Apr, 2012, 19:32 Posts: 2 Location: Czech Republic, Praha
|
Tank you for help. Contest support ask me for new April subscription, because accnt not generate log file.
To Antilochus - my Apríl subscription name is Arthus - sorry for ... There are uploaded two strategies, changed on instrument subscription only
To drishti - thanks for advice, I can change it for May subscription only. What I can not understand is, that strategy log file is empty - when strategy was executed and for couple of sec or mins runs after restarting ...
|
|
|
|
 |
merlin
|
Post subject: Re: help, strategy si not running only on contest accnt |
Post rating: 0
|
Posted: Fri 27 Apr, 2012, 10:04
|
|
User rating: 0
Joined: Mon 30 Jan, 2012, 21:50 Posts: 32 Location: Czech Republic, Staré Buky
|
To Antilochus, thanks for help. But on contest support advice I set up new April contest accnt. Reason was no log file. New temporary ID is Arthus - sorry for misunderstanding
To drishti, thanks for help. I can try it in May contest only. I am not sure, that slippage is reason why strategy is downloaded and executed well and than tested or restarted well. Strategy is running for couple of sec and than stops. After restarting again runs and than stops.
Log file is empty. No any rows.
Thank you again
|
|
|
|
 |
drishti
|
Post subject: Re: help, strategy si not running only on contest accnt |
Post rating: 0
|
Posted: Fri 27 Apr, 2012, 10:34
|
|
User rating: 8
Joined: Tue 31 Jan, 2012, 11:24 Posts: 72 Location: India, Gurgaon
|
Have you tested after modifying slippage?
I am checking this system, and will tell you soon what is wrong.
And do you get any message, when you restart this strategy?
|
|
|
|
 |
merlin
|
Post subject: Re: help, strategy si not running only on contest accnt |
Post rating: 0
|
Posted: Fri 27 Apr, 2012, 12:44
|
|
User rating: 0
Joined: Mon 30 Jan, 2012, 21:50 Posts: 32 Location: Czech Republic, Staré Buky
|
strategy is tested only on demo accnt on remote run and live accnt on tester. Anuy errors or messages.
On contest can not execute third one.
edit:
somebody help me and repair viewing strategy log here you are:
Last update : 27.04.2012 13:56:40 Level Date Message INFO 27.04.2012 13:52:08 Strategy "AL_MACDSTOCH_v5_remote.java" is terminated by Strategy stopped self INFO 27.04.2012 13:52:08 Stopping "AL_MACDSTOCH_v5_remote" strategy at 2012-04-27 11:52:08.821 GMT on the local computer ERROR 27.04.2012 13:52:08 java.lang.NullPointerException @ Merlin.Mar2012.AL_MACDSTOCH_v5_remote.onStart(AL_MACDSTOCH_v5_remote.java:90) ERROR 27.04.2012 13:52:08 at java.lang.Thread.run(Thread.java:662) ERROR 27.04.2012 13:52:08 at com.dukascopy.api.impl.execution.ScienceThreadPoolExecutor$Worker.run(ScienceThreadPoolExecutor.java:926) ERROR 27.04.2012 13:52:08 at com.dukascopy.api.impl.execution.ScienceThreadPoolExecutor$Worker.runTask(ScienceThreadPoolExecutor.java:904) ERROR 27.04.2012 13:52:08 at java.util.concurrent.FutureTask.run(FutureTask.java:138) ERROR 27.04.2012 13:52:08 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) ERROR 27.04.2012 13:52:08 at com.dukascopy.api.impl.execution.TaskCustom.call(TaskCustom.java:34) ERROR 27.04.2012 13:52:08 at com.dukascopy.api.impl.connect.JForexTaskManager$1.call(JForexTaskManager.java:491) ERROR 27.04.2012 13:52:08 at com.dukascopy.api.impl.connect.JForexTaskManager$1.call(JForexTaskManager.java:510) ERROR 27.04.2012 13:52:08 at com.dukascopy.api.impl.connect.StrategyProcessor.onStart(StrategyProcessor.java:147) ERROR 27.04.2012 13:52:08 at com.dukascopy.api.impl.execution.TaskStart.call(TaskStart.java:27) ERROR 27.04.2012 13:52:08 at Merlin.Mar2012.AL_MACDSTOCH_v5_remote.onStart(AL_MACDSTOCH_v5_remote.java:90) ERROR 27.04.2012 13:52:08 java.lang.NullPointerException ERROR 27.04.2012 13:52:08 null: ERROR 27.04.2012 13:52:08 java.lang.NullPointerException @ Merlin.Mar2012.AL_MACDSTOCH_v5_remote.onStart(AL_MACDSTOCH_v5_remote.java:90) INFO 27.04.2012 13:52:08 Strategy "AL_MACDSTOCH_v5_remote" is started at 2012-04-27 11:52:08.497 GMT on the local computer with no parameters 1
|
|
|
|
 |
Antilochus
|
Post subject: Re: help, strategy si not running only on contest accnt |
Post rating: 0
|
Posted: Fri 27 Apr, 2012, 13:53
|
|
User rating: 1
Joined: Mon 25 Jul, 2011, 11:46 Posts: 29 Location: United Kingdom, Burnley
|
That suggests the result of getLastTick(instrument) is returning null, or history is null (unlikely) (it gave a NPE at line 90). Best if you verify the results of the call to getLastTick, or take it out of onStart.
|
|
|
|
 |
drishti
|
Post subject: Re: help, strategy si not running only on contest accnt |
Post rating: 0
|
Posted: Fri 27 Apr, 2012, 14:07
|
|
User rating: 8
Joined: Tue 31 Jan, 2012, 11:24 Posts: 72 Location: India, Gurgaon
|
Code clearly says that null pointer exception.
27.04.2012 13:52:08 java.lang.NullPointerException @ Merlin.Mar2012.AL_MACDSTOCH_v5_remote.onStart(AL_MACDSTOCH_v5_remote.java:90) INFO
Remove these codes from onStart method (Line 90 & 91)as these variable is not called anywhere in code so will not make any difference and then run it to test..
double lastPrice = history.getLastTick(instrument).getBid(); lastTickTime = history.getLastTick(instrument).getTime();
|
|
|
|
 |
merlin
|
Post subject: Re: help, strategy si not running only on contest accnt |
Post rating: 0
|
Posted: Fri 27 Apr, 2012, 14:10
|
|
User rating: 0
Joined: Mon 30 Jan, 2012, 21:50 Posts: 32 Location: Czech Republic, Staré Buky
|
I see that these two rows (90 and 91) are rest of previous code
hope is it all what is wrong.
|
|
|
|
 |
drishti
|
Post subject: Re: help, strategy si not running only on contest accnt |
Post rating: 0
|
Posted: Fri 27 Apr, 2012, 14:17
|
|
User rating: 8
Joined: Tue 31 Jan, 2012, 11:24 Posts: 72 Location: India, Gurgaon
|
merlin wrote: I see that these two rows (90 and 91) are rest of previous code
hope is it all what is wrong. As per present scenario, which is stopping strategy is these two lines of code. Remove it and run it. If it does not run again, then provide whole message thread once again. I do not see any other things wrong from previous log file.
|
|
|
|
 |
merlin
|
Post subject: Re: help, strategy si not running only on contest accnt |
Post rating: 0
|
Posted: Tue 01 May, 2012, 10:03
|
|
User rating: 0
Joined: Mon 30 Jan, 2012, 21:50 Posts: 32 Location: Czech Republic, Staré Buky
|
strategy is running on contest accnt now - first win What is wrong is, contest log file is empty again. No any row.
And the same strategy has oppened second order on live accnt and zero orders on contest accnt.
Can not understand why.
|
|
|
|
 |
merlin
|
Post subject: Re: help, strategy si not running only on contest accnt |
Post rating: 0
|
Posted: Wed 02 May, 2012, 20:31
|
|
User rating: 0
Joined: Mon 30 Jan, 2012, 21:50 Posts: 32 Location: Czech Republic, Staré Buky
|
Do not know why, but strategy send fist order today. Differently than on live accnt. Hope strategy running ok.
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|