Alert help....

 
I have code that sends an alert within an indicator once a condition has been met for the current bar. I am having trouble gettiing the alert to only send once. Also, the alert continues to send even though the condition should be false. Any help would be apreciated. Thanks in advance... here is a snippet of the code:

extern bool alertenable = true;
string msgString = "";
.
.
.//some code not shown...
.
int start()
{
mytime = Hour()*100+Seconds();
if (checkBars() && CheckProfit() && CheckTime() && CheckOpenOrders() && CheckMargin())
{
if (BuyConditionsMet())
{
OpenBuyOrder();
SendAlert();
}
if (SellconditionsMet())
{
OpenSellOrder();
SendAlert();
}
}
else checkForClose();
}
///////////////////////////
int SendAlert(string msgString)
{
if (alertenable) { Alert(msgString);}
}
/////////////////////////////
bool BuyConditionsMet()
{
double Macd0 = iMACD(NULL, 0,9,64,112,PRICE_CLOSE,MODE_MAIN,0);
double Macd1 = iMACD(NULL, 0,9,64,112,PRICE_CLOSE,MODE_MAIN,1);
if (Macd0 > 0 && Macd1 < 0) { return(1);}
else {return(0);}
}
/////////////////////////////
bool SellConditionsMet()
{
double Macd0 = iMACD(NULL, 0,9,64,112,PRICE_CLOSE,MODE_MAIN,0);
double Macd1 = iMACD(NULL, 0,9,64,112,PRICE_CLOSE,MODE_MAIN,1);
if (Macd0 < 0 && Macd1 > 0) { return(1);}
else {return(0);}
}
Reason: