Backtrader Community

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. innuendo
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
    I
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Best 0
    • Controversial 0
    • Groups 0

    innuendo

    @innuendo

    0
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    innuendo Unfollow Follow

    Latest posts made by innuendo

    • Execution price problem with order for multiple stocks

      Hi all!
      I am new to backtrader and countering some difficulty about the transaction part. For some reason I don't know, the execution price for the order is always 0 when I try to run a portfolio strategy, though it looks all good when I step back and test a single stock test strategy.

      I printed the open price data supposed to be used, and it seems all right. And I tried both simple buy order and target percent order, both return the same issue.

      Hers is the code and result. It would be much appreciated for you help. Thanks very much!
      Code:
      5ab519cf-9486-431f-bc94-a22a88178db7-image.png
      Result:
      f374ce62-b6fb-4a7c-b3ac-6aeeb7674773-image.png

      posted in General Code/Help
      I
      innuendo