前几天,用Ptrade写的3个范例(源码+配置文件)包

乐游胡子
乐游胡子 任何事情都需要倾入热情。

1 People liked this article · 2780 views

前几篇文章中写了一些范例:

Ptrade中读取ini配置文件范例》《用Ptrade写1个只有62行的“预埋单”策略范例》《用Ptrade写一个”仿真行情数据“生成器有些朋友私信我咨询了不少测试的细节问题,部分是手打代码全角问题,部分是缩进等格式问题,还有各种奇怪的小问题。为了方便大家获取原版代码,今天特意重新整理打包了源码及INI配置文件,供想深入研究的朋友学习。顺便测试一下网站的付费功能,真需要的朋友自行下载。







List of attachments

3合1源码包.zip

16KB

18.18

线上付款

Published on 2024-03-18 09:59

Disclaimers:

This document is written by 乐游胡子 Original published on 百果量化交流平台 ,The copyright belongs to the author。

Log in,More exciting content waiting for you to find,Contribute wonderful answers,Participate in comment interaction

go Sign in! No accountgoregister

tt20240313
2024-04-01 22:09
测试回测成功,需要注意ini文件必须在PT研究模块上传。
251251chn
2024-03-30 11:13
我下载了BOLL强盗策略不能回测,请指导,谢谢! 2024-03-30 10:59:19开始运行回测,策略名称:BOLL强盗 2024-02-06 15:00:00- ERROR- 策略handle_data函数执行失败,错误原因:Traceback (most recent call last): File \fly_docker/IQEngine/core/strategy/strategy-py\, line 180, in on_handle_data File \/home/fly/backtest/78ef02de-ee41-11ee-87e1-e48429481f8c/user_strategy.py\, line 43, in handle data 情数据df export_df(security, g.upper_band, g.lower_band, g.na_short, g.mo_long, g.current_price, riqi_str) #每次跨日就导出一次前日综合行 File \/home/fly/backtest/78ef02de-ee41-11ee-87e1-e48429481f8c/user_ strategy.py\, line 95, in export_df df.to excel(NOTEBOOK_PATH+ riqi_str+ \_\+ security[@:6]+\_综合行情数据_布林策略,xls\,encoding=\utf-8\, index=True, header-True) 上证指数 3041.17↑ 30.51 1.01\% 3646亿 深证成措9400.85t 57.93 0.62\% 4940亿 创业板指 1818.20t 11.30 0.63\% 2173亿 前几天,用Ptrade... 汇通启富网上交易... PTrade交易系统(.. pepe
tt20240313
2024-03-25 10:37
@老胡上山打老虎 ,看到了,谢谢
乐游胡子
2024-03-25 10:07
@tt20240313 现在有些解压软件打开,第一步是让你输入 “主密码”(获取管理记录),这步直接取消跳过,跳过之后就让你输入文件密码,就是文章末端的那个,你试试,我刚刚自己又下了一遍,解压没有问题哟。
乐游胡子
2024-03-25 10:01
@tt20240313 文章尾部有解压密码,你有看到吗
tt20240313
2024-03-25 09:37
已付费,但是不能解压文件?