dumping inputs values oninit

 

Hey folks


You know how in Strategy Mode MT will dump the values assigned to all inputs when it loads up(image attached)? I'm looking to get the same thing but when the EA is loaded on a chart(not in strategy mode). I basically want to be able to look at the experts logs and know which values were assigned to each input when it was first loaded. This would help me understand why the EA might be doing something in a certain way.


I can't find a way to achieve this and while searching the forum I came across a library[1] that uses chartsavetemplate() and parses the file to retrieve all inputs and their respective values but I'm not super keen one adding hundreds of lines of code just to dump these inputs once. It tried to keep my code clean and don't want to bloat it with extra stuff unless there is really no other way around it.


I even thought about storing the inputs and values on a global variable so later I could dump them all on onInit() but then I realized the last two lines of the following code aren't allowed in the global scope or whatever they call it. 

#define TO_STRING(v)  #v

string inputs[100];
string values[100];

input string inpName = "";

inputs[0] = TO_STRING(inpName);
values[0] = inpName;


Ideally, there is a flag somewhere to control the behavior and make MT dump all inputs as it does in strategy mode. If that doesn't exist I'm looking for a neat way to code this. any ideas are appreciated. 


1 - https://www.mql5.com/en/forum/191721#comment_5693578

 
Doesn't exist. You need to code it and there is no easy way to my knowledge.