|
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.
OutOfMemoryError : Java heap space, Tester in "Visual Mode" |
nicofr0707
|
Post subject: OutOfMemoryError : Java heap space, Tester in "Visual Mode" |
Post rating: 0
|
Posted: Fri 02 Sep, 2011, 10:26
|
|
User rating: 5
Joined: Fri 02 Sep, 2011, 10:08 Posts: 157 Location: FranceFrance
|
Hi,
My Strategy trades on about 28 currency pairs (maximum 4 orders at the same time).
When I'm testing the strategy with the tester, all works well if I unpick "Visual Mode", but if I choose to backtest in "Visual Mode" in order to see what's happening, I have a "Strategy tester: java.lang.OutOfMemoryError: Java heap space" after about 15 days of backtest. I'm not drawing any graphics on the charts.
Is their a way to force Jforex to clean the memory ? or with java... Again the problem only occurs in "Visual Mode" so I think their could be a leak in the JForex GUI when it shows the 28 charts.
All ideas are welcomed !
Thanks
|
|
|
|
 |
API Support
|
Post subject: Re: OutOfMemoryError : Java heap space, Tester in "Visual Mo |
Post rating: 0
|
Posted: Fri 02 Sep, 2011, 14:20
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
nicofr0707 wrote: Is their a way to force Jforex to clean the memory ? At the current implementation there is no such thing. However starting with the next version one will be able to choose which charts to show and which - not. nicofr0707 wrote: or with java... You might consider increasing java heap size.
|
|
|
|
 |
nicofr0707
|
Post subject: Re: OutOfMemoryError : Java heap space, Tester in "Visual Mo |
Post rating: 1
|
Posted: Fri 02 Sep, 2011, 16:21
|
|
User rating: 5
Joined: Fri 02 Sep, 2011, 10:08 Posts: 157 Location: FranceFrance
|
Thank you for your response. Quote: At the current implementation there is no such thing. However starting with the next version one will be able to choose which charts to show and which - not. How do you do that ? If a chart hasn't been opened during the backtest to save memory, how can you then see the closed orders on that chart ? Thanks
|
|
|
|
 |
API Support
|
Post subject: Re: OutOfMemoryError : Java heap space, Tester in "Visual Mo |
Post rating: 0
|
Posted: Mon 05 Sep, 2011, 08:29
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
nicofr0707 wrote: API Support wrote: At the current implementation there is no such thing. However starting with the next version one will be able to choose which charts to show and which - not. How do you do that ? This will be available with the next release of JForex client. nicofr0707 wrote: If a chart hasn't been opened during the backtest to save memory, how can you then see the closed orders on that chart ? Obviously you can't see an order on a chart if Visual mode has not been selected at the beginning of backtesting. However, you can find all of your order information in the report file, also you might consider logging any specific order data. Also as an alternative you might consider using Standalone API, and more particular the example TesterMainGUIMode, which allows you to display particular charts while backtesting. Start from here: https://www.dukascopy.com/wiki/index.php ... in_EclipseAlso see: viewtopic.php?f=65&t=41666&p=53517
|
|
|
|
 |
nicofr0707
|
Post subject: Re: OutOfMemoryError : Java heap space, Tester in "Visual Mo |
Post rating: 0
|
Posted: Wed 28 Sep, 2011, 08:02
|
|
User rating: 5
Joined: Fri 02 Sep, 2011, 10:08 Posts: 157 Location: FranceFrance
|
Hello support, Quote: At the current implementation there is no such thing. However starting with the next version one will be able to choose which charts to show and which - not. Is this option now available ? How can I choose the charts to open in the tester ? Best regards
|
|
|
|
 |
API Support
|
Post subject: Re: OutOfMemoryError : Java heap space, Tester in "Visual Mo |
Post rating: 0
|
Posted: Fri 30 Sep, 2011, 07:37
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
nicofr0707 wrote: Is this option now available ? As mentioned before, this will be available with the next release of JForex client.
|
|
|
|
 |
RoadRunner
|
Post subject: Re: OutOfMemoryError : Java heap space, Tester in "Visual Mo |
Post rating: 0
|
Posted: Fri 18 Nov, 2011, 23:32
|
|
User rating: 3
Joined: Wed 18 May, 2011, 16:25 Posts: 331 Location: SwitzerlandSwitzerland
|
Hi nicofr0707, if you have enough RAM available on your PC, you could increase the initial and max heap size through editing the jnlp file. You would have to download the jnlp, open it with a text editor and increase the heap size entries to for example the values shown here in blue: Quote: ... <resources> <property name="jnlp.client.version" value="2.13.32"/> <property name="jnlp.platform.mode" value="jforex"/> <property name="jnlp.client.mode" value="DEMO"/> <property name="jnlp.login.url" value="https://www1.dukascopy.com/authorization/demo,https://www2.dukascopy.com/authorization/demo,https://www3.dukascopy.com/authorization/demo"/> <property name="sun.java2d.d3d" value="false"/> <java version="1.6+" initial-heap-size="512m" max-heap-size="2048m"/> <jar href="lib/7zip-4.65.jar" main="false"/> ...
When using multiple instruments in our backtesting including charting, we always increase the max heap size to about 2gb (=2048m) or more. You then would have to start the client using this modified jnlp file. Please don't forget to download a new jnlp file every time a new version of the client is released. Best, RR.
|
|
|
|
 |
nicofr0707
|
Post subject: Re: OutOfMemoryError : Java heap space, Tester in "Visual Mo |
Post rating: 0
|
Posted: Tue 22 Nov, 2011, 11:54
|
|
User rating: 5
Joined: Fri 02 Sep, 2011, 10:08 Posts: 157 Location: FranceFrance
|
Hi Roadrunner,
Thanks for your response, it is exactly what I did by adding 12gigs of ram in my computer and a heap space of 8192m. For those who have issues to, you have to install the 64bit version of java in order to take advantage of more than 2000m of heap-space...
Best regards
|
|
|
|
 |
SFXbernhard
|
Post subject: Re: OutOfMemoryError : Java heap space, Tester in "Visual Mode" |
Post rating: 0
|
Posted: Fri 15 Jun, 2012, 10:44
|
|
User rating: 21
Joined: Thu 19 May, 2011, 20:50 Posts: 413 Location: Germany, Munich
|
Could you explain how to allocate 8 GB for JForex? What steps have to be done?
|
|
|
|
 |
nicofr0707
|
Post subject: Re: OutOfMemoryError : Java heap space, Tester in "Visual Mode" |
Post rating: 0
|
Posted: Tue 26 Jun, 2012, 07:39
|
|
User rating: 5
Joined: Fri 02 Sep, 2011, 10:08 Posts: 157 Location: FranceFrance
|
@SFXbernhard
Instead of running JForex from dukascopy.com, you should download the jnlp file on the hard drive.
Edit it and search for the following line : <java version="1.6+" initial-heap-size="32m" max-heap-size="512m"/>
set the max-heap-size to the value you want.
Then run JForex from the modified jnlp file on your hard drive. Be aware that if Dukascopy makes a JForex update, your have to redownload the new jnlp file and redo the previous described steps.
Best regards
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|