Navigation

    Backtrader Community

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

    Topics created by maxpaton

    • M

      Pyfolio sample help
      General Code/Help • • maxpaton

      8
      0
      Votes
      8
      Posts
      3310
      Views

      Hiep Pham

      @maxpaton I converted the time index of returns, transactions, and positions from datetime64[ns, UTC] to datetime64[ns] and it works.

      returns.index = returns.index.tz_convert(None) positions.index = positions.index.tz_convert(None) transactions.index = transactions.index.tz_convert(None)
    • M

      Adding custom indicator
      Indicators/Strategies/Analyzers • • maxpaton

      3
      0
      Votes
      3
      Posts
      2684
      Views

      M

      @backtrader Got it now, thanks

    • M

      Secondary limit/stop order
      General Code/Help • • maxpaton

      5
      0
      Votes
      5
      Posts
      894
      Views

      M

      @backtrader It doesn't seem like you've missed anything, no. It had occurred to me that I could place the secondary order in notify_order(), but I just thought you couldn't as I had never seen done it anywhere else.

      It looks like I should be able to get my algo working by placing the secondary order (on occurrence of order.Completed), in notify_order()!

      Thanks for the clarification, and will let you know if I have any further problems in relation to this post.

    • M

      order.execute.price vs order.execute.value
      General Code/Help • • maxpaton

      5
      0
      Votes
      5
      Posts
      832
      Views

      M

      @backtrader Yes I did mean notify_order, thanks. I agree, not sure why I added the code, as all I wanted to know was how order.executed.value is calculated.

      Cheers

    • M

      Obtain 'close' data before SMA kicks in
      General Code/Help • • maxpaton

      3
      0
      Votes
      3
      Posts
      569
      Views

      M

      Thanks a lot

    • 1 / 1