2

在 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)
4

1 回答 1

-1

不幸的是,没有办法用自定义音量指示器替换默认音量指示器。

于 2018-12-12T14:12:42.167 回答