Pine 脚本 - 多个 Entry/Exit 个参数

PineScript - Miltiple Entry/Exit arguments

我想创建多个 strategy.entry 和退出参数。但是当我 运行 脚本时,其他参数将不会激活,因为前一个入场参数行仍在交易中并且还没有 closed/exited。 我是否必须定义总头寸大小并为每个参数指定它?如果是,你能解释一下吗?

谢谢

如果要在同一方向有多个entry/exits,则称为pyramiding。默认情况下,它设置为零。您需要以编程方式执行或手动更改它。

pyramiding (const int) The maximum number of entries allowed in the same direction. If the value is 0, only one entry order in the same direction can be opened, and additional entry orders are rejected. The default value is 0.

strategy(title="MyStrategy", shorttitle="MS", pyramiding = 10)

Here 是旧的 (v2) 但在这方面很好的来源。