RSS1RSS2 加入收藏
股票 必读教材第一步:新手疑惑第二步:开户买股第三步:必要名词第四步:看盘基础第五步:股市常识第六步:炒股书籍第七步:视频学习终极操盘 知识
您当前的位置:首页 > 股票软件 > 金字塔公式
软件名称: 金字塔 和风模板:月收益统计功能
整理时间: 2015-07-11
界面语言: 简体中文
软件类型: 金字塔公式
运行环境: Win9X/Win2000/WinXP/Win2003/Win7/Win8/Win10
授权方式: 免费版
软件大小: 1.00 KB
软件等级:
软件登陆: admin
作 者 : 58gu.com小编
官方网址: 官方站
程序演示: 演示
软件简介:  
由于金字塔现在的模型测试中没有按月统计的功能,尝试在公式中加入简单的几行代码,实现收益按月统计,统计结果保存在txt文件中,形式如下:

macross_report IF00 月度汇总报告 测试日期:20110831
201004收益: 29940
201005收益: 60780
201006收益: -43680
201007收益: -6060
201008收益: -30420
201009收益: 18720
201010收益: 83760

以此为模板,还可以增加每月交易次数,胜率等数据。

可以在进行回测的时候设置report参数为1,平时在图表上使用时report设为0;



input:n1(5,1,100,1),n2(20,1,100,1),report(0,0,1,1);
//需要生成报告时,将参数report设为1
variable:rz1=1;
if barpos()=1 then
begin
if report=1 then
debugfile2('C:\Documents and Settings\Administrator\桌面\month.txt',FORMULANAME()&' '&stklabel&' 月度汇总报告 测试日期:%0.f',currentdate+19000000,0);
rz1:=asset();
end;

//一个均线交叉的系统作为例子
ma1:=ma(c,n1);
ma2:=ma(c,n2);
t1:=time>=091500 and time<=144500;
t2:=time>=151000;
sell(holding>0 and (ma1<ma2 or t2),1,thisclose);
sellshort(holding<0 and (ma1>ma2 or t2),1,thisclose);
buy(holding=0 and ma1>ma2 and t1,1,thisclose);
buyshort(holding=0 and ma1<ma2 and t1,1,thisclose);

//生成月统计
rz2:=ref(ASSET(),1) ;
rd:=ref(date,1);
if barpos<>1 and (month<>ref(month,1) or islastbar) then
begin
if report=1 then debugfile2('C:\Documents and Settings\Administrator\桌面\month.txt',numtostr((rd+19000000)/100,0)&'收益: %0.f ',rz2-rz1,0);
rz1:=rz2;
end;




--------------------------------------------------------------------------------

input:n1(5,1,100,1),n2(20,1,100,1),report(0,0,1,1); //需要生成报告时,将参数report设为1 variable:rz1=1; if barpos()=1 then begin if report=1 then debugfile2('C:\Documents and Settings\Administrator\桌面\month.txt',FORMULANAME()&' '&stklabel&' 月度汇总报告 测试日期:%0.f',currentdate+19000000,0); rz1:=asset(); end; ma1:=ma(c,n1); ma2:=ma(c,n2); t1:=time>=091500 and time<=144500; t2:=time>=151000; sell(holding>0 and (ma1ma2 or t2),1,thisclose); buy(holding=0 and ma1>ma2 and t1,1,thisclose); buyshort(holding=0 and ma11 and (month<>ref(month,1) or islastbar) then begin if report=1 then debugfile2('C:\Documents and Settings\Administrator\桌面\month.txt',numtostr((rd+19000000)/100,0)&'收益: %0.f ',rz2-rz1,0); rz1:=rz2; end;
下载地址: [ 下载地址1 ]
下载帮助: 发表评论 加入收藏夹 错误报告
相关软件:
  • 小月操盘线 一条能让你赚到钱的线
  • 沉船寻宝副图:无未来函数,有明显的买卖提示。
  • 爆涨前夜选股指标
  • 自用的一个主图公式
  • 庄家逃跑监控指标
  • 通达信 黄色立柱T+0分时指标 及选股 预警公式
  • 通达信起爆位置指标公式
  • 拔地而起!!!祝你股海扬帆!
  • 超准趋势线(源码 副图 通达信 贴图 说明)
  • 通达信抄底指标
  • 下载说明: ⊙推荐使用网际快车下载本站软件,使用 WinRAR v3.10 以上版本解压本站软件。
    ⊙如果这个软件总是不能下载的请点击报告错误,谢谢合作!!
    ⊙下载本站资源,如果服务器暂不能下载请过一段时间重试!
    ⊙如果遇到什么问题,请到本站论坛去咨寻,我们将在那里提供更多 、更好的资源!
    ⊙本站提供的一些商业软件是供学习研究之用,如用于商业用途,请购买正版。
    发表评论 共有条评论
    验证码:
    推荐下载
    最后更新
    热门点击