On this script
maType = input.string(title='EMA ou HMA', defval='EMA', options=['EMA', 'HMA'])
len = input(title='EMA 200', defval=200)
src = input(title='Source', defval=close)
ma(type, src, len) =>
float result = 0
if type == 'EMA' // Exponential
result := ta.ema(src, len)
result
if type == 'HMA' // Hull
result := ta.wma(2 * ta.wma(src, len / 2) - ta.wma(src, len), math.round(math.sqrt(len)))
result
result
emaHigh = ma(maType, high, len)
emaLow = ma(maType, low, len)
BBMC = ma(maType, close, len)
useTrueRange = input(true)
multy = input.float(0.2, step=0.05, title='Base Channel Multiplier')
Keltma = ma(maType, src, len)
range_1 = useTrueRange ? ta.tr : high - low
rangema = ta.ema(range_1, len)
upperk = Keltma + rangema * multy
lowerk = Keltma - rangema * multy
Hlv = int(na)
Hlv := close > emaHigh ? 1 : close < emaLow ? -1 : Hlv[1]
sslDown = Hlv < 0 ? emaHigh : emaLow
color_bar = close > upperk ? #00c3ff : close < lowerk ? #ff0062 : color.gray
color_ssl1 = close > sslDown ? #00c3ff : close < sslDown ? #ff0062 : na
p1 = plot(show_EMA_200 ? BBMC : na, color=color_bar, linewidth=1, title='EMA 200')
I want to change the plot to a line with "block"
So i try with this.
plot(BBMC, style=plot.style_columns, histbase=0, color=color_bar, linewidth=1, title='EMA 200')
The "base is :
plot(10, style=plot.style_columns, histbase=0, color=color_bar, linewidth=1, title='EMA 200')
But don't work because i need to add BBMC.
How can i do this please ?
Thanks