【通達(dá)信】倉(cāng)位馬力指標(biāo)公式
攻城獅 2015.11.09 12:58
MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
BBI線(xiàn):=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
CPX40:=WMA(MID,40);
CPX30:=WMA(MID,30);
CPX20:=WMA(MID,20);
CPX15:=WMA(MID,15);
CPX10:=WMA(MID,10);
CPX5:=WMA(MID,5);
CPX3:=WMA(MID,3);
STZF:=(MAX(CLOSE,OPEN)/MIN(CLOSE,OPEN)-1)*100;
均STZF:=(SUM(STZF,21)-STZF)/20;
DYX:=CLOSE(均STZF*2.5));
ZNCPX3:=IFF(DYX,(6*CLOSE+2*REF(MID,1)+1*REF(MID,2))/9,CPX3);
DYKX:=CLOSE>REF(CLOSE,1) AND (100*(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)>(均STZF*2.5));
ZNCPX5:=IFF(DYKX,(6*CLOSE+2*REF(MID,1)+1*REF(MID,2))/9,CPX5);
CPMXK:=CPX20;
CPMXM:=CPX30;
CPKXM:=ZNCPX3;
CPKXK:=ZNCPX3;
UP:=CPX30>REF(CPX30,1);
DOWN:=CPX30 CPXM:=IFF(UP,CPMXK,IFF(DOWN,CPMXM,0));
CPXK:=IFF(UP,CPKXM,IFF(DOWN,CPKXK,0));
D:=CPXK> CPXM;
K:=CPXK<=CPXM;
長(zhǎng):=WMA(MID,30);
中:=WMA(MID,20);
短:=WMA(MID,10);
SXX:=短>REF(短,1) AND 中 SMX:=短>REF(短,1) AND 中>REF(中,1) AND 長(zhǎng) SML:=短>REF(短,1) AND 中>REF(中,1) AND 長(zhǎng)>REF(長(zhǎng),1);
SXL:=短>REF(短,1) AND 中REF(長(zhǎng),1);
XML:=短REF(中,1) AND 長(zhǎng)>REF(長(zhǎng),1);
XXL:=短REF(長(zhǎng),1);
XXX:=短 均線(xiàn)最大:=MAX(CPX5,MAX(CPX10,MAX(CPX20,MAX(CPX30,CPX40))));
均線(xiàn)最小:=MIN(CPX5,MIN(CPX10,MIN(CPX20,MIN(CPX30,CPX40))));
高纏繞度:=1000*(均線(xiàn)最大/均線(xiàn)最小-1)<27;
低纏繞度:=1000*(均線(xiàn)最大/均線(xiàn)最小-1)>=27;
投機(jī):=IFF(BARSSINCE(C>0)>=40,10,0);
STICKLINE(投機(jī),0,10,3.00,0),COLORBLUE,COLOR990000;
試盤(pán):=IFF(SXX,20,0);
STICKLINE(SXX,0,20,3.00,0),COLOR990000;
加倉(cāng):=IFF(SMX AND D,40,IFF(SMX AND K,20,0));
STICKLINE(SMX AND D,0,40,3.00,0),COLORYELLOW,COLOR0088FF;
STICKLINE(SMX AND K,0,20,3.00,0),COLORBLUE,COLOR990000;
重倉(cāng):=IFF(SML AND D AND 低纏繞度,90,IFF(SML AND D AND 高纏繞度,60,IFF(SML AND K,20,0)));
STICKLINE(SML AND K ,0,20,3.00,0),COLOR990000;
STICKLINE(SML AND D AND 低纏繞度,0,90,3.00,0),COLORRED,COLOR000055;
STICKLINE(SML AND D AND 高纏繞度,0,60,3.00,0),COLORYELLOW,COLOR0088FF;
高倉(cāng):=IFF(SXL AND D AND 低纏繞度,70,IFF(SXL AND D AND 高纏繞度,40,IFF(SXL AND K,20,0)));
STICKLINE(((SXL AND K) OR (SXL AND D AND 高纏繞度)),0,20,3.00,0),COLORBLUE,COLOR990000;
STICKLINE(SXL AND D AND 低纏繞度,0,70,3.00,0),COLOR000055;
STICKLINE(SXL AND D AND 高纏繞度 ,0,40,3.00,0),COLOR0088FF;
減倉(cāng):=IFF(XML AND D,60,IFF(XML AND K,20,0));
STICKLINE(XML AND D,0,60,3.00,0),COLOR0088FF;
STICKLINE(XML AND K,0,20,3.00,0),COLOR990000;
輕倉(cāng):=IFF(XXL AND D,30,IFF(XXL AND K,20,0));
STICKLINE(XXL AND D,0,30,3.00,0),COLOR0088FF;
STICKLINE(XXL AND K,0,20,3.00,0),COLOR990000;
空倉(cāng):=IFF(XXX,0,0);
倉(cāng)位1:=IFF(SML AND D AND 低纏繞度,90,IFF(SXL AND D AND 低纏繞度,70,IFF((XML AND D) OR (SML AND D AND 高纏繞度),60,IFF
((1/2)==10,50,IFF((SMX AND D) OR (SXL AND D AND 高纏繞度),40,IFF(XXL AND D,30,0))))));
倉(cāng)位2:=IFF(SXX OR (SMX AND K) OR (SML AND K) OR (SXL AND K) OR
(XML AND K) OR (XXL AND K),20,10);
倉(cāng)位A:=MAX(倉(cāng)位1,倉(cāng)位2);
配置倉(cāng)位:=IFF(((REF(倉(cāng)位A,1)==90) OR (REF(倉(cāng)位A,1)==70)) AND (倉(cāng)位A<=50 AND 倉(cāng)位A>=30),60,倉(cāng)位A);
STICKLINE(((REF(倉(cāng)位A,1)==90) OR (REF(倉(cāng)位A,1)==70)) AND (倉(cāng)位A<=50 AND 倉(cāng)位A>=30),0,60,3.00,0),COLOR0088FF;
修正一天:=COUNT(配置倉(cāng)位>=70,2)==1 AND COUNT(配置倉(cāng)位>=30 AND 配置倉(cāng)位<=60,2)==1;
修正二天:=COUNT(配置倉(cāng)位>=70,3)==1 AND COUNT(配置倉(cāng)位>=30 AND 配置倉(cāng)位<=60,3)==2;
修正三天:=COUNT(配置倉(cāng)位>=70,4)==1 AND COUNT(配置倉(cāng)位>=30 AND 配置倉(cāng)位<=60,4)==3;
修正四天:=COUNT(配置倉(cāng)位>=70,5)==1 AND COUNT(配置倉(cāng)位>=30 AND 配置倉(cāng)位<=60,5)==4;
修正五天:=COUNT(配置倉(cāng)位>=70,6)==1 AND COUNT(配置倉(cāng)位>=30 AND 配置倉(cāng)位<=60,6)==5;
修正六天:=COUNT(配置倉(cāng)位>=70,7)==1 AND COUNT(配置倉(cāng)位>=30 AND 配置倉(cāng)位<=60,7)==6;
修正七天:=COUNT(配置倉(cāng)位>=70,8)==1 AND COUNT(配置倉(cāng)位>=30 AND 配置倉(cāng)位<=60,8)==7;
修正八天:=COUNT(配置倉(cāng)位>=70,9)==1 AND COUNT(配置倉(cāng)位>=30 AND 配置倉(cāng)位<=60,9)==8;
修正九天:=COUNT(配置倉(cāng)位>=70,10)==1 AND COUNT(配置倉(cāng)位>=30 AND 配置倉(cāng)位<=60,10)==9;
修正十天:=COUNT(配置倉(cāng)位>=70,11)==1 AND COUNT(配置倉(cāng)位>=30 AND 配置倉(cāng)位<=60,11)==10;
修正十一天:=COUNT(配置倉(cāng)位>=70,12)==1 AND COUNT(配置倉(cāng)位>=30 AND 配置倉(cāng)位<=60,12)==11;
修正十二天:=COUNT(配置倉(cāng)位>=70,13)==1 AND COUNT(配置倉(cāng)位>=30 AND 配置倉(cāng)位<=60,13)==12;
修正十三天:=COUNT(配置倉(cāng)位>=70,14)==1 AND COUNT(配置倉(cāng)位>=30 AND 配置倉(cāng)位<=60,14)==13;
修正條件BX:=((修正一天 AND D) OR (修正二天 AND D) OR (修正三天 AND D) OR
(修正四天 AND D) OR (修正五天 AND D) OR (修正六天 AND D) OR
(修正七天 AND D) OR (修正八天 AND D) OR (修正九天 AND D) OR
(修正十天 AND D) OR (修正十一天 AND D) OR (修正十二天 AND D) OR (修正十三天 AND D));STICKLINE(修正條件BX,0,配置倉(cāng)位,3.00,0),COLOR000055;
藍(lán):=配置倉(cāng)位<=20;
紅:=(配置倉(cāng)位>=70) OR 修正一天 OR 修正二天 OR 修正三天 OR 修正四天 OR 修正五天 OR 修正六天 OR
修正七天 OR 修正八天 OR 修正九天 OR 修正十天 OR 修正十一天 OR 修正十二天 OR 修正十三天;
黃:=(紅==0) AND (藍(lán)==0);
VAR1:=EMA(EMA(CLOSE,9),9);
控盤(pán):=((VAR1-REF(VAR1,1))/REF(VAR1,1)*1000)>0;
滿(mǎn)倉(cāng)線(xiàn):IFF(1,100,0),COLORRED;
STICKLINE(控盤(pán)==0 AND 紅,0,配置倉(cāng)位,3.00,0),COLOR0088FF;
STICKLINE(控盤(pán)==0 AND 黃,0,配置倉(cāng)位,3.00,0),COLOR990000;
STICKLINE(控盤(pán) AND 藍(lán),0,配置倉(cāng)位,3.00,0),COLOR0088FF;
配置倉(cāng)位NEW:=IFF(控盤(pán) AND 配置倉(cāng)位<=50,50,配置倉(cāng)位);
倉(cāng)位馬力:IFF(1,配置倉(cāng)位NEW,0),NODRAW;
STICKLINE(控盤(pán) AND (加倉(cāng) OR 輕倉(cāng) OR (SXL AND D AND 高纏繞度)) AND 紅==0,0,50,3.00,0),COLOR0088FF;
STICKLINE(紅,0,50,3.00,0),COLOR000055;
STICKLINE(控盤(pán)==0 AND 紅,0,配置倉(cāng)位NEW,3.00,0),COLOR0088FF;
STICKLINE(控盤(pán)==0 AND 黃,0,配置倉(cāng)位NEW,3.00,0),COLOR990000;
STICKLINE(控盤(pán) AND 藍(lán),0,配置倉(cāng)位NEW,3.00,0),COLOR0088FF;
黃新:=黃 OR (控盤(pán)==0 AND 紅) OR (控盤(pán) AND 藍(lán)) OR (控盤(pán)==0 AND 倉(cāng)位馬力>=60);
藍(lán)新:=藍(lán) OR (控盤(pán)==0 AND 黃);
紅新:=紅;
STICKLINE((控盤(pán)==0 AND 倉(cāng)位馬力>=60),0,倉(cāng)位馬力,3.00,0),COLOR0088FF;
修一天:=COUNT(紅新,2)==1 AND COUNT(黃新,2)==1;
修二天:=COUNT(紅新,3)==1 AND COUNT(黃新,3)==2;
修三天:=COUNT(紅新,4)==1 AND COUNT(黃新,4)==3;
修四天:=COUNT(紅新,5 )==1 AND COUNT(黃新,5 )==4;
修五天:=COUNT(紅新,6 )==1 AND COUNT(黃新,6 )==5;
修六天:=COUNT(紅新,7 )==1 AND COUNT(黃新,7 )==6;
修七天:=COUNT(紅新,8 )==1 AND COUNT(黃新,8 )==7;
修八天:=COUNT(紅新,9 )==1 AND COUNT(黃新,9 )==8;
修九天:=COUNT(紅新,10)==1 AND COUNT(黃新,10)==9;
修十天:=COUNT(紅新,11)==1 AND COUNT(黃新,11)==10;
修十一天:=COUNT(紅新,12)==1 AND COUNT(黃新,12)==11;
修正條件AX:=
(修一天 OR 修二天 OR 修三天 OR 修四天 OR 修五天 OR
修六天 OR 修七天 OR 修八天 OR 修九天 OR 修十天 OR
修十一天);
STICKLINE(修正條件AX,0,配置倉(cāng)位NEW,3.00,0),COLOR000055;
申明:本文為作者投稿或轉(zhuǎn)載,在概念股網(wǎng) http://m.guangshenggb.com/ 上發(fā)表,為其獨(dú)立觀(guān)點(diǎn)。不代表本網(wǎng)立場(chǎng),不代表本網(wǎng)贊同其觀(guān)點(diǎn),亦不對(duì)其真實(shí)性負(fù)責(zé),投資決策請(qǐng)建立在獨(dú)立思考之上。