金字塔决策交易系统

 找回密码
 

微信登录

微信扫一扫,快速登录

搜索
楼主: 代人发帖

把这个指标转化成金字塔指标,并且出现红柱开多仓

[复制链接]

32

主题

1614

帖子

1614

积分

等级: 免费版

注册:
2021-6-5
曾用名:
发表于 2023-9-3 09:08 | 显示全部楼层
九里漂移 发表于 2023-9-1 22:41
28楼,你这个是怎么实现的

其实那个金字塔没有的函数是无效代码除去即可
回复

使用道具 举报

7

主题

83

帖子

83

积分

等级: 免费版

注册:
2023-2-6
曾用名:
发表于 2023-9-4 10:05 来自手机 | 显示全部楼层
31楼,把这个函数去掉,能直接导入金字塔吗
回复

使用道具 举报

7

主题

83

帖子

83

积分

等级: 免费版

注册:
2023-2-6
曾用名:
发表于 2023-9-5 07:58 来自手机 | 显示全部楼层
X_12=1 AND X_14=0; X_35:=CROSS(HIGH,ZK1) AND X_13=1; X_36:=CROSS(ZD1,LOW) AND X_13=1 AND X_14=0; X_37:=CROSS(ZD1,LOW) AND X_14=1; X_38:=CROSS(HIGH,ZK1) AND X_14=1; DRAWTEXT(ISLASTBAR,ZK1,36),COLORWHITE; DRAWTEXT(ISLASTBAR,ZD1,37),COLORWHITE; DRAWTEXT(ISLASTBAR,BS,38),COLORRED; DRAWTEXT(ISLASTBAR,BD,39),COLORGREEN; X_39:=(LARGEINTRDVOL-LARGEOUTTRDVOL)*10000/FINANCE(7); X_40:=IF(TRADENUM>0,(TRADEOUTNUM-TRADEINNUM)*100/TRADENUM,0); X_41:=IF(TRADENUM>0,(LARGETRDINNUM-LARGETRDOUTNUM)/TRADENUM*100,0); X_42:=X_41*7; X_43:=X_41*3; X_44:=LARGEINTRDVOL-LARGEOUTTRDVOL; X_45:=(LARGEINTRDVOL-LARGEOUTTRDVOL)*AMOUNT/VOL/10000; X_46:=LARGEINTRDVOL*100/VOL; X_47:=LARGEOUTTRDVOL*100/VOL;
回复

使用道具 举报

7

主题

83

帖子

83

积分

等级: 免费版

注册:
2023-2-6
曾用名:
发表于 2023-9-5 08:00 来自手机 | 显示全部楼层
稍等不全
回复

使用道具 举报

7

主题

83

帖子

83

积分

等级: 免费版

注册:
2023-2-6
曾用名:
发表于 2023-9-5 08:06 来自手机 | 显示全部楼层
老师请把这个指标转换成金字塔交易指标,笑脸开多,哭脸开空。并且开仓手数可以更改
回复

使用道具 举报

7

主题

83

帖子

83

积分

等级: 免费版

