Reply

SQ 3.8.1 CustomComment not Displaying in MT4

4 replies

AC1962

Customer, bbp_participant, community, sq-ultimate, 97 replies.

Visit profile

6 years ago #117885

Hi Mark

 

 

Please can you check and advise why the attached strategy (I have attached both *.str & *.mq4 files) does not display its CustomComment parameter value [20170708d_Strategy 0.169721a_01] in the MT4 Comment field. What do I need to do, for this CustomComment parameter value to be displayed in MT4?

 

All previous SQ 3.8.1 generated strategies, that I’ve tested in MT4, have displayed their CustomComment parameter value in MT4 Comment field, without a problem. However this has now failed to happen with my 2x most recent test strategies, generated by SQ 3.8.1.

 

See attached screenshot of MT4 Terminal\Trade view, where the Comment field is empty for 3x orders generated by my 2x latest strategies. While, you can also see that all older strategies display their CustomComment without a problem.

 

Thanks

 

AC 1962

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

6 years ago #145100

Hello,

 

strange, I have checked the code and tested in MT4 and it also does not display comments for me while other EAs do. The code correctly contains the comment with the strategy name but for some reason it won’t show up. We will need to test this more

0

AC1962

Customer, bbp_participant, community, sq-ultimate, 97 replies.

Visit profile

6 years ago #145109

Hi Tomas

 

Thanks for your quick initial response. I look forward to follow-up resolve.

 

AC1962

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

6 years ago #145157

I found the problem, it was concatenation of strings in MQL. 

I your .mq4 file on line 611 there is a line:    

    string comment = “SQ: “+CustomComment;

 

correct it to:    

    string comment = CustomComment;

 

and it will start working. Also, to fix it for all the strategies generated in SQ, please go to folder {Your SQ installation}/code/Mql_MT4, open file MT4Functions.inc and there around line 413 you should make the same change.

This will fix it in all  the strategies that will be saved to .mq4 in SQ.

Mark
StrategyQuant architect

0

AC1962

Customer, bbp_participant, community, sq-ultimate, 97 replies.

Visit profile

6 years ago #145159

Hi Mark

 

Thanks, great! I’ve made your recommended code change and the comment has appeared upon replacement of old affected orders.

 

In checking my last 4x strategy files. passed through for MT4 testing, only the last 2x were affected. 

 

However, what I do not understand, is what made this suddenly happen. I have never previously opened the ‘MT4Functions.inc‘ file in an editor, let alone edit its content. I am no code writer and would never play around with such a file, without explicit guidance instruction to do so. Do you have any idea what may have caused this to happen?

 

Thanks again

AC1962

0

Viewing 4 replies - 1 through 4 (of 4 total)