Candle Alert

 
I was wondering if someone could program an alert that indicates when the highest point in an up trend is a bearish candle and the lowest point in a down trend is a bullish candle. Sorry I don't know how to copy screen directly from chart but I have attached a copy from Word