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.

Getting the path of a jfx file and other questions
 Post subject: Getting the path of a jfx file and other questions Post rating: 0   Post Posted: Fri 23 Mar, 2012, 20:29 
User avatar

User rating: 94
Joined: Mon 06 Feb, 2012, 12:22
Posts: 357
Location: Portugal, Castelo Branco
Hi all and Dukascopy support.

I searched the forum but can't find anything that can lead me in doing this.
There is a way to get the path of the running strategy inside this strategy.

I know i can use IContext.getFilesDir() to get the path to files dir, and other paths over java.URL and java.io.File, but can't find any way to get the specific path of jfx file in JForex API javadocs.

Also there is any way to get the paths stored by preferences-> advanced tab ?

Other question, it's possible to compile a jfx file with more files than the strategy itself (i know i can use a external jar with @Library)?

TIA

Trade well and good luck

JL


 
 Post subject: Re: Getting the path of a jfx file and other questions Post rating: 0   Post Posted: Mon 26 Mar, 2012, 08:03 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
jlongo wrote:
I know i can use IContext.getFilesDir() to get the path to files dir, and other paths over java.URL and java.io.File, but can't find any way to get the specific path of jfx file in JForex API javadocs.
This is currently not possible when running the strategy from jforex platform. When running your strategy outside the platform, this should return the location of the strategy class file:
this.getClass().getResource("MyStrategy.class").getPath()

jlongo wrote:
Also there is any way to get the paths stored by preferences-> advanced tab ?
The preferences are not available from JForex API.
jlongo wrote:
Other question, it's possible to compile a jfx file with more files than the strategy itself (i know i can use a external jar with @Library)?
The jfx file includes a compiled strategy class file and the used libraries (i.e. jars).


 

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