Navigation

    Backtrader Community

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

    Posts made by aguilera_joao

    • RE: Strange behavior on PercentSizer

      @aguilera_joao Hey!

      I just decided to create my onw sizer!

      Sorry for the trouble,

      Cheers!

      posted in General Code/Help
      A
      aguilera_joao
    • Strange behavior on PercentSizer

      Hey! I'm using the PercentSizer to always buy 12.5% of my cash value per buy trade. When is time to sell, I am closing all.

      The thing is the Backtrader suddenly starts to buy more. 12.5% on the first two times, then 25% and then 50% and I'm out of cash, as you can see on Transactions get_analysis():

      (datetime.datetime(2020, 9, 28, 13, 0),
                    [[2.829878222704097,
                      4.3821,
                      0,
                      'AVAXUSDT',
                      -12.400809359711623]]),
                   (datetime.datetime(2020, 9, 28, 15, 0),
                    [[2.829878222704097,
                      4.3494,
                      0,
                      'AVAXUSDT',
                      -12.308272341829198]]),
                   (datetime.datetime(2020, 9, 28, 23, 0),
                    [[5.659756445408194,
                      4.3608,
                      0,
                      'AVAXUSDT',
                      -24.681065907136052]]),
                   (datetime.datetime(2020, 9, 29, 5, 0),
                    [[11.319512890816387,
                      4.2401,
                      0,
                      'AVAXUSDT',
                      -47.99586660835056]]),
      

      The headers would be "datetime", "size", "price", "IDK", "Asset", "usd size value"

      Why is this happening?

      Thank you all!

      posted in General Code/Help
      A
      aguilera_joao
    • 1 / 1