[英]Plotshape for only one ticker. Pine Script
I want to do a plot shape of LONG and SHORT for only SPY ticker.我想做一个 plot 形状的 LONG 和 SHORT 仅用于 SPY 代码。 I do not want it to show for other tickers should not show.
我不希望它显示其他代码不应该显示。 I have already request security for the SPY only.
我已经只为 SPY 请求了安全性。 But, it is also showing LONG and SHORT for other tickers.
但是,对于其他代码,它也显示 LONG 和 SHORT。 How can I fix it?
我该如何解决?
You can use syminfo.ticker
to check if your chart is on SPY
.您可以使用
syminfo.ticker
检查您的图表是否在SPY
上。
Symbol name without exchange prefix, eg 'MSFT'.
不带交换前缀的符号名称,例如“MSFT”。
is_spy = (syminfo.ticker == "SPY")
Then use is_spy
as a condition to your plotshape()
functions.然后使用
is_spy
作为您的plotshape()
函数的条件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.