Pine编辑器NZ功能给出符号解决错误

发布于 2025-02-09 09:24:30 字数 609 浏览 2 评论 0 原文

您好,我对TradingView和此代码有问题,如果我没有错,则在这种情况下,NZ应该用零替换NAN,因此我应该能够在DXY EURUSD ZN1(例如DXY EURUSD ZN1)中绘制零!

//@version = 5指示器(“我的脚本”)grahamnumber = nz(request.financial(syminfo.tickerid,“ graham_numbers”,“ fy”,“ fy”,crurners = crurnern.usd),0)图(grahamnumber)

结果是可以编译脚本,但它在这样的图表上给您带来了错误: 符号解析错误:= {“货币-ID” _“ usd”。 “符号”:“ fund:cbot_dl; zn1!; graham “

hello i have a problem with tradingview and this code , if i am not wrong , nz should replace NaN With zero in this case , so i should be able to plot zero in those symbol like DXY EURUSD ZN1!

//@version=5 indicator("My script") grahamnumber = nz( request.financial(syminfo.tickerid, "GRAHAM_NUMBERS", "FY", currency= currency.USD),0) plot(grahamnumber)

the result instead it's that the script can be compiled but it gives you an error on the chart like this :
symbol resolve error:={"currency-id"_"USD". "symbol":"FUND:CBOT_DL;ZN1!;GRAHAMerror

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

笑叹一世浮沉 2025-02-16 09:24:30

没有用于期货的财务数据,因此在期货符号上使用 request.financial()的任何尝试都会导致类似的错误。错误本身表明脚本请求找不到的符号。

There's no financial data available for futures, so any attempt to use request.financial() on futures symbols will result in a similar error. The error itself indicates that the script requests a symbol that could not be found.

心凉 2025-02-16 09:24:30

这是解决方案:ignore_invalid_symbol = true基本上,如果它不再出现,则该错误不再出现,并且如果符号没有Graham号,则绘图显示了值0,如果它具有Graham号码,则该曲线显示了正确的值。

//@version=5 
indicator("My script")
grahamnumber = nz(request.financial(syminfo.tickerid, "GRAHAM_NUMBERS", "FY",ignore_invalid_symbol=true,  currency= currency.USD),0)
plot(grahamnumber)

this is the solution : ignore_invalid_symbol=true basically if it's true the error doesn't appear anymore and the plot shows correctly the value 0 if the symbol has not the graham number instead if it has it shows you the correct value.

//@version=5 
indicator("My script")
grahamnumber = nz(request.financial(syminfo.tickerid, "GRAHAM_NUMBERS", "FY",ignore_invalid_symbol=true,  currency= currency.USD),0)
plot(grahamnumber)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文