I want to do a plot shape of LONG and SHORT for only SPY ticker. I do not want it to show for other tickers should not show. I have already request security for the SPY only. But, it is also showing LONG and SHORT for other tickers. How can I fix it?
You can use syminfo.ticker
to check if your chart is on SPY
.
Symbol name without exchange prefix, eg 'MSFT'.
is_spy = (syminfo.ticker == "SPY")
Then use is_spy
as a condition to your plotshape()
functions.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.