Comments (4)
I have commited a new version today, give it a try. This should work now 😀
from btoandav20.
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.
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.
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)
- OANDA v20 repetitive disconnection HOT 6
- Issue in oandav20store.py line 879 for Python3 HOT 3
- Simple backtest example HOT 9
- Timing out and not reconnecting HOT 9
- Timezone, Live Data and Connection Timeouts HOT 1
- Order replacement for bracket orders
- Is this msg_type check necessary? HOT 11
- Live Feed constantly dropping out HOT 1
- StopLimit returns rejected HOT 2
- Not consistence parameter stoploss & pips name in getsizing function HOT 1
- Datafeeds delay candle when set node candles=True HOT 3
- The sizers don't work as my expection HOT 1
- Why no loop when call response =??? HOT 2
- 401 (Unauthorized) on btoandav20 works ok on oandapyV20 HOT 1
- Need your help or explain because backtrader stops after receiving new data at new minute HOT 4
- the status of expired order is still "Accepted" in living trading HOT 1
- Commission HOT 1
- Is this expected `broker.getcash()` behavior? HOT 2
- Makes Orders during the backfill candles
- avail variable is no longer part of OandaSizer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from btoandav20.