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/

    Oanda live trading not executing trade

    General Code/Help
    1
    1
    55
    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.
    • monicanq
      monicanq last edited by

      Hello,
      I downloaded some data from Oanda and backtested the strategy with decent results. I was hoping to connect to Oanda and perform a live test with a paper trade now. I tweaked the file oandatest.py from https://github.com/ftomassetti/backtrader-oandav20 and I realized that the orders were not being executed in oanda. I decided to go back and utilize the example as it is but again I don't see any orders being executed. I have tried with minimal arguments and also adding timeframe Minutes and compression 1 with no luck. I am sure that it is something quite silly that I am forgetting but I just can't seem to be able to find the solution. I also realized that I am getting the following when I execute the code:

      --------------------------------------------------
      Strategy Created
      --------------------------------------------------
      -- Contract Details:
      {'name': 'AUD_CAD', 'type': 'CURRENCY', 'displayName': 'AUD/CAD', 'pipLocation': -4, 'displayPrecision': 5, 'tradeUnitsPrecision': 0, 'minimumTradeSize': '1.0', 'maximumTrailingStopDistance': '1.0', 'minimumTrailingStopDistance': '0.0005', 'maximumPositionSize': '0.0', 'maximumOrderUnits': '100000000.0', 'marginRate': '0.05'}
      Datetime, Open, High, Low, Close, Volume, OpenInterest, SMA
      ***** DATA NOTIF: DELAYED                               
      

      I am not sure if it is normal that maximumPositionSize is 0.

      Thank you in advance!

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors