For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

Selling all positions

  • My algo currently makes multiple buys ( but when a sell/stop is hit, the positions are sold separately at different times (using self.sell()). How can I sell all the open positions at once in one order?

  • @Ziyi-Liew maybe you can implement it by yourself,I don't know it has this function.But you can use a for-loop

    for data in self.datas:
         if  size!=0:

    this for loop will close all your position.

Log in to reply