Wiki JStore Search Login

Visual JForex bug in generated Java code
 Post subject: Visual JForex bug in generated Java code Post rating: 0   New post Posted: Sun 20 Jan, 2019, 19:42 
User avatar

User rating: 0
Joined: Tue 26 Jan, 2016, 04:18
Posts: 16
Location: CanadaCanada
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.


Jump to:  

  © 1998-2011 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