Pine Script 打印语法
在Pine Script中,可以使用以下语法来打印输出:
- 使用
print()函数打印输出变量或表达式的值:
//@version=4
study("Print Example")
ma = sma(close, 20)
print(ma)
- 使用
plotchar()函数打印输出字符或图形:
//@version=4
study("Plot Example")
plotchar("X", char='X', location=location.top, color=color.red)
- 使用
label.new()函数打印输出标签:
//@version=4
study("Label Example")
ma = sma(close, 20)
label.new(bar_index, ma, text=tostring(ma), style=label.style_label_lower_left, color=color.green)
原文地址: https://www.cveoy.top/t/topic/fnYg 著作权归作者所有。请勿转载和采集!