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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 求改写金字塔模型

   

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


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

主题:求改写金字塔模型

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2015/12/14 14:03:54    Post IP:58.246.57.26[显示全部帖子]

C>=BKPRICE+3&&C<=BKPRICE+5&&(CROSSDOWN(C,BKPRICE+1)),SP;
C>=BKPRICE+6&&C<=BKPRICE+7&&(CROSSDOWN(C,BKPRICE+3)),SP;
C>=BKPRICE+8&&C<=BKPRICE+9&&(CROSSDOWN(C,BKPRICE+5)),SP;
C>=BKPRICE+10&&(CROSSDOWN(C,H1-3)||EVERY(C<H1,2)),SP;
C<=SKPRICE-3&&C>=SKPRICE-5&&(CROSS(C,SKPRICE-1)),BP;
C<=SKPRICE-6&&C>=SKPRICE-7&&(CROSS(C,SKPRICE-3)),BP;
C<=SKPRICE-8&&C>=SKPRICE-9&&(CROSS(C,SKPRICE-5)),BP;
C<=SKPRICE-10&&(CROSS(C,H1+3)||EVERY(C>H1,2)),BP;

BKHIGH>BKPRICE+20&&BKHIGH<BKPRICE+23&&CROSSDOWN(C,BKPRICE-2),SP;
SKLOW<SKPRICE-20&&SKLOW>SKPRICE-23&&CROSS(C,SKPRICE+2),BP;
15:15前2分钟,若无亏损,立即平仓

 

上述语句编写澄金字塔的代码为:

if c>=enterprice+3 and c<=enterprice+5 and cross(enterprice+1,c) then sell(1,0,market);

if c>=enterprice+6 and c<=enterprice+7 and cross(enterprice+3,c) then sell(1,0,market);

if c>=enterprice+8 and c<=enterprice+9 and cross(enterprice+5,c) then sell(1,0,market);
if c<=enterprice-3 and c>=enterprice-5 and cross(c,enterprice-1) then sellshort(1,0,market);

if c<=enterprice-6 and c>=enterprice-7 and cross(c,enterprice-3) then sellshort(1,0,market);

if c<=enterprice-38 and c>=enterprice-9and cross(c,enterprice-5) then sellshort(1,0,market);

if hhv(h,enterbars+1)>enterprice+20 and hhv(h,enterbars+1)+23 and cross(enterprice-2,close) then sell(1,0,market);

if llv(l,enterbars+1)<enterprice-20 and llv(l,enterbars+1)-23 and cross(c,enterprice+2) then sellshort(1,0,market);

if openprofit>=0 and time0>=timetot0(closetime(0))-60*2 then begin

    sell(1,0,market);

    sellshort(1,0,market);

end


 



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

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2015/12/16 13:12:22    Post IP:58.246.57.26[显示全部帖子]

说明你讲的这些条件都不能成立


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

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2015/12/16 14:11:19    Post IP:58.246.57.26[显示全部帖子]

if c>=enterprice+3 and c<=enterprice+5 and cross(enterprice+1,c) then sell(1,0,market);
if c>=enterprice+6 and c<=enterprice+7 and cross(enterprice+3,c) then sell(1,0,market);
if c>=enterprice+8 and c<=enterprice+9 and cross(enterprice+5,c) then sell(1,0,market);
if c<=enterprice-3 and c>=enterprice-5 and cross(c,enterprice-1) then sellshort(1,0,market);
if c<=enterprice-6 and c>=enterprice-7 and cross(c,enterprice-3) then sellshort(1,0,market);
if c<=enterprice-3 and c>=enterprice-9 and cross(c,enterprice-5) then sellshort(1,0,market);
if hhv(h,enterbars+1)>enterprice+20 and hhv(h,enterbars+1)<enterprice+23 and cross(enterprice-2,close) then sell(1,0,market);
if llv(l,enterbars+1)<enterprice-20 and llv(l,enterbars+1)>enterprice-23 and cross(c,enterprice+2) then sellshort(1,0,market);
if openprofit>=0 and time0>=timetot0(closetime(0))-60*2 then begin
    sell(1,0,market);
    sellshort(1,0,market);
end



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

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2015/12/16 14:11:33    Post IP:58.246.57.26[显示全部帖子]

如果还没有信号,请发全部完整的代码


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

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2015/12/16 15:50:08    Post IP:58.246.57.26[显示全部帖子]

