叠加是真实的,但我的指标在单独的图表上
Overlay is true but my indicator on seperated chart
我已经制定了一个策略并将其转换为一个指标(以便轻松地将其与机器人集成),但即使我的叠加设置为 true,该指标也在一个单独的图表上,我看不到 tp/sl在那张小图表上很容易画线。我该如何解决?
indicator("My Strategy on Study", overlay=true)
...
plot(pacL, color=color.blue, linewidth=1, title="High PAC EMA", transp=0)
plot(pacU, color=color.purple, linewidth=1, title="Low PAC EMA", transp=0)
plot(pacC, color=color.red, linewidth=2, title="Close PAC EMA", transp=0)
...
plotshape(longSLhit, style=shape.labelup, location=location.belowbar, color=color.gray, size=size.tiny, title="Long SL", text=" Long SL", textcolor=color.white)
plotshape(shortSLhit, style=shape.labeldown, location=location.abovebar, color=color.gray, size=size.tiny, title="Short SL", text=" Short SL", textcolor=color.white)
plotshape(longTPhit, style=shape.labeldown, location=location.abovebar, color=color.purple, size=size.tiny, title="Long TP", text="Long TP", textcolor=color.white)
plotshape(shortTPhit, style=shape.labelup, location=location.belowbar, color=color.purple, size=size.tiny, title="Short TP", text="Short TP", textcolor=color.white)
...
plot(long_short==1 ? longStop : na, style=plot.style_linebr, color=color.red, linewidth=1, title="Long Fixed SL")
plot(long_short==-1 ? shortStop : na, style=plot.style_linebr, color=color.red, linewidth=1, title="Short Fixed SL")
plot(long_short==1 ? longTake : na, style=plot.style_linebr, color=color.green, linewidth=1, title="Long Fixed TP")
plot(long_short==-1 ? shortTake : na, style=plot.style_linebr, color=color.green, linewidth=1, title="Short Fixed TP")
My Chart
如果您开始使用 overlay=false
处的指标并将其添加到您的图表中,您应该从图表中删除该指标并在将叠加层设置为 true
后再次添加。
我已经制定了一个策略并将其转换为一个指标(以便轻松地将其与机器人集成),但即使我的叠加设置为 true,该指标也在一个单独的图表上,我看不到 tp/sl在那张小图表上很容易画线。我该如何解决?
indicator("My Strategy on Study", overlay=true)
...
plot(pacL, color=color.blue, linewidth=1, title="High PAC EMA", transp=0)
plot(pacU, color=color.purple, linewidth=1, title="Low PAC EMA", transp=0)
plot(pacC, color=color.red, linewidth=2, title="Close PAC EMA", transp=0)
...
plotshape(longSLhit, style=shape.labelup, location=location.belowbar, color=color.gray, size=size.tiny, title="Long SL", text=" Long SL", textcolor=color.white)
plotshape(shortSLhit, style=shape.labeldown, location=location.abovebar, color=color.gray, size=size.tiny, title="Short SL", text=" Short SL", textcolor=color.white)
plotshape(longTPhit, style=shape.labeldown, location=location.abovebar, color=color.purple, size=size.tiny, title="Long TP", text="Long TP", textcolor=color.white)
plotshape(shortTPhit, style=shape.labelup, location=location.belowbar, color=color.purple, size=size.tiny, title="Short TP", text="Short TP", textcolor=color.white)
...
plot(long_short==1 ? longStop : na, style=plot.style_linebr, color=color.red, linewidth=1, title="Long Fixed SL")
plot(long_short==-1 ? shortStop : na, style=plot.style_linebr, color=color.red, linewidth=1, title="Short Fixed SL")
plot(long_short==1 ? longTake : na, style=plot.style_linebr, color=color.green, linewidth=1, title="Long Fixed TP")
plot(long_short==-1 ? shortTake : na, style=plot.style_linebr, color=color.green, linewidth=1, title="Short Fixed TP")
My Chart
如果您开始使用 overlay=false
处的指标并将其添加到您的图表中,您应该从图表中删除该指标并在将叠加层设置为 true
后再次添加。