#How to make each candle stick appears $value gain + % gain with the Open price and Close price?
input showbubble = yes;
input bubblemover = 0;#Hint bubblemover: Move sideways
def o = Round(open);
def c = Round(close);
def b = bubblemover;
def b1 = b + 1;
def last = IsNaN(c[b]) and !IsNaN(c[b1]);
AddChartBubble(
#Places bubble in expansion area by number of bars, determined by bubblemover, past last bar
showbubble and last[b],
#Bubble will appear at this price level
low[b1],
#Stack Open/Close prices
(if o[b1] > c[b1]
then "O: " + AsDollars(o[b1]) + "\n C: " + AsDollars(c[b1])
else "C: " + AsDollars(c[b1]) + "\nO: " + AsDollars(o[b1])) + "\n"
#Dollar change between Open/Close
+ AsDollars((c[b1] - o[b1])) + "\n"
#Percent changee between Open/Close
+ AsPercent((c[b1] - o[b1]) / Min(c[b1], o[b1])),
#Bubble color
if o[b1] > c[b1]
then Color.LIGHT_RED
else Color.LIGHT_GREEN);
#