Comments Visible Inputs Dialog Box

 

For some reason the comments in my code are appearing in my Input dialog box in the variable column. (Build 646) eg

input string MMValues_S         = "<===== Money Managment Settings =====>";
input bool   dynamicLotSize_S   = true;  // Enable for compounding lot sizes
input string Info1_S            = " Equity Percent per trade if not compounding Risk";
input double fixedRisk_S        = 0.6;   // Percentage of bankroll to risk per trade
input string Info2_S            = " Enter the increment rate when compounding the risk 0.1 or 0.2";
input double riskIncrement_S    = 0.1;   // Increases the Risk by this amount when compounding risk
input string Info3_S            = " Enter the start of risk when compounding the risk";

And it appears

Input Dialog Box


If I delete the comments the correct variables are displayed. How do I make sure the comments are not seen? (other than deleting them) I find this puzzling, I thought comments

were supposed to be ignored.

input string MMValues_S         = "<===== Money Managment Settings =====>";
input bool   dynamicLotSize_S   = true; 
input string Info1_S            = " Equity Percent per trade if not compounding Risk";
input double fixedRisk_S        = 0.6; 
input string Info2_S            = " Enter the increment rate when compounding the risk 0.1 or 0.2";
input double riskIncrement_S    = 0.1;  
input string Info3_S            = " Enter the start of risk when compounding the risk";

Comments deleted and then it's ok.


 

It's designed that way:

It is possible to set another way to display names of input parameters in the Inputs tab. To do this, a string comment is used, which should be located after the description of an input parameter in the same line.
Thus, names more understandable for a user can be matched to input parameters.

https://docs.mql4.com/basis/variables/inputvariables

 

Thx for the reply, but that sucks.

They should've used a different format, this means I can't have my own comments for my eyes only in the inputs zone.

 

The only way around it that I know of is to put your comment on the next line down.

 
honest_knave:

The only way around it that I know of is to put your comment on the next line down.

 


Yea, that works, but it's messy, thx for the replies bud
 
You're welcome
 
My questions is the contrary Im coomenting my inputs and those comments doesnt appear later when the EA is added to a chart, they variables name appear. Anyone help?
 
Donex:

Thx for the reply, but that sucks.

They should've used a different format, this means I can't have my own comments for my eyes only in the inputs zone.

"extern" will not display the comment, "input" will display them
 
GumRai:
"extern" will not display the comment, "input" will display them

Nope.

Comment is displayed if #property strict is use, with both extern and input.

If #property strict is NOT used, variable name is displayed, with both extern and input.

 
angevoyageur:

Nope.

Comment is displayed if #property strict is use, with both extern and input.

If #property strict is NOT used, variable name is displayed, with both extern and input.

Thank you! This is what I needed :)

 

Use double semicolons after your setting's initial value:

#property strict

extern double  Take_Profit  = 10.0;;  // hard TP in 4 digit pips
extern double  Stop_Loss    = 10.0;;  // hard SL in 4 digit pips

This way comments will not replace external variable names in settings window. (because semicolon means "new line" and comments for replacing variable names is working in the same line only)
I hope this helps you all.

I have also pulled some of my hair because of this stupid thing. Comments are for programmers. For users there is (should be) an instruction manual in a separate pdf or txt or anything, not in the settings window. Blahhh.... :P