如何在pine脚本中返回字符串?

时间:2020-06-03 07:49:48

标签: pine-script

我正在尝试使用pine脚本从函数返回字符串,但是我将其作为对象。我在下面附上我的资源以供参考

//@version=4
study("My Script")
plot(orderType,"orderType",na)
tradeTermAlgoSyntax(price, length) =>
    emaValue = ema(price, length)
    msg = "testt"

alertcondition(true,"test",tradeTermAlgoSyntax(1,1))
plot(close)

1 个答案:

答案 0 :(得分:0)

尝试

//@version=4
study("My Script")
tradeTermAlgoSyntax(price, length) =>
    emaValue = ema(price, length)
    emaValue
plot(tradeTermAlgoSyntax(1,1))
alertcondition(true,"test", "emaValue is {{plot_0}}")
相关问题