注册:
2023-2-6
曾用名:
发表于 2023-9-5 08:07 来自手机 | 显示全部楼层
X_1:=(20*HIGH+19*REF(HIGH,1)+18*REF(HIGH,2)+17*REF(HIGH,3)+16*REF(HIGH,4)+15*REF(HIGH,5)+14*REF(HIGH,6)+13*REF(HIGH,7)+12*REF(HIGH,8)+11*REF(HIGH,9)+10*REF(HIGH,10)+9*REF(HIGH,11)+8*REF(HIGH,12)+7*REF(HIGH,13)+6*REF(HIGH,14)+5*REF(HIGH,15)+4*REF(HIGH,16)+3*REF(HIGH,17)+2*REF(HIGH,18)+REF(HIGH,20))/210; X_2:=(20*LOW+19*REF(LOW,1)+18*REF(LOW,2)+17*REF(LOW,3)+16*REF(LOW,4)+15*REF(LOW,5)+14*REF(LOW,6)+13*REF(LOW,7)+12*REF(LOW,8)+11*REF(LOW,9)+10*REF(LOW,10)+9*REF(LOW,11)+8*REF(LOW,12)+7*REF(LOW,13)+6*REF(LOW,14)+5*REF(LOW,15)+4*REF(LOW,16)+3*REF(LOW,17)+2*REF(LOW,18)+REF(LOW,20))/210; X_3:=EMA(X_1,90); X_4:=EMA(X_2,90); X_5:=(20*HIGH+19*REF(HIGH,1)+18*REF(HIGH,2)+17*REF(HIGH,3)+16*REF(HIGH,4)+15*REF(HIGH,5)+14*REF(HIGH,6)+13*REF(HIGH,7)+12*REF(HIGH,8)+11*REF(HIGH,9)+10*REF(HIGH,10)+9*REF(HIGH,11)+8*REF(HIGH,12)+7*REF(HIGH,13)+6*REF(HIGH,14)+5*REF(HIGH,15)+4*REF(HIGH,16)+3*REF(HIGH,17)+2*REF(HIGH,18)+REF(HIGH,20))/210; X_6:=(20*LOW+19*REF(LOW,1)+18*REF(LOW,2)+17*REF(LOW,3)+16*REF(LOW,4)+15*REF(LOW,5)+14*REF(LOW,6)+13*REF(LOW,7)+12*REF(LOW,8)+11*REF(LOW,9)+10*REF(LOW,10)+9*REF(LOW,11)+8*REF(LOW,12)+7*REF(LOW,13)+6*REF(LOW,14)+5*REF(LOW,15)+4*REF(LOW,16)+3*REF(LOW,17)+2*REF(LOW,18)+REF(LOW,20))/210; X_7:=X_3-X_4; X_8:=X_3+X_7*2; X_9:=X_4-X_7*2; X_10:=(XMA(XMA(HIGH,25),25)-XMA(XMA(LOW,25),25))*1+XMA(XMA(HIGH,25),25); X_11:=XMA(XMA(LOW,25),25)-(XMA(XMA(HIGH,25),25)-XMA(XMA(LOW,25),25))*1; X_12:=X_11>=X_9 AND X_10>=X_8; X_13:=X_10<=X_8 AND X_11<=X_9; X_14:=X_11>=X_9 AND X_10<=X_8; X_15:=(XMA(XMA(HIGH,60),60)-XMA(XMA(LOW,60),60))*3+XMA(XMA(HIGH,60),60); X_16:=XMA(XMA(LOW,60),60)-(XMA(XMA(HIGH,60),60)-XMA(XMA(LOW,60),60))*3; STICKLINE(X_12=1,X_10,X_11,5,0),COLOR000066; STICKLINE(X_13=1,X_10,X_11,5,0),COLOR003300; STICKLINE(X_14=1,X_10,X_11,5,0),COLOR555555; ZK1:(XMA(XMA(HIGH,25),25)-XMA(XMA(LOW,25),25))*1+XMA(XMA(HIGH,25),25),DOTLINE,COLORWHITE; ZD1:XMA(XMA(LOW,25),25)-(XMA(XMA(HIGH,25),25)-XMA(XMA(LOW,25),25))*1,DOTLINE,COLORWHITE; BS:(XMA(XMA(HIGH,60),60)-XMA(XMA(LOW,60),60))*2.2+XMA(XMA(HIGH,60),60),DOTLINE,COLORRED; X_17:=XMA(XMA(LOW,25),25)-(XMA(XMA(HIGH,25),25)-XMA(XMA(LOW,25),25))*1.5; BD:XMA(XMA(LOW,60),60)-(XMA(XMA(HIGH,60),60)-XMA(XMA(LOW,60),60))*2.8,DOTLINE,COLORGREEN; X_18:=(ZK1+ZD1)/2; STICKLINE(1=1,X_3,X_4,5,0),COLORLIGRAY; X_19:=EMA(EMA(CLOSE,3)-EMA(CLOSE,6),9); X_20:=REF(X_19,1); X_21:=EMA(EMA(EMA(CLOSE,3)-EMA(CLOSE,9),3)-EMA(EMA(CLOSE,3)-EMA(CLOSE,9),9),9); X_22:=REF(X_21,1); STICKLINE(X_20<X_19 OR X_22<X_21,LOW,HIGH,0,0),COLORRED; STICKLINE(X_20<X_19 OR X_22<X_21,CLOSE,OPEN,3,1),COLORRED; STICKLINE(X_19<X_20,LOW,HIGH,0,0),COLORGREEN; STICKLINE(X_19<X_20,CLOSE,OPEN,3,1),COLORGREEN; X_23:=LOW<ZD1 AND HIGH>ZD1; X_24:=HIGH>ZK1 AND LOW<ZK1; STICKLINE(X_23=1,LOW,ZD1,3,0),COLORWHITE; STICKLINE(X_24=1,HIGH,ZK1,3,0),COLORWHITE; X_25:=HIGH<ZD1; X_26:=LOW>ZK1; STICKLINE(X_25=1,LOW,HIGH,0,0),COLORWHITE; STICKLINE(X_25=1,CLOSE,OPEN,3,0),COLORWHITE; STICKLINE(X_26=1,LOW,HIGH,0,0),COLORWHITE; STICKLINE(X_26=1,CLOSE,OPEN,3,0),COLORWHITE; X_27:=X_20<X_19 OR X_22<X_21; X_28:=X_20>X_19 OR X_22>X_21; X_29:=X_23=1 AND X_27=1; X_30:=X_24=1 AND X_28=1; STICKLINE(X_29=1,LOW,ZD1,3,0),COLORMAGENTA; STICKLINE(X_30=1,HIGH,ZK1,3,0),COLORMAGENTA; X_31:=X_25=1 AND X_27=1; X_32:=X_26=1 AND X_28=1; STICKLINE(X_31=1,LOW,HIGH,0,0),COLORMAGENTA; STICKLINE(X_31=1,CLOSE,OPEN,3,0),COLORMAGENTA; STICKLINE(X_32=1,LOW,HIGH,0,0),COLORMAGENTA; STICKLINE(X_32=1,CLOSE,OPEN,3,0),COLORMAGENTA; X_33:=CROSS(ZD1,LOW) AND X_12=1; X_34:=CROSS(HIGH,ZK1) AND X_12=1 AND X_14=0; X_35:=CROSS(HIGH,ZK1) AND X_13=1; X_36:=CROSS(ZD1,LOW) AND X_13=1 AND X_14=0; X_37:=CROSS(ZD1,LOW) AND X_14=1; X_38:=CROSS(HIGH,ZK1) AND X_14=1; DRAWTEXT(ISLASTBAR,ZK1,36),COLORWHITE; DRAWTEXT(ISLASTBAR,ZD1,37),COLORWHITE; DRAWTEXT(ISLASTBAR,BS,38),COLORRED; DRAWTEXT(ISLASTBAR,BD,39),COLORGREEN; X_39:=(LARGEINTRDVOL-LARGEOUTTRDVOL)*10000/FINANCE(7); X_40:=IF(TRADENUM>0,(TRADEOUTNUM-TRADEINNUM)*100/TRADENUM,0); X_41:=IF(TRADENUM>0,(LARGETRDINNUM-LARGETRDOUTNUM)/TRADENUM*100,0); X_42:=X_41*7; X_43:=X_41*3; X_44:=LARGEINTRDVOL-LARGEOUTTRDVOL; X_45:=(LARGEINTRDVOL-LARGEOUTTRDVOL)*AMOUNT/VOL/10000; X_46:=LARGEINTRDVOL*100/VOL; X_47:=LARGEOUTTRDVOL*100/VOL;   X_57:=X_39>0 AND X_40>0 AND X_42>0 AND X_43>0 AND X_44>0 AND X_45>0 AND X_46>X_47; STICKLINE(X_57=1 AND HIGH-CLOSE<CLOSE-LOW,LOW,HIGH,0,0),COLORRED; STICKLINE(X_57=1 AND HIGH-CLOSE<CLOSE-LOW,CLOSE,OPEN,3,0),COLORRED; DRAWICON(X_36=1,LOW,3); DRAWICON(X_34=1,HIGH,4); DRAWICON(X_33=1 OR X_37=1,LOW,3); DRAWICON(X_35=1 OR X_38=1,HIGH,4);
回复

