满足条件时,如何在收盘价上连续画一条线?
You can plot with valuewhen.
Example: condition=ta.cross(ta.sma(close,20),ta.sma(close,50)) v=ta.valuewhen(condition,close,0) plot(v)
Can you explain further, what exactly you want to do?
line.new()
, which could look like this:if condition
line.new(x1, y1, x2, y2)
plot()
and the ternary operator ?:
, which could look like this:plot(condition ? value : na) // if condition, then plot value, else plot na (like null)
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.