Dukascopy
 
 
Wiki JStore Search Login

Including personal libraries or JAR files in indicators
 Post subject: Including personal libraries or JAR files in indicators Post rating: 0   New post Posted: Tue 09 Oct, 2012, 22:33 

User rating: 0
Joined: Sun 07 Oct, 2012, 10:33
Posts: 5
Is there a way to include personal libraries or JAR files in Indicators? The @Library() annotation does not seem to work with indicators and I have not been able to "import" personal class libraries from indicators.


 
 Post subject: Re: Including personal libraries or JAR files in indicators Post rating: 0   New post Posted: Tue 09 Oct, 2012, 23:16 
User avatar

User rating: 94
Joined: Mon 06 Feb, 2012, 12:22
Posts: 357
Location: Portugal, Castelo Branco
Hi StochSpring:

I never tested importing jar libraries in indicators, but one alternative as it seems you have the code, is doing inner classes in the strategy itself with your classes.

I hope that helps.

JL


 
 Post subject: Re: Including personal libraries or JAR files in indicators Post rating: 0   New post Posted: Wed 10 Oct, 2012, 07:29 

User rating: 0
Joined: Sun 07 Oct, 2012, 10:33
Posts: 5
Thanks JL.

I will look into using inner classes, although I was hoping to avoid the use of strategies in this case as indicators provide a better usage model for my purpose.

Stoch

P.S. I have found your tutorials very helpful in getting started in Jforex.


 
 Post subject: Re: Including personal libraries or JAR files in indicators Post rating: 0   New post Posted: Wed 10 Oct, 2012, 09:47 
User avatar

User rating: 94
Joined: Mon 06 Feb, 2012, 12:22
Posts: 357
Location: Portugal, Castelo Branco
Hi StochSpring:

I made a mistake on last post... i don't mean "strategies" but indicator code...
Sorry.


Best regards

JL


 
 Post subject: Re: Including personal libraries or JAR files in indicators Post rating: 0   New post Posted: Sat 13 Oct, 2012, 23:01 

User rating: 0
Joined: Sun 07 Oct, 2012, 10:33
Posts: 5
Hi JL

Thanks for the suggestion of looking into inner classes. Using them cleaned up my code quite a bit. However, they didn't solve the original problem, which I now see I didn't explain. The problem is this: I would like to use the same algorithm library in several indicators on the JForex platform. Incorporating the algorithm library in the same file with the indicators makes maintenance a nightmare. It is already challenging after implementation in two indicators (one for overlaying price and one for overlaying a second indicator). As more indicators are added, it will become very difficult to manage. I will see if API support might be able to help.

Thanks again.


 

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