Dukascopy
 
 
Wiki JStore Search Login

Someone please help me Convert a MT4 strategy into jav
 Post subject: Someone please help me Convert a MT4 strategy into jav Post rating: 0   Post Posted: Sun 11 Jan, 2015, 05:17 
User avatar

User rating: 0
Joined: Sun 11 Jan, 2015, 03:30
Posts: 3
Location: China,
Dear all kind classmates,someone can help me convert the attached MT4 strategy into java?
The best wishes and thanks in ton to you!!!!


Attachments:
JforexTest.mq4 [597.71 KiB]
Downloaded 173 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: Someone please help me Convert a MT4 strategy into jav Post rating: 0   Post Posted: Mon 12 Jan, 2015, 14:41 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
What problems have you faced when trying to convert it with the converter?


 
 Post subject: Re: Someone please help me Convert a MT4 strategy into jav Post rating: 0   Post Posted: Tue 13 Jan, 2015, 15:41 
User avatar

User rating: 0
Joined: Sun 11 Jan, 2015, 03:30
Posts: 3
Location: China,
The strategy works fine in MT4. Actually, I don`t see specific errors when convert it to Java. But when I local run the strategy in JForex, there is no orders open as expect. I test the strategy in JForex, no result either.


 
 Post subject: Re: Someone please help me Convert a MT4 strategy into jav Post rating: 0   Post Posted: Wed 14 Jan, 2015, 20:47 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
Hi,

You could give it a try to use this. This is a tool that copies trades from Metatrader to JForex.
I know it is not the solution for the issues with the converted strategy, but at lease it can be a workaround.


 
The Best Answer  Post subject: Re: Someone please help me Convert a MT4 strategy into jav Post rating: 0   Post Posted: Fri 16 Jan, 2015, 12:26 
User avatar

User rating: 0
Joined: Fri 17 Jan, 2014, 18:13
Posts: 72
Location: NetherlandsNetherlands
The MT4 script starts with a Windows DLL. If that is not available for jForex, of coarse the script will not work. I don not know if jForex can work with Win Libs like that.


 
 Post subject: Re: Someone please help me Convert a MT4 strategy into jav Post rating: 0   Post Posted: Sun 18 Jan, 2015, 05:17 
User avatar

User rating: 0
Joined: Sun 11 Jan, 2015, 03:30
Posts: 3
Location: China,
The MT4 strategy seems work in JForex after conversion. I can see open orders and close orders during demo running in JForex. But I don`t know why it basically don`t open orders when I test it in JForex Historical tester. Does JForex Historical tester not support MT4 converted strategy testing? Anyone know about it or tried before?


 
 Post subject: Re: Someone please help me Convert a MT4 strategy into jav Post rating: 0   Post Posted: Mon 19 Jan, 2015, 12:45 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
There should be no 'restriction' about the Historical Tester. So the converted strategy should work fine in the tester as well.

What might be the case is that there is something in the EA/strategy that is behaving differently on a demo account compared to the tester. For example, if you want to get the current time, it is always 'in the past' on a demo account. Whenever you call the function to get the time, the returned value will be a couple of milliseconds behind.
If you execute the same code in the tester, and suppose you test between 2012-01-01 and 2013-01-01, the current time (2015-01-19) will be a date in the future (compared to 2012 and 2013).
If there is anything on the code that uses such thing (makes decision on date/time), there is a chance that it is going wrong in the tester.
And this is not only involving the current time, but for example the date+time of the last bar/tick for an instrument.

I haven't looked on the code, so I cannot say that this is the problem. This is just a possibility.
I suggest further on to create a topic in here, so Support is aware of your issues. And they can probably help to get you further.


 

Jump to:  

cron
  © 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