欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件金字塔软件问题提交 → [求助]同步

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有4499人关注过本帖平板打印复制链接

主题:[求助]同步

帅哥哟,离线,有人找我吗?
qgzzl
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:29 积分:165 威望:0 精华:0 注册:2012/9/29 7:50:08
  发帖心情 Post By:2012/10/30 17:27:14 [只看该作者]


图片点击可在新窗口打开查看此主题相关图片如下:stockgraphout2.jpg
图片点击可在新窗口打开查看
以上为今天的模拟交易情况,用k线走完模式,其它情况不变,麻烦请测试。


VarIABLE: kd=0, kk=0 ;

收益:asset,noaxis,colorred ;
可用现金:CASH(0),LINETHICK0;
持仓:HOLDING,LINETHICK0;

entertime:= TIME<=145900 AND TIME>=090100 ;

if 平空 and kk=1 and enterbars > 0 AND entertime then begin
sellShort ( holding < 0 ,0 , limitr, o);
if holding = 0 then
kk:=0;
end

if 开多 and kd=0 and entertime then begin
Buy ( holding= 0 , 1- holding, limitr, o) ;
if holding =1 then
kd:=1;
end

if 平多 and kd=1 AND entertime and enterbars > 0 then begin
sell ( holding > 0 , 0 , limitr, o) ;
if holding = 0 then
kd:=0;
end

if 开空 and kk=0 and entertime then begin
buyshort(holding = 0 , 1+holding , limitr, o) ;
if holding =-1 then
kk:=1;
end

if TIME >= 145900 and TIME < 150000 then //收盘前1分钟平仓
begin
sell(1, 0, market );
sellshort(1, 0, market);
end

以上为公式代码,麻烦你们测试一下,另外我没有变动k线图,公式没有未来函数,信号也没有消失,它只是在没有信号的k线上出现无用的开平仓,最关键是图表持仓和模拟账户持仓不同步甚至反向,麻烦你们测试一下。


单帖管理
[此贴子已经被作者于2012-10-30 17:28:52编辑过]

 回到顶部
总数 17 1 2 下一页