如何在满足所有条件后立即进行策略挂单?例如.如果(open_price > _some_condition)策略.entry(...)我使用了strategy(...process_orders_on_close=true)",但我不想在此柱的收盘价上下单,而是在此柱的开盘价上下单(所以立即).
How can one make a strategy entry order immediately after all conditions were satisfied? E.g. if(open_price > _some_condition) strategy.entry(...) I used "strategy(...process_orders_on_close=true)", but I would like to make an order not on this bar’s close price, but on this bar’s open price (so immediately).
关于策略"页面(www.Tradingview/pine-script-docs/en/v4/essential/Strategies.html#broker-emulator)它说与真实交易不同,模拟器仅以图表价格填写订单,这就是为什么订单只能在前瞻测试中的下一个分时和下一个柱线或稍后的回测中执行,即在策略计算之后".有谁知道如何克服这个问题并当场下订单?否则,回溯测试将无法提供可追溯的有用数据.
On the "Strategies" page (www.tradingview/pine-script-docs/en/v4/essential/Strategies.html#broker-emulator) it says "Unlike in real trading, the emulator only fills orders at chart prices, which is why an order can only be filled on the next tick in forwardtesting and on the next bar or later in backtesting, i.e., after the strategy calculates". Does anyone know how to overcome this issue and place an order on the spot? Otherwise backtesting does not provide rear-life and useful data.
推荐答案脚本在历史柱线的收盘价时进行计算,因此您无法检测收盘价的条件并及时返回以在柱线的开盘价上下单.
Scripts calculate on the close of historical bars, so you can't detect a condition on the close and go back in time to place an order on the bar's open.
更多推荐
TradingView 策略进入收盘价
发布评论