Dukascopy
 
 
Wiki JStore Search Login

10:48:00 Error in indicator: java.lang.NullPointerException @ jforex.converted.FFCal.start(FFCal.java:323)
 Post subject: 10:48:00 Error in indicator: java.lang.NullPointerException @ jforex.converted.FFCal.start(FFCal.java:323) Post rating: 0   New post Posted: Wed 29 May, 2013, 12:00 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
Dear Support,

I converted an mq4 indicator, but when I try to use it, I got a warning and an error.
The warning:
Quote:
10:47:53 Alert: FFCal Error - Web page download was not complete!


The error:
Quote:
10:48:00 Error in indicator: java.lang.NullPointerException @ jforex.converted.FFCal.start(FFCal.java:323)



I attach the original mq4 indicator, and the converted jfx file as well.

As the generated java source is not available, I cannot see what causes the exception. I think it is not related to the warning about the webpage download, but I am not sure.


Could you give me some hints, how to go on?

Thanks in advance!


Attachments:
File comment: original indicator
FFCal.mq4 [52.02 KiB]
Downloaded 373 times
File comment: converted indicator
FFCal.jfx [75.15 KiB]
Downloaded 364 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: Error in indicator: java.lang.NullPointerException @ jforex.converted.FFCal.start(FFCal.java:323) Post rating: 0   New post Posted: Tue 04 Jun, 2013, 00:43 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
Dear Support,

I`ve tested yesterday this mq4 indicator, and there is no more nullpointer exception.


However the converted indicator still not working.
I was able to get a bit further, and locate a problem with this line:
iResult = InternetReadFile(hInternet, sBuffer, Buffer_LEN, lReturn);


In the mq4 version (and in metatrader4), the above line successfully update the sBuffer with the given webpage (or at least the first Buffer_LEN characters).
In the converted .jfx version this line leaves the sBuffer string empty. Could you explain why?


 
 Post subject: Re: 10:48:00 Error in indicator: java.lang.NullPointerException @ jforex.converted.FFCal.start(FFCal.java:323) Post rating: 0   New post Posted: Tue 04 Jun, 2013, 14:01 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
This MT4 indicator uses a dll library for connecting to a web server and downloading a xml file. JForex cannot work with external dll libraries like MetaTrader.
It is reasonable to re-write such indicator in Java instead of converting.


 
 Post subject: Re: 10:48:00 Error in indicator: java.lang.NullPointerException @ jforex.converted.FFCal.start(FFCal.java:323) Post rating: 0   New post Posted: Wed 05 Jun, 2013, 15:04 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
Thanks for the reply.

Would that be an option, just to avoid future frustration, to detect during conversion if an mq4 indicator contains such thing (external dll calls)? If it is, just stop the process with a friendly message, saying this conversion is not possible.


 

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