松脚本警报

发布于 2025-02-03 01:29:17 字数 596 浏览 1 评论 0原文

我正在使用Pine脚本来为我的交易机器人构建我的开创性。关于买卖信号,图表上的所有内容似乎都不错。但是我的问题在警报中。购买和销售警报是同时触发的,就像确切的第二一样。因此,我失败了贸易。

有什么办法可以康复吗?

  stragity.risk.allow_entry_in(stragity.direction.long) 
如果ta.crossover(关闭,SA) 
    if(关闭> sma)
        策略。进入(“买”,策略。长)

如果ta.crossunder(关闭,SA) 
    策略。进入(“卖出”,策略。
 

同时触发警报

在电视上设置警报 我在此处选择我的策略,然后将其连接到3个通用的文档中解释

I'm building my startegy for my trading bot using pine script. Everything seems fine on the chart regarding the buy/sell signals. But my issues are on the alerts. Buy and sell alerts are triggered at the same time like the exact second. I failed on trade because of that.

Is there any way to remediate to that please ?

strategy.risk.allow_entry_in(strategy.direction.long) 
if  ta.crossover(close, sa) 
    if(close > sma)
        strategy.entry("buy", strategy.long)

if  ta.crossunder(close,sa) 
    strategy.entry("sell", strategy.short)

Alert being triggered at the same time

Setting alerts on TV
I select my strategy here and then connect it to 3commas as explained by their docs

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

软甜啾 2025-02-10 01:29:17

Okok我找到了一个工具,我需要将策略更改为指标

Okok I found a workarround, I needed to change the strategy into an indicator

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文