Combine an Indicator with Expert advisor?

 

Hi Traders & Coders,

I am wondering how can i Combine an Indicator with Expert advisor?

Thanks

 

that's very easy, you just have to use a function called iCustom

 
Don't try do that. There are no buffers, no IndicatorCounted() or prev_calculated. No way to know if older bars have changed or been added (history update.)

Just get the value of the indicator into the EA and do what you want with it. You should encapsulate your iCustom calls to make your code self-documenting.
 
trvago:

Hi Traders & Coders,

I am wondering how can i Combine an Indicator with Expert advisor?

Thanks


You can call it with iCustom and have it compiled into the EA by including into your project with #resource, then you will have only one ex* file instead of two. 

Reason: