第168行:输入时的语法错误,无线延续;。

发布于 2025-01-28 20:57:49 字数 310 浏览 2 评论 0原文

我正在尝试在TradingView中创建加密货币交易策略,直到我的脚本决定升级到V5之前,一切都很好。一切都起作用,但是当我添加这两行时,我会收到上述错误。

没有额外的空间,tabstops或其他任何东西,我感到非常困惑和烦恼。

线:

strategy.entry(id="Enter Long", strategy.long, when=LongOpenConditions)
strategy.entry(id="Enter Short", strategy.short, when=ShortOpenConditions)

I'm trying to create a crypto trading strategy in TradingView, and everything was going well until my script decided to upgrade to v5. Everything works, but when I add these two lines, I get the above error.

There are no extra spaces, tabstops or anything else and I am very confused and irritated.

Lines:

strategy.entry(id="Enter Long", strategy.long, when=LongOpenConditions)
strategy.entry(id="Enter Short", strategy.short, when=ShortOpenConditions)

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

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

发布评论

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

评论(2

孤独陪着我 2025-02-04 20:57:49

好吧,事实证明“ id =”不应该在那里。它扔了错误的错误。问题解决了。

Okay, turns out "id=" wasn't supposed to be there. It threw the wrong error. Problem solved.

笑红尘 2025-02-04 20:57:49

如果您在函数调用中开始使用参数名称,则必须在此之后继续使用其他参数的名称。

以下所有内容都应罚款。

strategy.entry(id="Enter Long", direction=strategy.long, when=LongOpenConditions)
strategy.entry("Enter Long", direction=strategy.long, when=LongOpenConditions)
strategy.entry("Enter Long", strategy.long, when=LongOpenConditions)

If you start using argument names in the function call, you must continue using other argument's names too after that point.

All below should compile fine.

strategy.entry(id="Enter Long", direction=strategy.long, when=LongOpenConditions)
strategy.entry("Enter Long", direction=strategy.long, when=LongOpenConditions)
strategy.entry("Enter Long", strategy.long, when=LongOpenConditions)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文