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

Multiple strategy execution

  • I have 2 strategies and running over same dataset. I am running following command

    Add a strategy



    Add the Data Feed to Cerebro


    Set our desired cash start

    Run over everything


    When I run these 2 strategies then magic happens and traders entered by one strategy are cancelled out by other strategy. Isn't it the weird behavior?
    Logically, traders entered by strategy one should be exited by same strategy, not by the other.

  • administrators

    @param-jeet said in Multiple strategy execution:

    Isn't it the weird behavior?

    Single account broker. If both strategies operate on the same asset you are operating weirdly.

  • My idea of having multiple strategies on single instrument is to control drawdown / risk. This multiple strategy concept halps to maximizze return with minimizing return to some extent. We are not going to put whole investment in one single logic rather multiple logics or strategies. Yes, I want to use single broker account and run all strategies in parallel. Any idea, How can I do that? I had enumerated over strategies but that process in sequential not parallel, How to run all strategies in parallel, is what I am interested in now?

  • administrators

    It seems you have missed the meaning of the answer above.

    • A single account broker means that any action on an asset, regardless of the origin strategy will affect what the other strategies are doing

    • From a logical point of view strategies are run in parallel. The implementation executes them sequentially because Python doesn't have parallel thread execution (the thread model is valid for I/O bound threads but not for CPU bound threads which is the case here)

    What you want is clear, but it's not there.