【发布时间】:2022-08-20 18:18:15
【问题描述】:
我在基于枢轴点的 Tradingview 上找到了这个策略。我试图在 R3 / S3 上添加退出策略,但它不起作用。有人能帮我吗?
strategy.risk.allow_entry_in(tradeDirection)
longCondition = crossover(Source, R1) and inDateRange
shortCondition = crossunder(Source, S1) and inDateRange
strategy.entry(\"Buy\", strategy.long, when=longCondition, oca_name=\"oca\",
oca_type=strategy.oca.cancel)
strategy.exit(\"Exit Long\", stop=R3)
strategy.entry(\"Sell\", strategy.short, when=shortCondition, oca_name=\"oca\",
oca_type=strategy.oca.cancel)
strategy.exit(\"Exit Short\", stop=S3)
标签: pivot pine-script