Can someone help me correct this thinkscript code syntax? The syntax error is in red.
# Safe string conversion with NumberFormat (FIXED ERROR)
def pctStr = AsText(Round(devPct, 1), NumberFormat.TWO_DECIMAL_PLACES);
def ptsStr = AsText(Round(distFromMid, 2), NumberFormat.TWO_DECIMAL_PLACES);
AddChartBubble(
showLabel && firstClose > Mid,
ORHigh + (ORHigh - ORLow) * 0.06,
pctStr + "% (" + ptsStr + " pts)",
Color.CYAN,
yes
);
AddChartBubble(
showLabel && firstClose <= Mid,
ORLow - (ORHigh - ORLow) * 0.06,
pctStr + "% (" + ptsStr + " pts)",
Color.MAGENTA,
no
);
# Safe string conversion with NumberFormat (FIXED ERROR)
def pctStr = AsText(Round(devPct, 1), NumberFormat.TWO_DECIMAL_PLACES);
def ptsStr = AsText(Round(distFromMid, 2), NumberFormat.TWO_DECIMAL_PLACES);
AddChartBubble(
showLabel && firstClose > Mid,
ORHigh + (ORHigh - ORLow) * 0.06,
pctStr + "% (" + ptsStr + " pts)",
Color.CYAN,
yes
);
AddChartBubble(
showLabel && firstClose <= Mid,
ORLow - (ORHigh - ORLow) * 0.06,
pctStr + "% (" + ptsStr + " pts)",
Color.MAGENTA,
no
);