Indicators: Doji Arrows

Doji Arrows:

The indicator finds Doji candlesticks and highlights them on the chart.

Author: John Smith

Can you make for buy and sell engulfing arrows

The code is false :

   if ((Close[i+2]==Open[i+2]) &&
      (Close[i+1]>High[i+2]) )
         uptrend=true; 
if ((Close[i+2]==Open[i+2]) this never occur