DCA BOT --- 如果问题 --- 多次接收问题
当其中一个阶段没有完成时,其他阶段就会失效,但我希望它继续下去。
当它继续时,它执行前一个未完成阶段的顺序。
我怎样才能防止这种情况
> > 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论