输入“行尾无续行”时出现语法错误。交易视图

问题描述 投票:0回答:1
   if ((est_hour >= start_hour_1 and est_hour < end_hour_1) or
                (est_hour == start_hour_2 and est_minute <= end_minute_2) or
                (est_hour > start_hour_2 and est_hour < end_hour_2)) 

在使用 TradingView 的 Pine 脚本时,我遇到了与正确缩进和行延续相关的困难。我尝试使用行继续字符(反斜杠)或“或”来继续行,但仍然收到错误。我还确保了缩进是正确的,但我仍然遇到同样的问题。你能帮我解决这些问题吗?

pine-script indentation tradingview-api pine-script-v4 line-continuation
1个回答
0
投票

如果您尝试换行,则必须仅使用两行进行缩进,而不是标准的四行。

if ((est_hour >= start_hour_1 and est_hour < end_hour_1) or
  (est_hour == start_hour_2 and est_minute <= end_minute_2) or
  (est_hour > start_hour_2 and est_hour < end_hour_2))
© www.soinside.com 2019 - 2024. All rights reserved.