简体   繁体   English

交易视图会在每个柱线关闭时发出警报,我怎么能只有一个?

[英]Trading view alerts every bar close, how can i have just one?

I have a problem: Trading view trigger alerts every bar close which is a major problem to me, because pineconnector keeps making orders based on the alerts received.我有一个问题:交易视图触发器在每个收盘时发出警报,这对我来说是一个主要问题,因为 pineconnector 不断根据收到的警报发出订单。

While I have no major experience with pine script, this is a major problem to me, if anyone would help me get the alert just one until the next reverse signal, I would be more grateful.虽然我没有使用 pine 脚本的主要经验,但这对我来说是一个主要问题,如果有人能帮助我在下一个反向信号之前只发出一个警报,我将不胜感激。

This is the code I have on my pine script strategy:这是我在我的松树脚本策略中的代码:

if buy 
    alert(buy_alert_string,alert.freq_once_per_bar_close)
    strategy.entry('buy', strategy.long)
if sell
    strategy.entry('sell', strategy.short)
    alert(sell_alert_string,alert.freq_once_per_bar_close)

Try whith barstate.isconfirmed试试barstate.isconfirmed

Something like that像那样的东西

if buy and barstate.isconfirmed
    alert(buy_alert_string,alert.freq_once_per_bar_close)
    strategy.entry('buy', strategy.long)

if sell and barstate.isconfirmed
    strategy.entry('sell', strategy.short)
    alert(sell_alert_string,alert.freq_once_per_bar_close)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 交易视图有一个分歧指标,我想了解如何有效使用警报 - Trading View has a Divergence Indicator that I'd like information how how to use the Alerts effectively 交易视图如何确定 Heikin Ashi 条的条颜色 - How Does Trading View Determine the Bar Color for Heikin Ashi Bars 如何测试一组数字的每个组合以获得可能的最高结果? (Python、交易、Pine 脚本、TradingView) - How can I test every combination of a set of numbers for the highest result possible? (Python, Trading, Pine Script, TradingView) 如何使策略在松树脚本中具有警报(带声音)(交易视图) - how to make strategy have a alert (with sound) in pine script (trading view) 有没有办法可以在交易视图 pine 脚本中组合两个指标? - is there a way i can combine two indicators in trading view pine script? 提醒每个新蜡烛我怎么能只有一个提醒 - Alert each new candle how can i have just one alert 交易视图上时间戳的 Pine 脚本代码不会过滤我希望它查看的日期。 我该如何调整? - Pine Script code for timestamp on Trading View does not filter through the dates that I want it to view. How can I adjust this? 我如何在交易视图图表上显示自定义指标的标题 - how do i display the title of a custom indicator on trading view chart 交易视图趋势线被一一清除 - trading view trendline getting cleared one by one 如何在 Pine 中找到基于某个时间的 bar_index(交易视图) - How to find the bar_index based on a certain time in Pine (Trading View)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM