-
希望能建立,用于复杂回测(期货主力合约回测,期权回测等)
参考:
CTP合约信息API
https://www.vnpy.com/forum/topic/4358
TdApi.reqQryInstrument()函数,返回的部分字段(顺序有调整):
{
//-----------------------------------以下是,固定的----可以写入数据…
-
还是有每分钟打印一次!如下图:
![QQ20240909-224735](https://github.com/user-attachments/assets/f3776387-2bd9-42c7-9d44-3d025e409529)
-
请问一下为什么我使用vnpy_ctp中subscribeMarketData函数,程序会自动hold住不释放进程?
1. 我并没有使用self.event = Event()去主动hold进程。
2. 在初始化的时候,只使用了self.init(),没有使用self.join()
只要使用subscribeMarketData函数,程序会自动hold住不释放进程。我咨询了一下一些朋友…
-
pTraderSpi := goctp.NewDirectorCThostFtdcTraderSpi(&GoCThostFtdcTraderSpi{Client: CTP})
CTP.TraderApi.RegisterSpi(pTraderSpi) // 注册回调接口,派生自回调接口类的实例
CTP.TraderApi.SubscribePublicTopic(…
-
1.If the error is like:
"AttributeError: 'XXXX' object has no attribute 'NoEditTriggers'. Did you mean: 'editTriggers'?"
Please make sure the version of the PySide6 module is 6.3.0. If its vers…
-
macos m1 pro install vnpy_evo error
# step:
```shell
git clone https://github.com/vnpy/vnpy_evo.git
cd vnpy_evo
python setup.py install
pip install -e .
```
# error:
```shell
Usi…
-
There's quite a few all geared at different things but I figure we might as well start a list of what's been tried as well as what has multi-broker support and/or (a) reasonable API(s) **and** can be …
-
问题:
在币圈,因为仓位、买卖数量允许采用小数,策略类不可避免的会给pos赋值float类型,但是float类型的计算是存在误差的,例如:0.1+0.2==0.3为假,这就导致先买0.1个币,再买0.2个币,再卖0.3个币后,剩余仓位不为0。这样的话if self.pos == 0:就不能匹配仓位为空这个条件。
解决方案:
一、采用decimal类型替代float类型,它能精确表示十进制小数…
-
### original text
```python
from vnpy_evo.event import EventEngine
from vnpy_evo.trader.engine import MainEngine
from vnpy_evo.trader.ui import MainWindow, create_qapp
from vnpy_binance impor…
-
Traceback (most recent call last):
File "C:\veighna_studio\lib\site-packages\vnpy_evo\trader\ui\widget.py", line 128, in connect_gateway
self.main_engine.connect(setting, self.gateway_name)
…