Pine 脚本中一长组函数值的换行

sun*_*ore 2 pine-script

我正在尝试换行,因为它太长,无法在一个屏幕上看到所有内容:

strategy.entry
    ("Long Continuation", 
    true, 1, when = FastMA < SlowMA and SlowMA > SlowMA[5] and ShortDiff < 
    ShortDiff[1]
    and close[1] < _PercentAbove and close[1] > _PercentBelow)
Run Code Online (Sandbox Code Playgroud)

它在未包装的情况下工作,但是当我包装它时,我收到错误“添加到图表操作失败,原因:第 15 行:输入‘行尾无行延续’处的语法错误”

我意识到我可以用更好的代码来缩短这个时间,但我只是对 Pine 中的换行工作感到好奇enter code here

Bar*_*kut 5

如果要换行,下一行必须以一个或多个(不同于 4 的倍数)空格开头。

您的代码似乎有 4 个空格,这会导致错误。

以下代码应该可以编译。

strategy.entry("Long Continuation", 
 true, 1, 
  when = FastMA < SlowMA and SlowMA > SlowMA[5] and
   ShortDiff < ShortDiff[1] and close[1] < _PercentAbove and
     close[1] > _PercentBelow)
Run Code Online (Sandbox Code Playgroud)

分别有 0、1、2、3、5 个空格。