通達信轉金字塔
作者:金字塔 來源:cxh99.com 發布時間:2021年03月30日
-
咨詢內容:
老師你好,請將下面通達信副圖指標改為金字塔指標,謝謝
ZLCM:=EMA(WINNER(CLOSE)*70,3);{//主力籌碼估算}
SHCM:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);{//小籌碼估算}
ZSHTL:=SHCM/(ZLCM+SHCM)*100;{//小股民套牢籌碼比率}
ZZLKP:=ZLCM/(ZLCM+SHCM)*100;{//主力控盤籌碼比率}
ZCMZL:=MA(ZLCM+SHCM,13);{//市場籌碼總量}
ZZNTS:=BARSLAST(ZSHTL<90 AND REF(ZSHTL,1)>90);{//走牛天數}
ZSHJJ:=EMA(ZSHTL,89);{//小股民警戒}
ZZLJJ:=EMA(ZZLKP,89);{//主力警戒}
ZJLRQD:=INTPART(ZZLKP-ZZLJJ);{//資金流入強度}
SH8:=EMA(ZSHTL,8);
?DKB:=IF(ZZLKP-REF(ZZLKP,1)>ZSHTL-REF(ZSHTL,1),1,0);
?
?{//------【數值顯示】}
散戶套牢系數:INTPART(ZSHTL),NODRAW;
主力控盤系數:INTPART(ZZLKP),COLOR4080FF,NODRAW;
資金流入強度:ZJLRQD,NODRAW,COLOR00FFFF;
?
{☆精確風險}
?{【參數定義】}
RSV:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;
?K1:=SMA(RSV,10,1);
?D1:=SMA(K1,5,1);
?KK:=INTPART(K1);
?DD0:=INTPART(D1);
?TFXXS:=KK+DD0;{//變異KD風險系數}
TGLD:=MOD(TFXXS,10);{//踏浪漲停概率點}
TGLXS:=(TFXXS-REF(TFXXS,1))*10;{//變異KD乖離系數}
TYCFX:=TFXXS+TGLXS;{//變異KD預測風險}
乖離系數:TGLXS,LINETHICK0,COLORGREEN,NODRAW;
?{【圖解模板】}
?{級別拐點}
?{乖離系數}
STICKLINE(TGLXS>0,100,100+TGLXS,3,0),COLOR000088;
?STICKLINE(TGLXS>0,100,100+TGLXS,2.5,0),COLOR000099;
?STICKLINE(TGLXS>0,100,100+TGLXS,2,0),COLOR0000AA;
?STICKLINE(TGLXS>0,100,100+TGLXS,1.5,0),COLOR0000BB;
?{STICKLINE(TGLXS>0,100,100+TGLXS,1.2,0),COLOR0000CC;}
?STICKLINE(TGLXS>0,100,100+TGLXS,1.0,0),COLOR0000DD;
?{STICKLINE(TGLXS>0,100,100+TGLXS,0.8,0),COLOR0000EE;}
?STICKLINE(TGLXS>0,100,100+TGLXS,0.5,0),COLOR0000FF;{//紅柱}
STICKLINE(TGLXS<0,100,100+TGLXS,3,0),COLOR008800;
?{STICKLINE(TGLXS<0,100,100+TGLXS,2.8,0),COLOR009900;}
?STICKLINE(TGLXS<0,100,100+TGLXS,2.5,0),COLOR00AA00;
?STICKLINE(TGLXS<0,100,100+TGLXS,2,0),COLOR00BB00;
?{STICKLINE(TGLXS<0,100,100+TGLXS,1.8,0),COLOR00CC00;}
?STICKLINE(TGLXS<0,100,100+TGLXS,1.5,0),COLOR00DD00;
?{STICKLINE(TGLXS<0,100,100+TGLXS,1.2,0),COLOR00EE00;}
?STICKLINE(TGLXS<0,100,100+TGLXS,1,0),COLOR00FF00;{//綠柱}
STICKLINE(TGLXS=0 AND REF(TGLXS,1)>=0,100,100+TGLXS,8,0),COLORRED;
?STICKLINE(TGLXS=0 AND REF(TGLXS,1)<0,100,100+TGLXS,8,0),COLORFFFFFF;
?{【數值顯示】}
風險系數:TFXXS,LINETHICK2,COLORYELLOW,NODRAW;
預測風險:TYCFX,LINETHICK1,COLORFFFFFF,NODRAW;
?T1:=CONST( ZCMZL>REF(ZCMZL,1) AND DKB=1);
?T2:=CONST( ZCMZL>REF(ZCMZL,1) AND DKB=0);
?T3:=CONST( ZCMZL=REF(ZCMZL,1));
?T4:=CONST( ZCMZL<REF(ZCMZL,1) AND DKB=1);
?T5:=CONST( ZCMZL<REF(ZCMZL,1) AND DKB=0);
?T6:=CONST(TFXXS<=50 );
?T7:=CONST(TFXXS>=160 );
?T8:=CONST(TFXXS>50 AND TFXXS<160 AND TFXXS>=REF(TFXXS,1) AND TFXXS<=100 );
?T9:=CONST( TFXXS>50 AND TFXXS<160 AND TFXXS>=REF(TFXXS,1) AND TFXXS>100);
?T10:=CONST(TFXXS>50 AND TFXXS<160 AND TFXXS<REF(TFXXS,1) AND TFXXS>100 );
?T11:=CONST(TFXXS>50 AND TFXXS<160 AND TFXXS<REF(TFXXS,1) AND TFXXS<=100 );
?T12:=CONST( ZSHTL>90 );
?T13:=CONST( ZZLKP>75 );
?T14:=CONST(CROSS(ZCMZL,ZZLJJ) AND ZZLKP>ZZLJJ AND ZZLKP>10 AND ZZLJJ>REF(ZZLJJ,1) AND ZCMZL>REF(ZCMZL,1) );
?T15:=CONST(CROSS(ZCMZL,ZZLKP) AND ZZLKP>ZZLJJ AND ZZLKP<ZSHTL AND ZZLKP>10 AND ZZLJJ>REF(ZZLJJ,1) AND ZCMZL>REF(ZCMZL,1) );
?T16:=CONST( CROSS(ZCMZL,ZSHTL) AND ZSHTL>ZZLKP AND ZCMZL>REF(ZCMZL,1));
?T17:=CONST( CROSS(ZCMZL,100) AND ZCMZL>REF(ZCMZL,1));
?T18:=CONST(REF(ZSHTL,1)>90 AND ZSHTL<90 );
?TS1:=IF(T1=1,0+0.03,0);
?TS2:=IF(T2=1,TS1+0.03,TS1);
?TS3:=IF(T3=1,TS2+0.03,TS2);
?TS4:=IF(T4=1,TS3+0.03,TS3);
?TS5:=IF(T5=1,TS4+0.03,TS4);
?TS6:=IF(T6=1,0+0.73,0);
?TS7:=IF(T7=1,TS6+0.03,TS6);
?TS8:=IF(T8=1,TS7+0.03,TS7);
?TS9:=IF(T9=1,TS8+0.03,TS8);
?TS10:=IF(T10=1,TS9+0.03,TS9);
?TS11:=IF(T11=1,TS10+0.03,TS10);
?TS12:=IF(T12,0+0.03,0);
?TS13:=IF(T13=1,TS12+0.03,TS12);
?TS14:=IF(T14=1,TS13+0.03,TS13);
?TS15:=IF(T15=1,TS14+0.03,TS14);
?TS16:=IF(T16=1,TS15+0.03,TS15);
?TS17:=IF(T17=1,TS16+0.03,TS16);
?TS18:=IF(T8=1,TS17+0.03,TS17);
三日最低:=EMA((REF(L,4)+REF(L,3)+REF(L,2))/3,3);?
三日最高:=EMA((REF(H,4)+REF(H,3)+REF(H,2))/3,3),COLORWHITE;?
高:=CROSS(CROSS(三日最高,C),0.6),STICK,COLORWHITE;
DRAWICON(高>0,高,2);?
F:=100*(C-REF(C,1))/REF(C,1);
博爾:=IF(C<REF(O,1) AND F<0,1,0);
P1:=博爾;
量化:=IF(C<REF(O,2) AND F<0,1,0);
P2:=量化;
P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1,STICK,COLORFF00FF,LINETHICK1;
DRAWICON(P1=0>0,P1=0,1);?
量:V,VOLSTICK;
PJJ:=DMA((((HIGH + LOW) + (CLOSE * 2)) / 4),0.9);
JJ:=REF(EMA(PJJ,3),1);
QJJ:=(VOL / (((HIGH - LOW) * 2) - ABS((CLOSE - OPEN)))); XVL:=(IF((CLOSE > OPEN),(QJJ * (HIGH - LOW)),IF((CLOSE < OPEN),(QJJ * ((HIGH - OPEN) + (CLOSE - LOW))),(VOL / 2))) + IF((CLOSE > OPEN)
,(0 - (QJJ * ((HIGH - CLOSE) + (OPEN - LOW)))),IF((CLOSE < OPEN),(0 - (QJJ * (HIGH - LOW))),(0 - (VOL / 2)))));
ZLL:=(VOL / CAPITAL);
HSL1:=IF((ZLL > 10),10,ZLL);
HSL:=((XVL / 20) / 1.15);?
進攻流量:=(((HSL * 0.55) + (REF(HSL,1) * 0.33)) + (REF(HSL,2) * 0.22));
GJJ:=EMA(進攻流量,8); LLJX:=EMA(進攻流量,3);
動態天量:=CONST(IF(V=HHV(V,20),V,REF(V,BARSLAST(V=HHV(V,20))))),COLOR00FF00,POINTDOT;
STICKLINE(((HSL * 0.4) >= 0),動態天量+((HSL * 0.4) +LLJX)*20,動態天量,3,0),COLORYELLOW;
STICKLINE(((HSL * 0.4) < 0),動態天量+((HSL * 0.4) +LLJX)*20,動態天量,3,0),COLOR00FF00;
資金流入:=IF((HSL*0.4+LLJX)>0,(HSL*0.4+LLJX),DRAWNULL),COLORRED;
資金流出:=IF((HSL*0.4+LLJX)<0,(HSL*0.4+LLJX),DRAWNULL),COLOR00FF00;
資金收支:=(HSL*0.4+LLJX),LINETHICK0;
萬元:=AMOUNT/10000{0000},VOLSTICK,COLORFF00FF;
資金凈收支:IF((HSL*0.4+LLJX)>0,資金流入,資金流出),COLORWHITE,POINTDOT;
收支比例%:IF((HSL*0.4+LLJX)>0,資金流入/萬元*100,資金流出/萬元*100),COLORYELLOW;
連紅天1:=BARSLASTCOUNT(資金凈收支>0),,COLORA20FFD,NODRAW;
連紅天2:=IF(連紅天1=0,REF(連紅天1,1),連紅天1),,COLORA20FFD,NODRAW;
連紅天3:=IF(連紅天2=0,REF(連紅天1,2),連紅天2),,COLORA20FFD,NODRAW;
連紅天4:=IF(連紅天3=0,REF(連紅天1,3),連紅天3),,COLORA20FFD,NODRAW;
近期連紅天:IF(連紅天4=0,REF(連紅天1,4),連紅天4),COLORYELLOW,NODRAW;?
三日資金:SUM(資金收支,3),COLORWHITE,NODRAW;
五日資金:SUM(資金收支,5),COLORFF00FF,NODRAW;?
十日資金:SUM(資金收支,10),COLOR0000FF,NODRAW;
資金流量:=LLJX,LINETHICK0,COLOR0000FF;
STICKLINE((資金流量 > 0),動態天量+資金流量*20,動態天量,3,0),COLOR0000FF;
STICKLINE((資金流量 < 0),動態天量+資金流量*20,動態天量,3,0),COLOR008000;
萬手:VOL/10000,LINETHICK0;?
BB:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));?
TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,TOTALFZNUM,1)))));
MTIME:=MOD(FROMOPEN,TOTAL);
CTIME:=IF(MTIME<0.5,TOTAL,MTIME);
VVOL:IF(CURRBARSCOUNT=1,VOL*TOTAL/CTIME,DRAWNULL),NODRAW;
STICKLINE(CURRBARSCOUNT=1,VVOL,0,-1,-1),COLOR00C0C0;
?
-
金字塔客服:
?抱歉,這段代碼里面部分函數轉換存在一些矛盾的地方。因此無法進行轉換。金字塔里面實現BARSLASTCOUNT? 必然無法使用CONST函數。