Dukascopy Support Board
http://www.dukascopy.com/swiss/english/forex/jforex/forum/

jar to jfx compiler for strategies and indicators
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=83&t=50959
Page 1 of 1

Author:  Ataman [ Mon 24 Mar, 2014, 14:36 ]
Post subject:  jar to jfx compiler for strategies and indicators

It would be nice to have a jforex jar to jfx compiler for strategies and indicators as well (not just for plugins..). As things stand now, it is a little awkward to register custom indicators and strategies written in JVM languages other than java..

Author:  API Support [ Wed 26 Mar, 2014, 09:39 ]
Post subject:  Re: jar to jfx compiler for strategies and indicators

Could you please provide a concrete case when that would be necessary?

Author:  Cosmo [ Thu 29 May, 2014, 15:41 ]
Post subject:  Re: jar to jfx compiler for strategies and indicators

I write strategies in Scala and build and run them with sbt. Works fine so far, but how to import them into the JForex GUI to test them visually? The IClient.compileStrategy function only works for java and IClient.packPluginToJfx call only works for plugins. Therefore a generell jar to jfx compiler would be nice.

Author:  API Support [ Fri 30 May, 2014, 14:44 ]
Post subject:  Re: jar to jfx compiler for strategies and indicators

The request has been registered.

Author:  Cosmo [ Sat 31 May, 2014, 17:42 ]
Post subject:  Re: jar to jfx compiler for strategies and indicators

Thanks! Just FYI, writing a wrapper class in the JForex GUI works as a workaround and I can build jfx files
...
import JIndicators.*;

@Library("jindicators_2.10.jar:scala-library-2.10.4.jar")
public class TestIndicator implements IIndicator {
   
    private _TestIndicator i;
   
    public TestIndicator() {   
        if (i == null) {   
            i = new _TestIndicator();       
        }
    }       

    public void onStart(IIndicatorContext context) {               
        i.onStart(context);
    }

    public IndicatorResult calculate(int startIndex, int endIndex) {
        return i.calculate(startIndex, endIndex);   
    }
    ...

Author:  API Support [ Mon 30 Jun, 2014, 12:22 ]
Post subject:  Re: jar to jfx compiler for strategies and indicators

Feature available with JForex-API 2.9.12.

  Page 1 of 1