删掉前面的斜线就能用了


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

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2015/12/18 13:13:12    Post IP:58.246.57.26[显示全部帖子]

这些策略不是我们软件的,我们没有代码



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

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2015/12/18 15:31:59    Post IP:58.246.57.26[显示全部帖子]

这个不行,光看信号是看不出代码的



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

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2015/12/18 16:46:04    Post IP:58.246.57.26[显示全部帖子]

N:=BARSLAST(DATE<>REF(DATE,1))+1;

H1:EMA(CLOSE,8),COLORWHITE,LINETHICK1;

H2:EMA(H1,20),LINETHICK1,COLORYELLOW;

LH:=EMA(CLOSE,240),LINETHICK1;

VAR1:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;

VAR2:=SMA(VAR1,5,1);

VAR3:=SMA(VAR2,8,1);

VAR4:=CROSS(VAR2,VAR3) AND VAR3<20;

VAR5:=CLOSE>LLV(CLOSE,60)+0.3*LLV(CLOSE,60) AND VAR4;

VAR6:=IF(CLOSE>1000,VAR4,VAR5);

STICKLINE(H1>H2,H1,H2,1,0),COLORYELLOW;

STICKLINE(H1<H2,H1,H2,1,0),COLORBLUE;

DRAWICON(CROSS(H1,H2),H1,1);

DRAWICON(CROSS(H2,H1),H2,2);

sellshort(CROSS(H1,H2)&&COUNT(enterbars=1,N)<25 ,1,thisclose);

buy(CROSS(H1,H2)&&COUNT(ENTERBARS=1,N)<25,1,thisclose);

sell(CROSS(H2,H1)&&COUNT(enterbars=1,N)<25,1,thisclose);

buyshort(CROSS(H2,H1)&&COUNT(enterbars=1,N)<25,1,thisclose);

sell(C<ENTERPRICE-12*MINDIFF,holding,marketr);

sellshort(C>ENTERPRICE+12*MINDIFF,holding,marketr);

 if hhv(h,enterbars+1)>=enterprice+4 and hhv(h,enterbars+1)<=enterprice+9 and c<=enterprice+1 then sell(1,0,market);

if hhv(h,enterbars+1)>=enterprice+10 and hhv(h,enterbars+1)<=enterprice+14 and c<=enterprice+3 then sell(1,0,market);

if hhv(h,enterbars+1)>=enterprice+15 and hhv(h,enterbars+1)<=enterprice+19 and c<=enterprice+8 then sell(1,0,market);

if hhv(h,enterbars+1)>=enterprice+20 and hhv(h,enterbars+1)<=enterprice+22 and c<=enterprice+18 then sell(1,0,market);
if llv(l,enterbars+1)<=enterprice-4 and llv(l,enterbars+1)>=enterprice-9 and c>=enterprice-1 then sellshort(1,0,market);

if llv(l,enterbars+1)<=enterprice-10 and llv(l,enterbars+1)>=enterprice-14 and c>=enterprice-3 then sellshort(1,0,market);

if llv(l,enterbars+1)<=enterprice-15 and llv(l,enterbars+1)>=enterprice-19 and c>=enterprice-8 then sellshort(1,0,market);

if llv(l,enterbars+1)<=enterprice-20 and llv(l,enterbars+1)>=enterprice-22 and c>=enterprice-18 then sellshort(1,0,market);

if hhv(h,enterbars+1)>=enterprice+23 and close<=hhv(h,enterbars+1)-3 then sell(1,0,market);

if llv(l,enterbars+1)<=enterprice-23 and c>=llv(l,enterbars+1)+3 then sellshort(1,0,market);

if openprofit>=0 and time0>=timetot0(closetime(0))-60*2 then begin

    sell(1,0,market);

    sellshort(1,0,market);

end

[此贴子已经被作者于2015/12/18 17:01:47编辑过]


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

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2015/12/18 17:02:01    Post IP:58.246.57.26[显示全部帖子]

你可以先试试看


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

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2015/12/18 17:10:52    Post IP:58.246.57.26[显示全部帖子]

以下是引用Mikewang在2015/12/18 17:09:13的发言:
公式测评提示,下面语句有问题:


if hhv(h,enterbars+1)>=enterprice+20 and hhv(h,enterbars+1)<=enterprice+22 and cc<=enterprice+18 then sell(1,0,market);

这个刚才发的时候没有改好就发了,这里的CC改成C即可



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

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

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

 回到顶部
总数 38 1 2 3 4 下一页