def bodyheight = if BodyHeight() > (high - low) * .5 then 1 else 0;
def breakup = if bodyheight and !bodyheight[1] and
close[1] > open[1] and close > open and
low > low[1] and high > high[1]
then 1 else 0;
def breakdn = if bodyheight and !bodyheight[1] and
close[1] < open[1] and close < open and
low < low[1] and high < high[1]
then 1 else 0;
AddChartBubble(bodyheight, high,
if breakup
then "UP\n *"
else if breakdn
then "DN\n *"
else "*",
if breakup
then Color.GREEN
else if breakdn
then Color.RED else Color.YELLOW);
AddChartBubble(!bodyheight, high * 1.001, AsText(high), Color.WHITE);
AddChartBubble(!bodyheight, low * .999, AsText(low), Color.WHITE, no);