Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
604 views
in Technique[技术] by (71.8m points)

pine script - Volume value label is not shown on vertical volume's value bar

I am trying to create simple volume bar chart in trading view pine editor. but the today's market's value(it also called price line) of volume(last bar) is not shown in the right side bar ,normally as like as red market price label on price bar. In its settings, in style tab, there is a switch for turning on price line, but it does not work too and only show the price's horizontal line, not its value label on side bar. After showing it, I also need to change its style and color based on some conditions. I upload the sample image, I mean volume value label as like as red market price label in top window(candle stick chart) I would appreciate if anyone can help me to solve it.

enter image description here

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// ? reza_najafi

//@version=4
//Main volume bar chart
study(title="IV", format=format.volume)
plot(volume, color= color.green,style=plot.style_columns, title="Volume bar's color")
hline(0, title='Zero line', color=color.gray, linestyle=hline.style_dashed, linewidth=1)

question from:https://stackoverflow.com/questions/65940813/volume-value-label-is-not-shown-on-vertical-volumes-value-bar

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can show the line with trackprice=true, but I'm not sure if you can add a label.

//@version=4
//Main volume bar chart
study(title="IV", format=format.volume)

plot(volume, color= color.green,style=plot.style_columns, title="Volume bar's color", trackprice=true)
hline(0, title='Zero line', color=color.gray, linestyle=hline.style_dashed, linewidth=1)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...