TradingView pine 脚本中的绘图名称/标签
Plot name / label in TradingView pine script
我怎样才能给情节一个name/label? (截图中ses红框)
study(title="Average True Range Channels", shorttitle="ATRC", overlay=true)
slowEMAdays = input(22, minval=1, title="Days for EMA", type=integer)
slowEMA = (ema(close, slowEMAdays))
atrBandDays = input(13, minval=1, title="Days for ATR", type=integer)
atrBand = atr(atrBandDays)
atrPlus1 = slowEMA + atrBand
atrPlus2 = slowEMA + atrBand*2
atrPlus3 = slowEMA + atrBand*3
atrMinus1 = slowEMA - atrBand
atrMinus2 = slowEMA - atrBand*2
atrMinus3 = slowEMA - atrBand*3
plot(slowEMA, color=black, linewidth=2)
plot(atrPlus1, color=green)
plot(atrPlus2, color=orange)
plot(atrPlus3, color=red)
plot(atrMinus1, color=green)
plot(atrMinus2, color=orange)
plot(atrMinus3, color=red)
我想为 6 个地块中的一些地块添加警报,但是在添加警报时我只能看到 6 个具有相同名称(“地块”)的地块,因此我无法轻易将它们彼此区分开来:)
最好的,
拉斯穆斯
转换为 v4 并标记了绘图。
//@version=4
study(title="Average True Range Channels", shorttitle="ATRC", overlay=true)
slowEMAdays = input(22, "Days for EMA", type=input.integer, minval=1)
atrBandDays = input(13, "Days for ATR", type=input.integer, minval=1)
slowEMA = ema(close, slowEMAdays)
atrBand = atr(atrBandDays)
atrPlus1 = slowEMA + atrBand
atrPlus2 = slowEMA + atrBand * 2
atrPlus3 = slowEMA + atrBand * 3
atrMinus1 = slowEMA - atrBand
atrMinus2 = slowEMA - atrBand * 2
atrMinus3 = slowEMA - atrBand * 3
plot(slowEMA, "slowEMA", color=color.black, linewidth=2)
plot(atrPlus1, "atrPlus1", color=color.green)
plot(atrPlus2, "atrPlus2", color=color.orange)
plot(atrPlus3, "atrPlus3", color=color.red)
plot(atrMinus1, "atrMinus1", color=color.green)
plot(atrMinus2, "atrMinus2", color=color.orange)
plot(atrMinus3, "atrMinus3", color=color.red)
我怎样才能给情节一个name/label? (截图中ses红框)
study(title="Average True Range Channels", shorttitle="ATRC", overlay=true)
slowEMAdays = input(22, minval=1, title="Days for EMA", type=integer)
slowEMA = (ema(close, slowEMAdays))
atrBandDays = input(13, minval=1, title="Days for ATR", type=integer)
atrBand = atr(atrBandDays)
atrPlus1 = slowEMA + atrBand
atrPlus2 = slowEMA + atrBand*2
atrPlus3 = slowEMA + atrBand*3
atrMinus1 = slowEMA - atrBand
atrMinus2 = slowEMA - atrBand*2
atrMinus3 = slowEMA - atrBand*3
plot(slowEMA, color=black, linewidth=2)
plot(atrPlus1, color=green)
plot(atrPlus2, color=orange)
plot(atrPlus3, color=red)
plot(atrMinus1, color=green)
plot(atrMinus2, color=orange)
plot(atrMinus3, color=red)
我想为 6 个地块中的一些地块添加警报,但是在添加警报时我只能看到 6 个具有相同名称(“地块”)的地块,因此我无法轻易将它们彼此区分开来:)
最好的, 拉斯穆斯
转换为 v4 并标记了绘图。
//@version=4
study(title="Average True Range Channels", shorttitle="ATRC", overlay=true)
slowEMAdays = input(22, "Days for EMA", type=input.integer, minval=1)
atrBandDays = input(13, "Days for ATR", type=input.integer, minval=1)
slowEMA = ema(close, slowEMAdays)
atrBand = atr(atrBandDays)
atrPlus1 = slowEMA + atrBand
atrPlus2 = slowEMA + atrBand * 2
atrPlus3 = slowEMA + atrBand * 3
atrMinus1 = slowEMA - atrBand
atrMinus2 = slowEMA - atrBand * 2
atrMinus3 = slowEMA - atrBand * 3
plot(slowEMA, "slowEMA", color=color.black, linewidth=2)
plot(atrPlus1, "atrPlus1", color=color.green)
plot(atrPlus2, "atrPlus2", color=color.orange)
plot(atrPlus3, "atrPlus3", color=color.red)
plot(atrMinus1, "atrMinus1", color=color.green)
plot(atrMinus2, "atrMinus2", color=color.orange)
plot(atrMinus3, "atrMinus3", color=color.red)