Giter VIP home page Giter VIP logo

Comments (4)

happydasch avatar happydasch commented on June 14, 2024 1

I have commited a new version today, give it a try. This should work now 😀

from btoandav20.

happydasch avatar happydasch commented on June 14, 2024

it is not possible. You will not be able to recognize orders which were created outside the session. The same goes for trades that were closed outside backtrader, they will also not get recognized.

It will only process transactions, that were created by the _order_create method. It would be possible to fill backtrader with all open trades when starting, but this would require some work. Currently, the store will fetch open positions. This data is used to create a simulated order, so backtrader can close that position.

At the moment, its good to close all pending stuff or open trades/positions before starting backtrader.

from btoandav20.

haimivan avatar haimivan commented on June 14, 2024

Thanks for your reply.

I understand you correctly, that not being able to get existing orders and trades/positions during startup is not backtrader related, but the present behaviour of backtrader-oandav20?

In my humble opinion, it would be very helpful to have such a feature, as otherwise any interruption of a running process of oandav20test.py (like intermediate change from my laptop to my desktop, own programming errors...) would force me to continue my trading manually.

I understand it very well, that intercepting a running algo program with manual trading leads to a high complexity, but my humble hope would be to have such a feature that looks during start() or __init__() in the present state of the account to fill internal variables accordingly.

from btoandav20.

happydasch avatar happydasch commented on June 14, 2024

Yes, this is store related. We have the possibility to fetch the information on startup and recreate pending orders and open trades via the api. From this data we could fill and prepare backtrader.

I have this already on my todo List but i will not be able to work on it in near future.

I need this to be able to close trades manually from oanda.

from btoandav20.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.