TradingView 策略进入收盘价

编程入门 行业动态 更新时间:2024-10-23 17:29:56
本文介绍了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).

关于策略"页面(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 策略进入收盘价

本文发布于:2023-10-25 21:57:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1528223.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:收盘价   策略   TradingView

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!