EA for HL difference

 

I am new to forex and MQL4, I am looking for an EA not to auto trade but just give me an audible alert with message box. The condition is simple just give an alert when the D1 chart H and L is different by X value of pips. Does anyone have it? Or some pointers on how to code it.

 
int X = 100;
 
double H = iHigh(NULL, PERIOD_D1, 0);
double L = iLow(NULL, PERIOD_D1, 0);
 
if (H-L > X*Point)
{
  PlaySound("alert.wav");
  Alert("!!!");
}
Reason: