在Pine Script中,可以使用以下语法来打印输出:

  1. 使用print()函数打印输出变量或表达式的值:
//@version=4
study("Print Example")
ma = sma(close, 20)
print(ma)
  1. 使用plotchar()函数打印输出字符或图形:
//@version=4
study("Plot Example")
plotchar("X", char='X', location=location.top, color=color.red)
  1. 使用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)
Pine Script 打印语法

原文地址: https://www.cveoy.top/t/topic/fnYg 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录