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

Visual JForex bug in generated Java code
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=146&t=56902
Page 1 of 1

Author:  isomorph [ Sun 20 Jan, 2019, 19:42 ]
Post subject:  Visual JForex bug in generated Java code

I exported to Java a VFS file to Java and ran the strat inside JForex. During the run, the Java code generated the following NullPointerException 17 times:

java.lang.NullPointerException @ com.dukascopy.visualforex.visualjforex.IIolor_breakout_year_2019_jan.CCI_block_12(IIolor_breakout_year_2019_jan.java:282)

The code at line 282 is:

long time = context.getHistory().getBar(argument_1, argument_2, OfferSide.BID, argument_3).getTime();



After exporting the strat from VFS to Java I did NOT modify any of the automatically generated code.

Therefore, the question is: Why does this boilerplate code generated by VFJ have this bug? At least one of the methods getTime(), getBar(), or getHistory() must be throwing the exception, or the context object suddenly is set to null somewhere.

This exception causes an indicator block that is essential to the strategy not to return a result and therefore makes it impossible to assess whether the strategy is working or not. At the moment, the strategy test runs the account equity down to 0.

@Support: Could you please let us know what you find out and when there'll be a fix? Because if there are still bugs like these in the dukascopy API, I think you would agree it would not be wise to risk real money on a strategy that could fail because of a NullPointException at any time when trading live. In other words, it's already difficult enough to create a reliable strategy that you don't need on top of that also be afraid that the parts of the code will not work because of an API bug and cause more losses.

In conclusion, your clients need to know that there are using reliable code.

  Page 1 of 1