简体   繁体   English

PineScript - 多种进入/退出参数

[英]PineScript - Miltiple Entry/Exit arguments

I want to create multiple strategy.entry and exit arguments.我想创建多个 strategy.entry 和 exit 参数。 But when I run the script, the other arguments will not activate because the previous line of entry argument is still in the trade and hasn't closed/exited yet.但是当我运行脚本时,其他参数不会激活,因为前一行的入口参数仍在交易中并且尚未关闭/退出。 Do I have to define the total position size and specify it for each argument?我是否必须定义总头寸规模并为每个参数指定它? if yes, can you explain it?如果是,你能解释一下吗?

Thanks谢谢

If you want to have multiple entry/exits in the same direction, it is called pyramiding .如果你想在同一个方向有多个入口/出口,它被称为pyramiding By default it is set to zero.默认情况下,它设置为零。 You need to either do it programmatically or manually change it.您需要以编程方式或手动更改它。

pyramiding (const int) The maximum number of entries allowed in the same direction.金字塔 (const int)同一方向允许的最大条目数。 If the value is 0, only one entry order in the same direction can be opened, and additional entry orders are rejected.如果值为0,则只能开一个同方向的挂单,其他挂单被拒绝。 The default value is 0.默认值为 0。

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

Here is an old (v2) but good source on this matter. 是关于此事的旧(v2)但很好的来源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM