To Rosh, I need you and others help in this EA coding

 
Files:
 
It would be more productive if you mentioned specific questions/problems...
 

Hello gordon,

I think I posted original problem twice but not sure why nobody can't see it :)

The thing is there are two variables named min,max in ZZ_Repaint.mq4 indicator.

min = lowest point of lastest zigzag down

max = highest point of latest zigzag up

I need both these values on my EA but don't know how to attain them from indicator or embed whole indicator code to EA

If you have any idea on that then pls share with me

BIG THANKS mates !!!

 
Well, I can't find those posts... Anyway, you need to research iCustom().
 

Thank Gordon for your quick reply.

But it seems iCustom() only work with buffer.

min, max variables on ZZ_Repaint indicator are only values returned after a complex calculation processes.

How can we attain such values from indicator except buffer to an expert advisor??

 
InvestDad:

[...] min, max variables on ZZ_Repaint indicator are only values returned after a complex calculation processes.

How can we attain such values from indicator except buffer to an expert advisor??

The easy solution would be to use Global Variables to communicate this information to the EA. Of course in that case the indicator would have to be 'attached' in order for this to work.

A more complex solution would be to embed the indicator in the EA; this is a good starting point if u want to do that: https://www.mql5.com/en/articles/1456, https://www.mql5.com/en/articles/1457.

 
gordon:

The easy solution would be to use Global Variables to communicate this information to the EA. Of course in that case the indicator would have to be 'attached' in order for this to work.

A more complex solution would be to embed the indicator in the EA; this is a good starting point if u want to do that: https://www.mql5.com/en/articles/1456, https://www.mql5.com/en/articles/1457.


Thank so much Gordon,

I think I can work now with functions related to Global Variables as you suggested

:)

Reason: