The issue here is that in java you cannot use
switch with a boolean parameter.
The original mq4 code reads as:
...
bool uptrend;
...
switch(uptrend)
{
case true:
...
break;
case false:
...
break;
This is not valid in java.
There are 2 solutions:
1) Support must do something with this, that in such situation the generated java code is compilable, not just a raw copy of the mq4 stuff.
2) You must modify the mq4 code and try not to use a boolean in the switch statement.
As a workaround, you can give it a try to compile and test the attached java source, that is a modified version of the generated one.