Hello,
I am trying to transfer a series of indicators from MT4 to JForex, I managed to find a code converter at
https://code.google.com/p/mql4-connector/What it does is convert MQL files into java. Then all java files are placed in JForex/indicators folder so I can open them within JForex. These are the steps I implemented:
Left hand side, right click in “Custom Indicators Open indicator”, I select the indicator and it is opened in JForex. Within that screen there is a button that is the compile (F5) option. Once I click several of them come back with error messages within the code itself and three of them with a message “Cannot instantiate indicator” that I do not know what it means. Indicator with this message has a [1] sign in the list below. It follows a list of indicator I tried to compile.
My java knowledge is almost zero. Can anyone help me to find the solutions? Thanks.
These are the indicators:
Indicator TMA
TMABand
TMAChannel_End_Point [1]
TMAslopev14B430
TMATrue [1]
TMATruev2152
TMATruewithDistancexx [1]
THVTRIXv601_mod
The error messages list follows:
2013-02-21 00:09:20 ----------
2013-02-21 00:09:20 Incompatible operand types String and Instrument
2013-02-21 00:09:20 ^^^^^^^^^^^^^^^^^^^^
2013-02-21 00:09:20 if (ld_380==ld_388&&ls_412==Instrument()&&ld_396==Time(4)-Time(5)&&Bars-l_bars_364<2.0){
2013-02-21 00:09:20 2. ERROR in F:\Documents and Settings\Carlos\Local Settings\JForex\Carlos\jfxide\tmp\compile\THVTrixv601_mod.java (at line 284)
2013-02-21 00:09:20 ----------
2013-02-21 00:09:20 Invalid character constant
2013-02-21 00:09:20 ^^^^^^^^^^^^^^^^
2013-02-21 00:09:20 @Configurable("") public Color text1Color=toColor(C'0x77,0x77,0x00');
2013-02-21 00:09:20 1. ERROR in F:\Documents and Settings\Carlos\Local Settings\JForex\Carlos\jfxide\tmp\compile\THVTrixv601_mod.java (at line 43)
2013-02-21 00:09:20 ----------
2013-02-21 00:09:19 Compiling THVTrixv601_mod.java
2013-02-20 23:59:24 Cannot instantiate indicator
2013-02-20 23:59:24 jforex.converted.TmaTruewithDistancesxx.toInt(Ljava/lang/Number;)I
2013-02-20 23:59:23 Compilation successful. Indicator ID: 799287FA64CF47CD840FC08BDB873B92
2013-02-20 23:59:22 Compiling TmaTruewithDistancesxx.java
2013-02-20 23:58:58 ----------
2013-02-20 23:58:58 The public type j102TMATRUEv2152 must be defined in its own file
2013-02-20 23:58:58 ^^^^^^^^^^^^^^^^
2013-02-20 23:58:58 public class j102TMATRUEv2152 extends MQL4ConnectorIndicator {
2013-02-20 23:58:58 1. ERROR in F:\Documents and Settings\Carlos\Local Settings\JForex\Carlos\jfxide\tmp\compile\TMATRUEv2152.java (at line 9)
2013-02-20 23:58:58 ----------
2013-02-20 23:58:58 Compiling TMATRUEv2152.java
2013-02-20 23:57:38 Cannot instantiate indicator
2013-02-20 23:57:38 jforex.converted.TmaTrue.toInt(Ljava/lang/Number;)I
2013-02-20 23:57:38 Compilation successful. Indicator ID: 060F3B30379F3F60B79E9929A88698B7
2013-02-20 23:57:37 Compiling TmaTrue.java
2013-02-20 23:57:17 ----------
2013-02-20 23:57:17 The public type j102TMAslopev14B430 must be defined in its own file
2013-02-20 23:57:17 ^^^^^^^^^^^^^^^^^^^
2013-02-20 23:57:17 public class j102TMAslopev14B430 extends MQL4ConnectorIndicator {
2013-02-20 23:57:17 1. ERROR in F:\Documents and Settings\Carlos\Local Settings\JForex\Carlos\jfxide\tmp\compile\TMAslopev14B430.java (at line 9)
2013-02-20 23:57:17 ----------
2013-02-20 23:57:16 Compiling TMAslopev14B430.java
2013-02-20 23:55:55 Cannot instantiate indicator
2013-02-20 23:55:55 jforex.converted.TMAChannel_End_Point.toInt(Ljava/lang/Number;)I
2013-02-20 23:55:55 Compilation successful. Indicator ID: A714C7B848D809A7F634AFBC727D8409
2013-02-20 23:55:53 Compiling TMAChannel_End_Point.java
2013-02-20 23:55:28 ----------
2013-02-20 23:55:28 Unreachable code
2013-02-20 23:55:28 ^^^^^^^^^^^^^^^^^^^
2013-02-20 23:55:28 if(true)return 0.0;}
2013-02-20 23:55:28 1. ERROR in F:\Documents and Settings\Carlos\Local Settings\JForex\Carlos\jfxide\tmp\compile\TMABand.java (at line 138)
2013-02-20 23:55:28 ----------
2013-02-20 23:55:28 Compiling TMABand.java
2013-02-20 23:32:47 ----------
2013-02-20 23:32:47 Unreachable code
2013-02-20 23:32:47 ^^^^^^^^^^^^^^^^^^^
2013-02-20 23:32:47 if(true)return 0.0;}
2013-02-20 23:32:47 1. ERROR in F:\Documents and Settings\Carlos\Local Settings\JForex\Carlos\jfxide\tmp\compile\IndicatorTMA.java (at line 111)
2013-02-20 23:32:47 ----------
2013-02-20 23:32:47 Compiling IndicatorTMA.java
2013-02-20 22:25:51 Connected.
2013-02-20 22:26:07 Your account has been blocked. Please contact Support Desk.
I will really appreciate if someone can help in fixing these errors.
I attached all java codes.
Thanking in advance.
Kind regards,
Carlos
=