使用道具 举报

20

主题

1万

帖子

1万

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
FireScript
发表于 2023-9-5 08:32 | 显示全部楼层
麻烦先把代码格式整理好再发上来。这种代码直接一堆丢上来,我们根本没法看。
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

7

主题

83

帖子

83

积分

等级: 免费版

注册:
2023-2-6
曾用名:
发表于 2023-9-5 13:01 来自手机 | 显示全部楼层
好的
回复

使用道具 举报

7

主题

83

帖子

83

积分

等级: 免费版

注册:
2023-2-6
曾用名:
发表于 2023-9-7 10:50 | 显示全部楼层
通达信原来的代码有未来函数,经测试把未来函数删除了,可以运行。请老师转换成金字塔图表的开平仓程序。





X_1:=(20*HIGH+19*REF(HIGH,1)+18*REF(HIGH,2)+17*REF(HIGH,3)+16*REF(HIGH,4)+15*REF(HIGH,5)+14*REF(HIGH,6)+13*REF(HIGH,7)+12*REF(HIGH,8)+11*REF(HIGH,9)+10*REF(HIGH,10)+9*REF(HIGH,11)+8*REF(HIGH,12)+7*REF(HIGH,13)+6*REF(HIGH,14)+5*REF(HIGH,15)+4*REF(HIGH,16)+3*REF(HIGH,17)+2*REF(HIGH,18)+REF(HIGH,20))/210;

