Can you help me with the indicator?

 

Hello


I want to turn the Engulfing indicator into an expert, but there is a problem.


The problem here is: SetIndexEmptyValue (0,0.0);

In Expert Buffer the first is equal to 0 and the second buffer is equal to EmptyValue.


That way you can't tell Expert when to buy and sell.

Problem shown in photos.
Help me please
thank you.

Files:
 
Roozbeh Moradnia: I want to turn the Engulfing indicator into an expert, but there is a problem.
Don't try to 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(s) of the indicator(s) into the EA (using iCustom) and do what you want with it.
You should encapsulate your iCustom calls to make your code self-documenting.
          Detailed explanation of iCustom - MQL4 programming forum