Is it possible to print on the top or buttom of each candle the value like the % ? Like this one (just the %)
Asked
Active
Viewed 307 times
1
-
Never used PineScript, but I guess this might be a starting point: https://stackoverflow.com/questions/65756058/display-indicator-value-without-plotting-anything Good luck! – Nicholas Obert Aug 20 '22 at 06:14
-
Thnaks for the link but not this ;) – chprot Aug 21 '22 at 05:41
-
@chprot. Please post the error as text, not an image. – toyota Supra Aug 21 '22 at 14:55
1 Answers
2
Calculate the price change in percentage then use the label.new()
function to create your labels.
//@version=5
indicator("My script", overlay=true, max_labels_count=500)
per = ((close-close[1]) / close[1]) * 100
per_s = str.format("{0,number,#.##}", per)
label.new(bar_index, high, per_s)

vitruvius
- 15,740
- 3
- 16
- 26