Hello dear gurus. I am learning the MQL5 language, writing an Expert Advisor, and at a certain stage the question arose, is it possible to make some external variables that are visible only to the developer? I understand that this can be done through internal variables and therefore the situation is not critical, but I would like more convenience and I wonder if it is possible to implement it) Tried through conditions, but they don’t work in the scope of variable declarations.
individual expert advisor settings are visible only to the developer? Is this possible?
Share
prostotrader
#property copyright "Copyright 2020, prostotrader"
#property link "
#property version "1.00"
#define DEBUG
//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
#ifdef DEBUG
//Private data
#else
//
#endif
//---
return(INIT_SUCCEEDED);
}
viktorternovskiy
okay, thanks. apparently the best option for me is still internal variables and checking for the presence of a certain file or record in the file, so to speak, to determine the developer and display additional technical data and statistics on the graph. this is a developer mode advanced)
dali
1. Global variables. If a “secret variable” is present, it is read.
2. Reading values from the file.
3. If it is sufficient that the variables cannot be used, although visible, you can add the Enable variable with a numeric password.
…