[Build 137.1688 RC4] The source code of the function does not appear correctly



If I add a Custom Function :  (in ...\user\extend\Code\MetaTrader5\CustomFunctions)


double sqExtractLastDigits(int bars,int shift) {
   double value = 0;
   return value;
}


The source code of the function does not appear correctly 

Please see image 0 and file attached



Attachments
sqExtractLastDigits.mq5
(184 B)
image-0.png
(21.09 KiB)
  • Votes +1
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

E
#1

Emmanuel

08.07.2023 12:56

Task created

E
#2

Emmanuel

08.07.2023 12:57

Description changed:



If I add a Custom Function :  (in ...\user\extend\Code\MetaTrader5\CustomFunctions)


double sqExtractLastDigits(int bars,int shift) {
   double value = 0;
   return value;
}


The source code of the function does not appear correctly 

Please see image 0 and file attached



E
#3

Emmanuel

08.07.2023 12:57
Voted for this task.
E
#4

Emmanuel

08.07.2023 13:20
The problem appeared , as I added some comment in the snippets :


Convertir le nombre en chaîne de caractères

Obtenir la longueur de la chaîne


I suspect :  è or î  or è character could make this error .


once the error appeared, even if you delete the character  , it is too late, the file is corrupted and useless


TT
#5

Tamas

08.07.2023 13:42

Status changed from New to Waiting for information

Hello Emmanuel,  where did you add the comment ? What is wrong exactly ? Please provide more info what to do so I can help you with that.


Tamas

TT
#6

Tamas

08.07.2023 13:44
Maybe wrong encoding ? utf16 ? did you try utf8 ?
E
#7

Emmanuel

08.07.2023 14:30
When we look at the screen capture, we can see null character


I think this happen if I add  è or î  or è character , as a comment            // è or î  or è





E
#8

Emmanuel

08.07.2023 14:31
How do you delect utf 16 or utf8 ?
TT
#9

Tamas

08.07.2023 14:48

Status changed from Waiting for information to Fixed

Attachment image-0.png added

Attachment image-1.png added

Attachment image-2.undefined added

Attachment image-2.undefined deleted

Attachment sqExtractLastDigits.mq5 added

image-0.png
(235.71 KiB)
image-1.png
(142.23 KiB)
sqExtractLastDigits.mq5
(91 B)
Open the file file in your favorite text editor and change the encoding to utf8 no bom. I just did it and it works fine.
E
#10

Emmanuel

08.07.2023 15:48
This is awesome !!! I was wondering about the use of the different format utf, now I understand


Thank you very much Tamas for solving this !!!


Votes: +1

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please