Monday, March 4, 2024

miniQMT自动交易

 https://blog.csdn.net/u010214511/article/details/130275793

http://dict.thinktrader.net/nativeApi/code_examples.html

1. Install Python 3.11.8

2. Install xtquant: pip install quant1x-xtquant

3. 

登录QMT极简模式,连接QMT客户端:

import random

from xtquant.xttrader import XtQuantTrader

path = r'C:\国金证券QMT交易端\userdata_mini'

session_id = int(random.randint(100000,999999))

xt_trader = XtQuantTrader(path, session_id)

xt_trader.start()

connect_result=xt_trader.connect()

print(connect_result)

if connect_result == 0:

print('Connected successfully!')

订阅账户:

acc = StockAccount('888XXXXXXX')

subscribe_result=xt_trader.subscribe(acc)

print(subscribe_result)

下单:

stock_code='000429.SZ'

order_id=xt_trader.order_stock(acc,stock_code,xtconstant.STOCK_BUY,100,xtconstant.FIX_PRICE,9.3)

xt_trader.cancel_order_stock(acc,1082384002)


    asset = xt_trader.query_stock_asset(acc)

    if asset:

        print("asset:")

        print("cash {0}".format(asset.cash))

Friday, March 1, 2024

Breakpoint will not currently be hit. No symbols have been loaded for this document

 For C# Reflection/Dynamic loading module, got the message "Breakpoint will not currently be hit. No symbols have been loaded for this document" when trying to debug.

Already clean solution and rebuild, the below works for me

In VS, go to Tools --> Options --> Debugging --> General, and then cancel the checks in front of [Enable "Only My Code"] and [Require source files to exactly match the original version]. But this method you may have tried.


https://stackoverflow.com/questions/75142437/vs-2022-breakpoint-will-not-currently-be-hit-no-symbols-have-been-loaded-for-t  

Thursday, February 22, 2024

国外(加拿大)驾照换领国内(北京)驾照

 

需要提供:

1. 国外驾驶证原件及复印件

2. 身份证原件和复印件

3. 一寸白底彩色免冠照4张(注意考科目一的时候带上剩余照片)

4. 国外驾驶证翻译原件(不能自己翻译,可以用北京之外的翻译公司,我用的是淘宝找的成都博译翻译,不能用电子版)

5. 护照原件和复印件

6. 机动车驾驶人身体条件证明 (车管所旁边就有,一个体检机器,10分钟搞定)

这之后下载一个交管12123的手机App,预约考试,我约的是龙泉驾校。科目一题库应该就1600多道题,下载一个驾考宝典的App做一遍找出不会的,复习一下不会的就可以了。我准备比较仓促,模拟题做了好几遍只有考试当天早上以90分的成绩勉强通过一次,考试的时候也顺利一次通过(93)。考科目一当天要带着照片早点儿去,我约的是上午8:30到10:00,8点过一点儿主管就召集到教室开始讲考试注意事项了。手机有柜子存放,考试完毕签字后退柜子押金,就在驾校10分钟后就能领到驾照了,跟别的一样,6年有效期。



Sunday, January 21, 2024

local music files from MAC/PC to iPhone


需求: 准备回国,想把已经下载在计算机上的本地音乐文件包括APE,flac等无损格式到手机 iPhone

1. apple music: 可以添加play list,拖本地音乐文件加入,再同步。

两个问题,一是stuck on "Preparing To Sync",后来发现需要从activity monitor里面force quit MDCrashTool。另一个问题是一部分文件不能同步过去

2. QQ音乐

mac版qq音乐没有同步到设备的功能,windows版本有,但我的Parallel Desktop没有办法使用wireless connection,使用数据线连接QQ音乐能找到设备,但始终同步失败。上传到微盘很慢且一部分文件出错

3. 网易云音乐

都不能把本地文件加入到电脑端播放列表,直接删除

4. 酷我音乐

没有mac端桌面软件,但PC端桌面软件很好用,添加本地文件,传歌到设备都很完美。Parallel Desktop并未显示无线,但酷我能成功无线传歌到设备.

酷我的大问题是iphone广告太多了,点广告也只能有半个小时的播放时间。