Try using
GlobalVariableSet("VariableName",VariableValue) in your EA or indicator
and then use
GlobalVariableGet("variableName") in your other indicator.
In your dynamic program set your variable name and value then read that value in your other indicator.
EXAMPLE:-
Program 1 Does this:
GlobalVariableSet("CCIMA_CCIPeriod"+Period(),CCIPeriod);
GlobalVariableSet("CCI_MAUpperLevel"+Period(),CCIUpperLevel);
GlobalVariableSet("CCI_MALowerLevel"+Period(),CCIlowerLevel);
Program 2 does this:
CCIPeriod = GlobalVariableGet("CCIMA_CCIPeriod"+Period());
CCIUpperLevel = GlobalVariableGet("CCI_MAUpperLevel"+Period());
CCILowerLevel = GlobalVariableGet("CCI_MALowerLevel"+Period());
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Let's say I have a chart indicator on the screen like a MACD indicator.
Instead of changing the indicator parameters manually from the screen, how is this done from MQL source code?
I don't really NEED the visual indicator. For perfections' sake; however, I just want the visual indicator on the chart to accurately reflect what I have in my
code. My indicator parameters are dynamic. Therefore, changing the parameters manually would be burdensome.
Again, how is this done automatically from the source code?
Do I have to use a custom indicator so that the parameters can dynamically be changed through the terminal global variables?
Is there a simpler solution?