Comments (2)
你好,应该demo的例子就包括了action的记录。action['no']是记录同一个标的的开仓次数,比如你第一次开仓,可以标记1,然后你再加仓的时候,就标记2,如此类推。
from qtrader.
你好,应该demo的例子就包括了action的记录。action['no']是记录同一个标的的开仓次数,比如你第一次开仓,可以标记1,然后你再加仓的时候,就标记2,如此类推。
多谢回复,还有几个问题需要帮忙解答一下
1、demo例子里action的记录貌似没看到,跑了之后存好的csv文件action字段是空,我自己添加了update_action调用,目前可以记录了。然后action[‘no’]我是用get_all_orders方法取的记录自己解析之后算的,不知道是否有更便捷的取法?
2、 下面几行代码中的close_trd["close"] 中的“close ”是代表什么意义?
close_trd_price = close_trd["close"]
open_trd_price = open_trd["close"]
# make a copy, instead of a reference!
from qtrader.
Related Issues (20)
- Make instrument_cfg configurable in current directory
- Halt the event loop until a full timebar available based on TIME_STEP
- is_trading_time is reproduced in different places HOT 1
- Fix event_engine to support multiple gateways and multiple strategies
- Add commodity
- from qtrader.core.event_engine import BarEventEngineRecorder, BarEventEngine error HOT 4
- DemoStrategy的init_strategy_cash参数是不是有问题,报错了。 HOT 2
- data.py文件报错AttributeError: 'tuple' object has no attribute 'date' HOT 1
- mac环境修改了main_demo还是跑不起来,是不是缺少了哪个步骤 HOT 2
- 插件analysis的plot_pnl_with_category方法有示例数据吗 HOT 3
- 为什么gateways要支持多个gateway HOT 2
- engine的portfolios和strategy里的portfolios两者是有什么区别和联系呢 HOT 7
- 关于Portfolio里做空和做多的account_balance.cash计算疑惑 HOT 3
- engine的源码在哪里?
- Bug: load hist ohlcv pointing to incorrect path (always direct to 1min folder)
- 两个建议,1开源core,2去掉第三方强制依赖 HOT 1
- Misleading information in req_hist
- return nan sharpe ratio/information ratio if volatility is zero
- Holding price becomes zero when prev bar is not available in backtest
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 qtrader.