Attaching indicator in making EA

 
Hi to everyone, I am trying making an EA and I want to use an indicator which displays arrows on the chart. But as one arrow appear, it Opens too may trades. I want it Open only one trade. What code I make so that it will open a single trade every arrow appears? God Bless us all.