[127] sqLogToFile is not accepting variables during mq5/pseudo code generation

When  I try to send to file a few objects per row i.e. strings and results of variables it is not converting them properly example:



Code put in Algowizard:


LogToFile:
Filename: EURUSD_API_DD_log.txt
Message: Long,+CandleCounter,+MaxDD_Lp



// CandleCounter is integer
// MAxDD_Lp is double


How it looks like after mq5 code generation:


 sqLogToFile("EURUSD_API_DD_log.txt""Long,+CandleCounter,+MaxDD_Lp");



How it should look like to save data to the file properly :


 sqLogToFile("EURUSD_API_DD_log.txt","Long",+CandleCounter,+MaxDD_Lp);





I suppose there must be some issue with conversion process. It does not recognize commas ( ",").

sqLogToFile function definition looks ok:


void sqLogToFile(string fileName, string st1, string st2="", string s3="", string s4="", string s5="", string s6="", string s7="", string s8="", string s9="", string s10="", string s11="", string s12="" ) {

Attachments
No attachments
  • Votes +1
  • Project AlgoWizard
  • Type Bug
  • Status Fixed
  • Priority Normal

History

p
#1

pitro

27.05.2020 19:59

Task created

p
#2

pitro

27.05.2020 19:59

Subject changed from sqLogToFile is not accepting variables during mq5/pseudo code generation to [127] sqLogToFile is not accepting variables during mq5/pseudo code generation

Type changed from Feature to Bug

Dw
#3

Diwi

22.06.2020 12:46
Voted for this task.
TB
#4

Tomas Brynda

31.03.2022 10:38

Status changed from New to Fixed

Hi Pitro,

Log To File block is supposed to be saving string logs by default.

If you want to save your variables values, try to input following text into Message field:

Long",CandleCounter,MaxDD_Lp,"


Best regards,

Tomas 


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