rimrock wrote:
I don't know how to make a jar file of the first strategy so it can be included (via @Library) into the second strategy. I've used eclipse to create a jar file based on the 1st strategy's source code, but I get a warning that there are compile errors. Also, if I try to pull that jar file into a compile of the 2nd strategy, I get the following error: "myFirstStrategy cannot be resolved to a type"
If you have difficulties to create a jar, maybe try creating a new java project, reference from it JForex API libraries, add a single strategy to it (the one you want to run multiple instances of), export it into a jar and see if it works out.
rimrock wrote:
When I compile the first strategy from the jforex platform, is a jar file created somewhere that I could move, or simply reference from the @Library statement within the second strategy?
No, only a jfx file gets created.
rimrock wrote:
Since I have to compile on the jforex platform, how do I create a jar file that will work with the 2nd parallel-execution strategy?
See the answer above.
For your convenience we have attached the jar file used in the wiki example. So you might at first try if the example works for you on JForex client before making jars of your own. Also note that the compile error must have been caused by the lack of
package notation at the beginning of
StrategySimpleParallel class in JForex wiki (this now has been updated).