hammer candle

 

I want to write an EA that can detect a hammer candle at the highest point of 10 candles and open a position, but I couldn't get it to work, can someone help me?

  string entry="";
  
double HighestCandle;  
double High[];
ArraySetAsSeries(High, true);
CopyHigh(_Symbol,_Period,0,10,High);  
 HighestCandle=ArrayMaximum(High,0,10);

 MqlRates CurrentCandle[];
 ArraySetAsSeries(CurrentCandle,true);
 int copied=CopyRates(Symbol(),0,0,10,CurrentCandle);



if  (HighestCandle == CurrentCandle[0])
{
entry="true";
}
 
If you have searched here for hammer you would have found ~20 examples in the code base and ~20 in the article section - it would saved you a lot of time.
 
thank you very much 
Reason: