【发布时间】:2021-11-17 07:29:27
【问题描述】:
大家好,所以我在 pine 中有一个跨界策略,它没有 tp、sl 它只是在看涨交叉时买入并在看跌时卖出
我保持原样,不乱用 tp 和 sl 但我想设置一个 5% 的最大回撤,如果它下降到 5% 或更多,它将在蜡烛关闭时关闭交易
buy= crossunder (k,d)
sell= crossover(k,d)
// strategy
strategy.entry ("long", strategy.long, 100, when = buy)
strategy.close ("long", when = sell)
【问题讨论】:
标签: pine-script algorithmic-trading trading cryptocurrency tradingview-api