X_2:=(20*LOW+19*REF(LOW,1)+18*REF(LOW,2)+17*REF(LOW,3)+16*REF(LOW,4)+15*REF(LOW,5)+14*REF(LOW,6)+13*REF(LOW,7)+12*REF(LOW,8)+11*REF(LOW,9)+10*REF(LOW,10)+9*REF(LOW,11)+8*REF(LOW,12)+7*REF(LOW,13)+6*REF(LOW,14)+5*REF(LOW,15)+4*REF(LOW,16)+3*REF(LOW,17)+2*REF(LOW,18)+REF(LOW,20))/210;
X_3:=EMA(X_1,90);

X_4:=EMA(X_2,90);

X_5:=(20*HIGH+19*REF(HIGH,1)+18*REF(HIGH,2)+17*REF(HIGH,3)+16*REF(HIGH,4)+15*REF(HIGH,5)+14*REF(HIGH,6)+13*REF(HIGH,7)+12*REF(HIGH,8)+11*REF(HIGH,9)+10*REF(HIGH,10)+9*REF(HIGH,11)+8*REF(HIGH,12)+7*REF(HIGH,13)+6*REF(HIGH,14)+5*REF(HIGH,15)+4*REF(HIGH,16)+3*REF(HIGH,17)+2*REF(HIGH,18)+REF(HIGH,20))/210;

