等级: 免费版
- 注册:
- 2023-2-6
- 曾用名:
|
通达信原来的代码有未来函数,经测试把未来函数删除了,可以运行。请老师转换成金字塔图表的开平仓程序。
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); |
|