MT5: the "Value" field in the Debug Tab displays "unknown identifier" for "input" type variables placed in the "Expression" field
I'd appreciate any help you may be able to provide. Thanks.
======================================
Here is the simplest of code that demonstrates the problem:
//+------------------------------------------------------------------+
//| Inputs |
//+------------------------------------------------------------------+
//--- inputs for expert
input string I_Tst_STR = "D-Test";
input double I_Tst_DBL = 10.23;
input int I_Tst_INT = 4;
int OnInit() {
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| "Tick" event handler function |
//+------------------------------------------------------------------+
void OnTick() {
string comment_STR = StringFormat("String= %s, Double= %0.2f, Integer= %d", I_Tst_STR, I_Tst_DBL, I_Tst_INT);
Comment(comment_STR);
}
==============================
The code runs fine, the comment is displayed on the chart, BUT the debug tab does NOT show the values of the three input variables. See the 2nd screenshot below.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I'd appreciate any help you may be able to provide. Thanks.
======================================
Here is the simplest of code that demonstrates the problem:
//+------------------------------------------------------------------+
//| Inputs |
//+------------------------------------------------------------------+
//--- inputs for expert
input string I_Tst_STR = "D-Test";
input double I_Tst_DBL = 10.23;
input int I_Tst_INT = 4;
int OnInit() {
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| "Tick" event handler function |
//+------------------------------------------------------------------+
void OnTick() {
string comment_STR = StringFormat("String= %s, Double= %0.2f, Integer= %d", I_Tst_STR, I_Tst_DBL, I_Tst_INT);
Comment(comment_STR);
}
==============================
The code runs fine, the comment is displayed on the chart, BUT the debug tab does NOT show the values of the three input variables. See the 2nd screenshot below.