To pass numerical values between indicator and EA you can use GlobalVariables
Indicator would use GlobalVariableSet(), and EA would use GlobalVariableGet().
You can find Objects on a chart by name or by a property of the object.
for(i = ObjectsTotal()-1; i >= 0; i--){
string name = ObjectName(i);
... here are more decisions, depending on what you are trying to find...
... like if(ObjectType(name) == ... )
if(ObjectGet(name, OBJPROP_COLOR) == ... )
... and so on until you find or don't find what you are looking for
To pass numerical values between indicator and EA you can use GlobalVariables
Indicator would use GlobalVariableSet(), and EA would use GlobalVariableGet().
You can find Objects on a chart by name or by a property of the object.
for(i = ObjectsTotal()-1; i >= 0; i--){
string name = ObjectName(i);
... here are more decisions, depending on what you are trying to find...
... like if(ObjectType(name) == ... )
if(ObjectGet(name, OBJPROP_COLOR) == ... )
... and so on until you find or don't find what you are looking for
thanks so much.... I have never used GlobalVariables and FORGOT THEY EXIST. . I amaze myself sometimes with my stupidity..LOL
thanks again
David
To pass numerical values between indicator and EA you can use GlobalVariables
Indicator would use GlobalVariableSet(), and EA would use GlobalVariableGet().
You can find Objects on a chart by name or by a property of the object.
for(i = ObjectsTotal()-1; i >= 0; i--){
string name = ObjectName(i);
... here are more decisions, depending on what you are trying to find...
... like if(ObjectType(name) == ... )
if(ObjectGet(name, OBJPROP_COLOR) == ... )
... and so on until you find or don't find what you are looking for
Is it better to pass GlobalVariables from an Indicator to an EA or should the EA include the Indicator - calling the Indicator via iCustom() requires different parameters to be passed if the Indicator output consists of more than one value. Is that right?
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- 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 know you can put the indicator code inside the each, but the custom indicator calls another custom indicator, too much for my little brain...Is there another way to do this?
Can this be done?
thanks in advance...
d