DCA BOT --- 如果问题 --- 多次接收问题

发布于 2025-01-15 18:12:01 字数 2966 浏览 1 评论 0原文

当其中一个阶段没有完成时,其他阶段就会失效,但我希望它继续下去。

当它继续时,它执行前一个未完成阶段的顺序。

我怎样才能防止这种情况

> >  if long66 
>     strategy.entry('Base order', strategy.long, qty=100/close, when=long55 and strategy.opentrades == 0,
>      comment='BO' + str.tostring(current_so) + str.tostring(100))
>     current_so := current_so +  1 else 
>     current_so := current_so + 1
> 
> if  long66 <= kademe1 and long66 > kademe2
>     strategy.entry('Long1' , strategy.long, qty=200/close,
>      when=(strategy.opentrades <= current_so) and strategy.position_size > 0 and not(strategy.opentrades ==1), 
>      comment='SO' + str.tostring(current_so) + ' - ' + (str.tostring(100))  )
>     current_so := current_so + 1
> 
> else    
>     current_so := current_so + 1
>     
>      if   long66 < kademe2 and  long66 > kademe3
>     strategy.entry("Long2" , strategy.long, qty=200/close,
>      when=(strategy.opentrades <= current_so) and strategy.position_size > 0 and not(strategy.opentrades == 2), 
>      comment='SO' + str.tostring(current_so) + ' - ' + (str.tostring(200)) )
>     current_so := current_so + 1   else 
>     current_so := current_so + 1
> 
> 
> if  long66 < kademe3 and long66 > kademe4
>     strategy.entry('long3' + "i_s", strategy.long, qty=200/close,
>      when=(strategy.opentrades <= current_so) and strategy.position_size > 0 and not(strategy.opentrades == 3 ), 
>      comment='SO' + str.tostring(current_so) + ' - ' + (str.tostring(300))  )
>     current_so := current_so + 1     else
>     current_so := current_so + 1
>     
> 
> 
> if  long66 < kademe4 and long66 > kademe5
>     strategy.entry('Long4' , strategy.long, qty=200/close,
>      when=(strategy.opentrades <= current_so) and strategy.position_size > 0 and not(strategy.opentrades == 4), 
>      comment='SO' + str.tostring(current_so) + ' - ' + (str.tostring(400))  )
>     current_so := current_so + 1        else
>     current_so := current_so + 1 
> 
> 
> if  long66 <= kademe5 and long66 > kademe6
>     strategy.entry("long5", strategy.long, qty=200/close,
>      when=(strategy.opentrades <= current_so) and strategy.position_size > 0 and not(strategy.opentrades == 5), 
>      comment='SO' + str.tostring(current_so) + ' - ' + (str.tostring(500)) )
>     current_so := current_so + 1       else 
>     current_so := current_so + 1
> 
> 
> 
> if  long66 <= kademe6
>     strategy.entry("long6", strategy.long, qty=200/close,
>      when=(strategy.opentrades <= current_so) and strategy.position_size > 0 and not(strategy.opentrades == 6), 
>      comment='SO' + str.tostring(current_so) + ' - ' + (str.tostring(600)) )
>     current_so := 6

在此处输入图像描述

When one of the stages is not fulfilled, the other stages become ineffective, but I want it to continue.

When it continues, it executes the order of the previous unfulfilled stage.

How can i prevent this

> >  if long66 
>     strategy.entry('Base order', strategy.long, qty=100/close, when=long55 and strategy.opentrades == 0,
>      comment='BO' + str.tostring(current_so) + str.tostring(100))
>     current_so := current_so +  1 else 
>     current_so := current_so + 1
> 
> if  long66 <= kademe1 and long66 > kademe2
>     strategy.entry('Long1' , strategy.long, qty=200/close,
>      when=(strategy.opentrades <= current_so) and strategy.position_size > 0 and not(strategy.opentrades ==1), 
>      comment='SO' + str.tostring(current_so) + ' - ' + (str.tostring(100))  )
>     current_so := current_so + 1
> 
> else    
>     current_so := current_so + 1
>     
>      if   long66 < kademe2 and  long66 > kademe3
>     strategy.entry("Long2" , strategy.long, qty=200/close,
>      when=(strategy.opentrades <= current_so) and strategy.position_size > 0 and not(strategy.opentrades == 2), 
>      comment='SO' + str.tostring(current_so) + ' - ' + (str.tostring(200)) )
>     current_so := current_so + 1   else 
>     current_so := current_so + 1
> 
> 
> if  long66 < kademe3 and long66 > kademe4
>     strategy.entry('long3' + "i_s", strategy.long, qty=200/close,
>      when=(strategy.opentrades <= current_so) and strategy.position_size > 0 and not(strategy.opentrades == 3 ), 
>      comment='SO' + str.tostring(current_so) + ' - ' + (str.tostring(300))  )
>     current_so := current_so + 1     else
>     current_so := current_so + 1
>     
> 
> 
> if  long66 < kademe4 and long66 > kademe5
>     strategy.entry('Long4' , strategy.long, qty=200/close,
>      when=(strategy.opentrades <= current_so) and strategy.position_size > 0 and not(strategy.opentrades == 4), 
>      comment='SO' + str.tostring(current_so) + ' - ' + (str.tostring(400))  )
>     current_so := current_so + 1        else
>     current_so := current_so + 1 
> 
> 
> if  long66 <= kademe5 and long66 > kademe6
>     strategy.entry("long5", strategy.long, qty=200/close,
>      when=(strategy.opentrades <= current_so) and strategy.position_size > 0 and not(strategy.opentrades == 5), 
>      comment='SO' + str.tostring(current_so) + ' - ' + (str.tostring(500)) )
>     current_so := current_so + 1       else 
>     current_so := current_so + 1
> 
> 
> 
> if  long66 <= kademe6
>     strategy.entry("long6", strategy.long, qty=200/close,
>      when=(strategy.opentrades <= current_so) and strategy.position_size > 0 and not(strategy.opentrades == 6), 
>      comment='SO' + str.tostring(current_so) + ' - ' + (str.tostring(600)) )
>     current_so := 6

enter image description here

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文