Are you still getting repeated emails for same timings?
Anant had given syntax as
AlertIf( Buy, "Email", "BUY triggered for " + Name() + " at price Rs."+WriteVal(C,5.2), 1,1+2 );
Kindly modify this as
AlertIf( Buy, "Email", "BUY triggered for " + Name() + " at price Rs."+WriteVal(C,5.2), 1);
With this above problem will get solved.
Regards