Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

    Want help in setting params like contract_size , number_of_lot , maintenance_margin

    General Code/Help
    3
    5
    35
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Sajil Thamban
      Sajil Thamban last edited by

      Hi I have a problem I want to set
      1- contract size = 100000
      2 - number of lots = 2

      also want to set a
      3 - maintenance margin of 2150 per lot

      How do I set it in backtrader??

      Also I am going to calculate profit/loss like this -
      (buy_price - sell_price) * contract_size * number_of_lot.

      Please help me, help will be appreciated

      1 Reply Last reply Reply Quote 1
      • Sajil Thamban
        Sajil Thamban last edited by

        I am working with FOREX pairs ex- EURUSD and start_cash is set to 10000

        1 Reply Last reply Reply Quote 0
        • run-out
          run-out last edited by

          Can you show us the code you have tried so far? Thanks

          1 Reply Last reply Reply Quote 0
          • A
            ab_trader last edited by

            set up your futures-type commission scheme - Docs - Commission Schemes:
            margin is your maintenance margin
            mult is your point value, but it seems contract size can be used in your case
            number of lots you use in the orders

            1 Reply Last reply Reply Quote 2
            • Sajil Thamban
              Sajil Thamban last edited by

              Thanks for the help.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Copyright © 2016, 2017, 2018 NodeBB Forums | Contributors
              $(document).ready(function () { app.coldLoad(); }); }