在Pine Script中创建了一个自定义的“音量”指示器,但是我无法将其固定在图表的底部。我希望它以与默认音量指示器相同的方式显示。
study("BTC Dollar Volume", overlay=true, precision=0, scale = scale.none)
showMA = input(title = "Show MA", type = bool, defval = false)
length = input(title = "MA Length", type = integer, defval = 20)
currentPrice = (open + close) / 2
currentVolume = volume
adjustedVolume = currentVolume * currentPrice
barColor = iff(close>close[2], green, iff(close<=close[2], red, gray))
plot(fixnan(adjustedVolume), style = columns, color = barColor, title="Volume")
plot(showMA?sma(adjustedVolume, length):na, color = maroon)
答案 0 :(得分:0)
很遗憾,无法用自定义音量指示器替换默认音量指示器。