Pine script pine脚本,带有多个指标EMA、卷和;布林格

Pine script pine脚本,带有多个指标EMA、卷和;布林格,pine-script,Pine Script,其中我用EMA、Vwap和Bolinger带放置了多个指示器。 现在我也想增加音量。但当我添加时,它将隐藏所有指示器。请看下面的脚本 // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // © makkanimation //@version=4 study("Vol in Base asset 20MA"

其中我用EMA、Vwap和Bolinger带放置了多个指示器。 现在我也想增加音量。但当我添加时,它将隐藏所有指示器。请看下面的脚本

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

//@version=4
study("Vol in Base asset 20MA", "", true, format.volume, overlay=true, scale=scale.none)

EMA1=input(21)
EMA2=input(55) 
EMA3=input(100)
EMA4=input(200)


exponential = input(true, title="Exponential MA")
src = close

ma21 = exponential ? ema(src, EMA1) : sma(src, EMA1)
ma55 = exponential ? ema(src, EMA2) : sma(src, EMA2)
ma100 = exponential ? ema(src, EMA3) : sma(src, EMA3)
ma200 = exponential ? ema(src, EMA4) : sma(src, EMA4) 

// VWAP
price = input(type=input.source, defval=hlc3, title="VWAP Source")
enable_vwap = input(true, title="Enable VWAP")
vwapResolution = input(title = "VWAP Resolution", defval = "", type=input.resolution)
vwapFunction = vwap(price)
vwapSecurity = security(syminfo.tickerid, vwapResolution, vwapFunction)

plot(ma21, color=color.new(color.green, 0), title="[E]MA21")
plot(ma55, color=color.new(color.red, 0), title="[E]MA55")
plot(ma100, color=color.new(color.orange, 0), title="[E]MA100")
plot(ma200, color=color.new(color.blue, 0), title="[E]MA200")
plot(enable_vwap ? vwapSecurity : na, title="VWAP", color=color.navy, linewidth=2, transp=0, editable=true) // All TimeFrames 

bollinger = input(false, title="Bolinger Band")
bolingerlength = input(20,"Length")
// Bollinger Bands
bsrc = input(close, title="Source")
mult = input(2.0, title="std dev", minval=0.001, maxval=50)
basis = sma(bsrc, bolingerlength)
dev = mult * stdev(bsrc, bolingerlength)
upper = basis + dev
lower = basis - dev
plot(bollinger ? basis: na, color=color.red, title="Bol Basic")
p1 = plot(bollinger ? upper: na, color=color.blue, title="Bol Upper")
p2 = plot(bollinger ? lower: na, color=color.blue, title="Bol Lower")
fill(p1, p2, title="Bol Background")


//Make the moving average user configurable
HIM1 = "1. Historical High"
HIM2 = "2. Highest in last..."
showMA = input(true)
scaleFactor = 100 / input(30, "% of vertical space used", step = 10, maxval = 100)
hiMethod = input(HIM2, "High point method", options = [HIM1, HIM2])
hiMethod2Len = input(400, "  2. Length", minval = 2, step = 100)

//Get volume for current bar and multiply with vwap
vInverse = volume * vwap

//Plot fiat volume.
plot(vInverse, color = color.orange, title="VolumeBTC", style=plot.style_columns, transp=30) //Originally: transp=65

//Plot 20 candle moving average (changable in settings)
plot(showMA ? sma(vInverse,20) : na, color = color.white, title="Volume MA", style=plot.style_area, transp=65)

//Plot high line to scale down the columns.
var histHi = 0.
histHi := max(histHi, nz(vInverse, histHi))
limit = hiMethod == HIM1 ? histHi : highest(vInverse, hiMethod2Len)
plot(limit * scaleFactor, "Historical High", #00000000)

请帮帮我。我想在一个地方展示一切。

你无法完成你想做的事情。尤其是
scale=scale.none
。你的BB将不匹配图表蜡烛,因为这一点,因为音量将建立脚本的规模范围,这将不会远程与你的蜡烛对齐。您需要将它们作为具有不同比例的单独脚本。BB/MA使用图表的刻度和另一个带有
scale.none
的脚本将音量放在图表底部