integrating a second custom indicator

To add comments, please log in or register
Michael Behr
Michael Behr  

Hello to the experts,

I've been using the following concept in MT4, but in MT5 there must be something more to implement to make it work:

a part within the MT 5 custom indicator is

while (i<rates_total)


//         code......



Now a second (external) custom indicator is to be used within that indicator 

in the declaration part of the main indicator (to address the second one) is:

double      MA[];                // array for the indicator iMA

int         MA_handle;           // handle of the indicator iMA


int the  init part the usual:

MA_handle=iCustom(_Symbol, 0, "Examples\\CustomOne",parameters....); 


in the  OnCalculate part as usual:



Now, when checking the value of the external indicator outside of the "while part" above by using

Comment(MA[0]); everything is fine;

but when putting Comment(MA[0]); within the "while part" there are no correct values, even when using the cycle variable "i" by implementing

Comment(MA[i]); there is no correct effect.

So is this  "obstacle" caused  by not using the Comment function or the variable(s) correctly within the MT5 cycle, althoug "i" is regularly used in that cycle?

 For any hints how to correct this, thanks in advance of course!

Alexander Fedosov
Alexander Fedosov  

Part of code when use Comment() 

Please use SRC Code 

To add comments, please log in or register