繁体   English   中英

Pine 脚本:无法使用 arguments 调用“plotshape”

[英]Pine Script: Cannot call 'plotshape' with arguments

如果用户选中一个框,我正在尝试更改形状的大小。

ma = sma(hlc3,p)
big = input(false,"Bigger shapes")
plotshape(crossover(hlc3, ma), style=shape.triangleup, color=color.green, size=(big?size.small:size.tiny))

我对错误感到困惑,不确定大小有什么问题......

处理脚本...第 7 行:无法使用 arguments 调用“plotshape”(series[bool],style=const string,color=const color,size=input string); 可用重载:plotshape(series[bool], const string, input string, input string, series[color], input integer, series[integer], const string, series[color], const bool, const string, input integer, const integer,字符串)=> 无效; plotshape(<arg_series_type>, const string, input string, input string, <arg_color_type>, input integer, series[integer], const string, <arg_textcolor_type>, const bool, const string, input integer, const integer, string) =>空白

plotshape()的参考手册指出size必须是一个常数。
这意味着您不能使大小取决于条件。
您必须使用固定大小。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM