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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件策略编写求助区 → 求好心人帮忙改为金字塔公式~

   

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


  共有6746人关注过本帖树形打印复制链接

主题:求好心人帮忙改为金字塔公式~

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


加好友 发短信
等级:新手上路 帖子:27 积分:82 威望:0 精华:0 注册:2010/10/3 21:13:35
求好心人帮忙改为金字塔公式~  发帖心情 Post By:2011/11/23 19:11:36 [只看该作者]

之前用文华,换了期货公司,只支持金字塔,现在求帮我改为金字塔公式,感激不尽!!!

思路是这样:用在1分钟,PTA指数测试,只做日内,限制每日开仓次数,参考9:29的价格,在9:59判断开多还是开空,持仓半小时(因为10:15~10:30休息)后在10:13根据9:59的时候PTA价格判断开多还是开空,平掉相反的仓位;持仓半小时后在10:59根据10:29的时候PTA价格判断开多还是开空、加仓,平掉相反的仓位,如此类推,在14:58平掉所有仓位~

RR0929:VALUEWHEN(TIME=0929,C);
TIME=0959 && C<=RR0929+17.03,BK(1);
TIME=0959 && C>=RR0929-17.03,SK(1);
RR0959:VALUEWHEN(TIME=0959,C);
TIME=1013 && C>=RR0959-17.03,SP(BUYVOL);
TIME=1013 && C<=RR0959+17.03,BP(SELLVOL);
TIME=1013 && C<=RR0959+17.03,BK(1);
TIME=1013 && C>=RR0959-17.03,SK(1);
RR1013:VALUEWHEN(TIME=1013,C);
TIME=1059 && C>=RR1013-17.03,SP(BUYVOL);
TIME=1059 && C<=RR1013+17.03,BP(SELLVOL);
TIME=1059 && C<=RR1013+17.03,BK(1);
TIME=1059 && C>=RR1013-17.03,SK(1);
RR1059:VALUEWHEN(TIME=1059,C);
TIME=1128 && C>=RR1059-17.03,SP(BUYVOL);
TIME=1128 && C<=RR1059+17.03,BP(SELLVOL);
TIME=1128 && C<=RR1059+17.03,BK(1);
TIME=1128 && C>=RR1059-17.03,SK(1);
RR1128:VALUEWHEN(TIME=1128,C);
TIME=1359 && C>=RR1128-17.03,SP(BUYVOL);
TIME=1359 && C<=RR1128+17.03,BP(SELLVOL);
TIME=1359 && C<=RR1128+17.03,BK(1);
TIME=1359 && C>=RR1128-17.03,SK(1);
RR1359:VALUEWHEN(TIME=1359,C);
TIME=1429 && C>=RR1359-17.03,SP(BUYVOL);
TIME=1429 && C<=RR1359+17.03,BP(SELLVOL);
TIME=1429 && C<=RR1359+17.03,BK(1);
TIME=1429 && C>=RR1359-17.03,SK(1);
TIME=1458,SP(BUYVOL);
TIME=1458,BP(SELLVOL);

 


 回到顶部
帅哥哟,离线,有人找我吗?
26327756l
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:黑侠 帖子:676 积分:2548 威望:0 精华:3 注册:2011/4/13 16:18:50
  发帖心情 Post By:2011/11/24 10:23:07 [只看该作者]

问题正在解决中

 回到顶部
帅哥哟,离线,有人找我吗?
fly
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:5082 积分:17642 威望:0 精华:6 注册:2010/7/15 9:05:58
  发帖心情 Post By:2011/11/24 10:23:39 [只看该作者]

SP(BUYVOL);

BP(SELLVOL);
这两个是什么意思,

 

BK(1);--是买开仓?



金字塔—专业程序化交易量化投资平台

客户服务部

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

欢迎您参加我公司的技术培训,具体培训需求请发邮件到

service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com

 回到顶部
帅哥哟,离线,有人找我吗?
26327756l
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:黑侠 帖子:676 积分:2548 威望:0 精华:3 注册:2011/4/13 16:18:50
  发帖心情 Post By:2011/11/24 11:02:36 [只看该作者]

仅供参考

ss:=REFDATE(CLOSE,date,092900);
if time=095900 then
begin
buy(holding=0 and C<=ss+17.03,1,market);
buyshort(holding=0 and C>=ss-17.03,0,market);
end
ss:=REFDATE(CLOSE,date,095900);
if time=101300 then
begin
sellshort(holding<0 and  C>=ss-17.03,0,market);
sell(holding>0 and C<=ss+17.03,0,market);
buy(holding=0 and C<=ss+17.03,1,market);
buyshort(holding=0 and C>=ss-17.03,1,market);
end
ss:=REFDATE(CLOSE,date,101300);
if time=105900 then
begin
sellshort(holding<0 and  C>=ss-17.03,0,market);
sell(holding>0 and C<=ss+17.03,0,market);
buy(holding=0 and C<=ss+17.03,1,market);
buyshort(holding=0 and C>=ss-17.03,1,market);
end
ss:=REFDATE(CLOSE,date,105900);
if time=112800 then
begin
sellshort(holding<0 and  C>=ss-17.03,0,market);
sell(holding>0 and C<=ss+17.03,0,market);
buy(holding=0 and C<=ss+17.03,1,market);
buyshort(holding=0 and C>=ss-17.03,1,market);
end
ss:=REFDATE(CLOSE,date,112800);
if time=135900 then
begin
sellshort(holding<0 and  C>=ss-17.03,0,market);
sell(holding>0 and C<=ss+17.03,0,market);
buy(holding=0 and C<=ss+17.03,1,market);
buyshort(holding=0 and C>=ss-17.03,1,market);
end
ss:=REFDATE(CLOSE,date,135900);
if time=142900 then
begin
sellshort(holding<0 and  C>=ss-17.03,0,market);
sell(holding>0 and C<=ss+17.03,0,market);
buy(holding=0 and C<=ss+17.03,1,market);
buyshort(holding=0 and C>=ss-17.03,1,market);
end

if time=145800 then
begin
sellshort(holding<0 ,0,market);
sell(holding>0 ,0,market);
end


 回到顶部
帅哥哟,离线,有人找我吗?
victior
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:27 积分:82 威望:0 精华:0 注册:2010/10/3 21:13:35
  发帖心情 Post By:2011/11/26 9:34:30 [只看该作者]

以下是引用fly在2011-11-24 10:23:39的发言:

SP(BUYVOL);

BP(SELLVOL);
这两个是什么意思,

 

BK(1);--是买开仓?

SP(BUYVOL)=平多头仓位 BP(SELLVOL)=平空头仓位 BK(1),开一手仓位,是文华WH3的语句~

 回到顶部
帅哥哟,离线,有人找我吗?
victior
  6楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:27 积分:82 威望:0 精华:0 注册:2010/10/3 21:13:35
  发帖心情 Post By:2011/11/26 9:34:44 [只看该作者]

谢谢楼上几个好心人!!!

 回到顶部
帅哥哟,离线,有人找我吗?
fly
  7楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:5082 积分:17642 威望:0 精华:6 注册:2010/7/15 9:05:58
  发帖心情 Post By:2011/11/28 15:19:45 [只看该作者]

BUYVOL这个,按我的理解是---主动性买单量,不知是否正确?????

SP(BUYVOL),我知道是平多头仓位,但是里面含的这个参数BUYVOL,不知道什么意思

                   是按对手价平多头仓???



金字塔—专业程序化交易量化投资平台

客户服务部

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

欢迎您参加我公司的技术培训,具体培训需求请发邮件到

service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com

 回到顶部
帅哥哟,离线,有人找我吗?
victior
  8楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:27 积分:82 威望:0 精华:0 注册:2010/10/3 21:13:35
  发帖心情 Post By:2011/11/29 21:26:58 [只看该作者]

以下是引用26327756l在2011-11-24 11:02:36的发言:

仅供参考

ss:=REFDATE(CLOSE,date,092900);
if time=095900 then
begin
buy(holding=0 and C<=ss+17.03,1,market);
buyshort(holding=0 and C>=ss-17.03,0,market);
end
ss:=REFDATE(CLOSE,date,095900);
if time=101300 then
begin
sellshort(holding<0 and  C>=ss-17.03,0,market);
sell(holding>0 and C<=ss+17.03,0,market);
buy(holding=0 and C<=ss+17.03,1,market);
buyshort(holding=0 and C>=ss-17.03,1,market);
end
ss:=REFDATE(CLOSE,date,101300);
if time=105900 then
begin
sellshort(holding<0 and  C>=ss-17.03,0,market);
sell(holding>0 and C<=ss+17.03,0,market);
buy(holding=0 and C<=ss+17.03,1,market);
buyshort(holding=0 and C>=ss-17.03,1,market);
end
ss:=REFDATE(CLOSE,date,105900);
if time=112800 then
begin
sellshort(holding<0 and  C>=ss-17.03,0,market);
sell(holding>0 and C<=ss+17.03,0,market);
buy(holding=0 and C<=ss+17.03,1,market);
buyshort(holding=0 and C>=ss-17.03,1,market);
end
ss:=REFDATE(CLOSE,date,112800);
if time=135900 then
begin
sellshort(holding<0 and  C>=ss-17.03,0,market);
sell(holding>0 and C<=ss+17.03,0,market);
buy(holding=0 and C<=ss+17.03,1,market);
buyshort(holding=0 and C>=ss-17.03,1,market);
end
ss:=REFDATE(CLOSE,date,135900);
if time=142900 then
begin
sellshort(holding<0 and  C>=ss-17.03,0,market);
sell(holding>0 and C<=ss+17.03,0,market);
buy(holding=0 and C<=ss+17.03,1,market);
buyshort(holding=0 and C>=ss-17.03,1,market);
end

if time=145800 then
begin
sellshort(holding<0 ,0,market);
sell(holding>0 ,0,market);
end

请教,你这个的在9:59的开仓,为什么不是只开一手呢?


 回到顶部
帅哥哟,离线,有人找我吗?
蔡宛宏
  9楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:论坛游民 帖子:129 积分:473 威望:0 精华:0 注册:2011/12/6 14:06:35
  发帖心情 Post By:2011/12/19 16:53:30 [只看该作者]

时间过滤的模型 不知道效果怎么样

 回到顶部