TradingView 策略进入收盘价 [英] TradingView Strategy Entry on close price

查看:134
本文介绍了TradingView 策略进入收盘价的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在满足所有条件后立即进行策略挂单?例如.如果(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).

关于策略"页面(https://www.Tradingview.com/pine-script-docs/en/v4/essential/Strategies.html#broker-emulator)它说与真实交易不同,模拟器仅以图表价格填写订单,这就是为什么订单只能在前瞻测试中的下一个分时和下一个柱线或稍后的回测中执行,即在策略计算之后".有谁知道如何克服这个问题并当场下订单?否则,回溯测试将无法提供可追溯的有用数据.

On the "Strategies" page (https://www.tradingview.com/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 策略进入收盘价的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