If you want to share variables between different indicators and EAs within the same terminal, use Global Variables of the Terminal (or read/write them to file).
- docs.mql4.com
If you want to share variables between different indicators and EAs within the same terminal, use Global Variables of the Terminal (or read/write them to file).
1) GlobalVariables seems somehow better to me, but not solution (but i should have specific variable names for each indicator session, not to mix with each other... )
for example, i have global condition, named "IsBuySignalBar" , then this condition will be read from all indicators, however, this condition is formed only with specific parameters, for different sybmols.
2) about "read/write" method: I have tens of variables, which are executed on every bar and read/write is not a preferred way, however, is there is no other way, ok. For ticks, it wont be good solution.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Is it possible to get variables like this?:
double NewStopLevel = GetVariable("OldStopLevel") + 12; //because "OldStopLevel is outside of this indicator, and I'm trying to build a way to call that.
i.e. something like this?
string GetVariable(string variable_name){
return $variable_name;
}