X_6:=(20*LOW+19*REF(LOW,1)+18*REF(LOW,2)+17*REF(LOW,3)+16*REF(LOW,4)+15*REF(LOW,5)+14*REF(LOW,6)+13*REF(LOW,7)+12*REF(LOW,8)+11*REF(LOW,9)+10*REF(LOW,10)+9*REF(LOW,11)+8*REF(LOW,12)+7*REF(LOW,13)+6*REF(LOW,14)+5*REF(LOW,15)+4*REF(LOW,16)+3*REF(LOW,17)+2*REF(LOW,18)+REF(LOW,20))/210;
X_7:=X_3-X_4;
X_8:=X_3+X_7*2;
X_9:=X_4-X_7*2;
X_10:=(XMA(XMA(HIGH,25),25)-XMA(XMA(LOW,25),25))*1+XMA(XMA(HIGH,25),25);
X_11:=XMA(XMA(LOW,25),25)-(XMA(XMA(HIGH,25),25)-XMA(XMA(LOW,25),25))*1;
X_12:=X_11>=X_9 AND X_10>=X_8;
X_13:=X_10<=X_8 AND X_11<=X_9;
X_14:=X_11>=X_9 AND X_10<=X_8;
X_15:=(XMA(XMA(HIGH,60),60)-XMA(XMA(LOW,60),60))*3+XMA(XMA(HIGH,60),60);
X_16:=XMA(XMA(LOW,60),60)-(XMA(XMA(HIGH,60),60)-XMA(XMA(LOW,60),60))*3; STICKLINE(X_12=1,X_10,X_11,5,0),COLOR000066; STICKLINE(X_13=1,X_10,X_11,5,0),COLOR003300; STICKLINE(X_14=1,X_10,X_11,5,0),COLOR555555; ZK1:(XMA(XMA(HIGH,25),25)-XMA(XMA(LOW,25),25))*1+XMA(XMA(HIGH,25),25),DOTLINE,COLORWHITE; ZD1:XMA(XMA(LOW,25),25)-(XMA(XMA(HIGH,25),25)-XMA(XMA(LOW,25),25))*1,DOTLINE,COLORWHITE; BS:(XMA(XMA(HIGH,60),60)-XMA(XMA(LOW,60),60))*2.2+XMA(XMA(HIGH,60),60),DOTLINE,COLORRED;
X_17:=XMA(XMA(LOW,25),25)-(XMA(XMA(HIGH,25),25)-XMA(XMA(LOW,25),25))*1.5; BD:XMA(XMA(LOW,60),60)-(XMA(XMA(HIGH,60),60)-XMA(XMA(LOW,60),60))*2.8,DOTLINE,COLORGREEN;

X_18:=(ZK1+ZD1)/2; STICKLINE(1=1,X_3,X_4,5,0),COLORLIGRAY;

X_19:=EMA(EMA(CLOSE,3)-EMA(CLOSE,6),9);

X_20:=REF(X_19,1);

X_21:=EMA(EMA(EMA(CLOSE,3)-EMA(CLOSE,9),3)-EMA(EMA(CLOSE,3)-EMA(CLOSE,9),9),9);

X_22:=REF(X_21,1); STICKLINE(X_20<X_19 OR X_22<X_21,LOW,HIGH,0,0),COLORRED; STICKLINE(X_20<X_19 OR X_22<X_21,CLOSE,OPEN,3,1),COLORRED; STICKLINE(X_19<X_20,LOW,HIGH,0,0),COLORGREEN; STICKLINE(X_19<X_20,CLOSE,OPEN,3,1),COLORGREEN;

X_23:=LOW<ZD1 AND HIGH>ZD1;

X_24:=HIGH>ZK1 AND LOW<ZK1; STICKLINE(X_23=1,LOW,ZD1,3,0),COLORWHITE; STICKLINE(X_24=1,HIGH,ZK1,3,0),COLORWHITE;

X_25:=HIGH<ZD1;

X_26:=LOW>ZK1; STICKLINE(X_25=1,LOW,HIGH,0,0),COLORWHITE; STICKLINE(X_25=1,CLOSE,OPEN,3,0),COLORWHITE; STICKLINE(X_26=1,LOW,HIGH,0,0),COLORWHITE; STICKLINE(X_26=1,CLOSE,OPEN,3,0),COLORWHITE;

X_27:=X_20<X_19 OR X_22<X_21;

