Several MQ5 syntax errors

Hello,


These are the most frequently occured MQ5 syntax errors.
Please check these codes.




1. when calling iCustom(), the indicator name must be passed using double quotes "...", but several indicators are called using single quotes '....'
    There are lots of syntax errors like this.


    e.g.) iCustom(correctSymbol(Subchart2Symbol), TFMigrate(Subchart2Timeframe), 'SqPivots', 6, 8, 0))





2. At the some part of code, Current symbol name is used directly, so it is hard to test it with other symbol without code modification.
    and it has no double quotes too.
    Also, I cannot understand what "__BR__" is.. 


    e.g.)
   ArrayResize(indys, ArraySize(indys) + 1, 10);
   indys[7].name = "ADX_2_35_1";
   indys[7].handle = (sqShootingStar(NULL, 12)__BR__&& sqPiercingLine(USDJPY, 9));
   indys[7].bufferIndex = 1;
   


3. Insufficient parameter counts.


    e.g.)  sqDoji("USDJPY"))




4. sqGetIndicatorValue function without double quotes in the first parameter.
    And IndyCrossesBelow function without double quotes in the parameters.


    e.g.)
   ArrayResize(indys, ArraySize(indys) + 1, 10);
   indys[12].name = "BollingerBands_2_5_60_2.40_0";
   indys[12].handle = (((sqGetIndicatorValue(StdDev_0_4_98_0, 18) > sqGetIndicatorValue(Momentum_0_6_43_0, 20))__BR__&& (sqGetIndicatorValue(SMMA_1_1_25_0, 6) > sqGetIndicatorValue(BollingerBands_1_4_50_1.60_0, 8)))__BR__&& indyCrossesBelow(EMA_1_4_48_0, Ichimoku_1_41_10_11_3, 1, 1));
   indys[12].bufferIndex = 0;






 There are so many bugs other than this report in the MQ5 code that SQ4 generates.
 Please review all of its snippets so as to work fully functional.
 Thank you very much.




Malim

Attachments
No attachments
  • Votes 0
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

k
#1

rnd_7378f217b90kkk

30.09.2017 23:03

Task created

TB
#2

Tomas Brynda

11.10.2017 09:15

Status changed from New to Fixed

k
#3

rnd_7378f217b90kkk

16.10.2017 13:46
No, It is not fixed at all.

Lots of "__BR__" problems, lots of single quotes, lots of other problems are still exists.


Please make more than 100 strategies ramdomly, and try to compile it under MT5 environment.

Maybe, there will be more than 100 compile errors.



Votes: 0

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please