X_28:=X_20>X_19 OR X_22>X_21;

X_29:=X_23=1 AND X_27=1;

X_30:=X_24=1 AND X_28=1; STICKLINE(X_29=1,LOW,ZD1,3,0),COLORMAGENTA; STICKLINE(X_30=1,HIGH,ZK1,3,0),COLORMAGENTA;

X_31:=X_25=1 AND X_27=1;

X_32:=X_26=1 AND X_28=1; STICKLINE(X_31=1,LOW,HIGH,0,0),COLORMAGENTA; STICKLINE(X_31=1,CLOSE,OPEN,3,0),COLORMAGENTA; STICKLINE(X_32=1,LOW,HIGH,0,0),COLORMAGENTA; STICKLINE(X_32=1,CLOSE,OPEN,3,0),COLORMAGENTA;

X_33:=CROSS(ZD1,LOW) AND X_12=1;

X_34:=CROSS(HIGH,ZK1) AND X_12=1 AND X_14=0;

X_35:=CROSS(HIGH,ZK1) AND X_13=1;

X_36:=CROSS(ZD1,LOW) AND X_13=1 AND X_14=0;

X_37:=CROSS(ZD1,LOW) AND X_14=1;

X_38:=CROSS(HIGH,ZK1) AND X_14=1; DRAWTEXT(ISLASTBAR,ZK1,36),COLORWHITE; DRAWTEXT(ISLASTBAR,ZD1,37),COLORWHITE; DRAWTEXT(ISLASTBAR,BS,38),COLORRED; DRAWTEXT(ISLASTBAR,BD,39),COLORGREEN;

X_39:=(LARGEINTRDVOL-LARGEOUTTRDVOL)*10000/FINANCE(7);

X_40:=IF(TRADENUM>0,(TRADEOUTNUM-TRADEINNUM)*100/TRADENUM,0);

X_41:=IF(TRADENUM>0,(LARGETRDINNUM-LARGETRDOUTNUM)/TRADENUM*100,0);

X_42:=X_41*7;

X_43:=X_41*3;

X_44:=LARGEINTRDVOL-LARGEOUTTRDVOL;

X_45:=(LARGEINTRDVOL-LARGEOUTTRDVOL)*AMOUNT/VOL/10000;

X_46:=LARGEINTRDVOL*100/VOL;

X_47:=LARGEOUTTRDVOL*100/VOL;  

X_57:=X_39>0 AND X_40>0 AND X_42>0 AND X_43>0 AND X_44>0 AND X_45>0 AND X_46>X_47; STICKLINE(X_57=1 AND HIGH-CLOSE<CLOSE-LOW,LOW,HIGH,0,0),COLORRED; STICKLINE(X_57=1 AND HIGH-CLOSE<CLOSE-LOW,CLOSE,OPEN,3,0),COLORRED; DRAWICON(X_36=1,LOW,3); DRAWICON(X_34=1,HIGH,4); DRAWICON(X_33=1 OR X_37=1,LOW,3); DRAWICON(X_35=1 OR X_38=1,HIGH,4);
回复

使用道具 举报

20

主题

1万

帖子

1万

积分

Rank: 8Rank: 8

等级: 超级版主

注册:
2021-5-18
曾用名:
FireScript
发表于 2023-9-7 10:56 | 显示全部楼层
看了下改不了,XMA 本身就是未来计算的逻辑在里面, 你这里用到了很多。无法在交易指标中使用这个函数。

另外 LARGEINTRDVOL 函数没有对应函数,它是通达信 在特定版本上才有效的一个函数。
金字塔提供一对一VIP专业技术指导服务,技术团队实时响应您的日常使用问题与策略编写。联系电话:021-20339086
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 微信登录

本版积分规则

手机版|小黑屋|上海金之塔信息技术有限公司 ( 沪ICP备13035422号 )

GMT+8, 2024-12-22 19:06 , Processed in 0.224490 second(s), 20 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表