以下是同花顺天门阵主图指标公式源码和使用说明
同花顺天门阵主图指标公式源码:
多:EMA(C,3),COLORYELLOW;
空:EMA(C,5),COLOR00FF00;
均衡:EMA(空,5),COLORWHITE;
VARF1:=COUNT(CROSS(多,均衡),2)=1;
VARF2:=COUNT(CROSS(空,均衡),2)=1;
ZAI:=FILTER(VARF1ANDVARF2,2);
DRAWTEXT(ZAI,均衡*0.98,’主升行情’),COLOR00FF00;
VV2:=REF(CLOSE,1);
VV3:=SMA((CLOSE-VV2),6,1)/SMA(ABS(CLOSE-VV2),6,1)*100;
DRAWICON(REF(VV3,1)>81ANDVV3<80,HIGH*1.1,8);
DRAWTEXT(REF(VV3,1)>81ANDVV3<80,HIGH,’沽空↓’),COLORYELLOW;
VF1:=MA(CLOSE,60)-MA(CLOSE,5)/3.2;
DRAWTEXT(IF(CLOSE<VF1ANDvol/240>MA(VOL,5)/240ANDCLOSE>=REF(CLOSE,1)*1.08ANDCLOSE<MA(CLOSE,13)*1.3,1,0),LOW,’☆’),COLORRED;
VARA:=(CLOSE-REF(OPEN,29))/REF(OPEN,29)*100;
VARB:=EMA(0.667*REF(VARA,1)+0.333*VARA,5);
DRAWTEXT(IF(VOL>=1.3*MA(VOL,5)ANDCOUNT(VARA>=VARBANDVARA<-17,3)ANDREF(LOW,1)=LLV(LOW,120),1,0),LOW,’★注意买入’);
VARR1:=SMA(MAX(CLOSE-REF(C,1),0),6,1)/SMA(ABS(CLOSE-REF(C,1)),6,1)*100;
DRAWICON(CROSS(82,VARR1),HIGH*1.1,8);
DRAWTEXT(CROSS(82,VARR1),HIGH*1.08,’短空↓’),COLORYELLOW;
VAR1:=(HIGH+LOW+OPEN+2*CLOSE)/5;
VAR2:=REF(VAR1,1);
VAR3:=SMA(MAX(VAR1-VAR2,0),10,1)/SMA(ABS(VAR1-VAR2),10,1)*100;
HY3:=IF(COUNT(VAR3<20,5)>=1ANDCOUNT(VAR1=LLV(VAR1,10),10)>=1ANDCLOSE>=OPEN*1.038ANDVOL>MA(VOL,5)*1.2,1,0);
DRAWTEXT(HY3,LOW,’注意买入’),COLORYELLOW;
S:=MA(VOL,5)/MA(VOL,60);
A:=MA(S,5);
BIAS:=(CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100;
F:=MA(S,121);
RSV:=(CLOSE-LLV(LOW,45))/(HHV(HIGH,45)-LLV(LOW,45))*100;
K:=SMA(RSV,15,1);
D:=SMA(K,15,1);
J:=3*K-2*D;
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
DRAWTEXT(CROSS(84,RSI),HIGH,’逃顶‘),COLORYELLOW;
S1:=IF((J<11ANDBIAS>-11ANDCROSS(S,F)AND(S-F)>0.010),2,0);
DRAWTEXT(S1=2,LOW,’关注’),COLORGREEN;
中轨:HHV(MA(H,13),13),COLORRED,LINETHICK2;
趋势:LLV(MA(H,13),1),COLORGREEN,LINETHICK2;
N:=75;
M:=2;
L1:=LLV(HIGH,N);
H1:=HHV(L,N);
C1:=(H1+L1)/2;
D1:=LLV(HIGH,M);
穆桂英:EMA((2*C+H+L)/4,M),COLOR6633FF,LINETHICK2;
穆柯寨:L1,COLORFF00FF,LINETHICK2;
杨宗保:C1,COLOR33FF33,LINETHICK2;
天门阵:H1,COLORFFFF00,LINETHICK2;
RC:=DYNAINFO(3);
S2:=SMA(C,3,1);
S6:=SMA(C,5,1);
DK:=2*(S2-S6);
STICKLINE(DK>0,RC,RC+DK,0,1),colorred;
STICKLINE(DK<0,RC,RC+DK,0,1),COLORFFFF00;
RC,COLOR333399;
DRAWTEXT(FILTER(EMA(CLOSE,60)-EMA(CLOSE,12)>0ANDEMA(CLOSE,12)/LOW>1.15,5),
LOW,’●’),COLORFF00FF;
DRAWTEXT(FILTER(EMA(CLOSE,12)-EMA(CLOSE,60)>0ANDHIGH/EMA(CLOSE,12)>1.15,5),
HIGH,’●’),coloryellow;
MA1:MA(CLOSE,6),COLORFFFFFF;
MA2:MA(CLOSE,13),coloryellow;
X:=EMA(((SLOPE(CLOSE,21)*20)+CLOSE),68);
Y:=EMA(CLOSE,10);
LL:=REF(CLOSE,2);
MM:=((SMA(MAX((CLOSE-LL),0),6,1)/SMA(Abs((CLOSE-LL)),6,1))*100);
DB:=IF(((MM<REF(MM,1))AND(MM>79)),MM,0);
DRAWTEXT(crOSS(Y,X),(LOW*0.985),’▲买’),colorred;
DRAWTEXT(CROSS(X,Y),(HIGH*1.02),’◆卖’),COLORFF6699;
DRAWTEXT(DB,(HIGH*1.02),’○’),COLOR00FF00;
VAR1:=LLV(LOW,21);
VAR2:=HHV(HIGH,21);
AK1:=EMA((((CLOSE-VAR1)/(VAR2-VAR1))*100),5);
AK:=EMA((((CLOSE-VAR1)/(VAR2-VAR1))*50),13);
DD:=EMA(((0.667*REF(AK1,1))+(0.333*AK1)),2);
VAR3:=LLV(LOW,55);
VAR4:=HHV(HIGH,34);
VAR5:=EMA((((CLOSE-VAR3)/(VAR4-VAR3))*100),3);
VAR6:=((AK+VAR5)/2);
VAR7:=EMA(((0.667*REF(VAR5,1))+(0.333*AK1)),2);
VAR8:=EMA(VAR6,5);
BB:=EMA(((0.667*REF(VAR8,1))+(0.333*VAR8)),2);
AB:=CROSS(AK1,AK);
BB1:=(CROSS(AK1,BB)AND(BB<30));
CD:=(BB1*0.6);
DRAWTEXT((CD=0.6),(LOW*0.99),’□’),COLOR33CC99;
DRAWTEXT((AB=1),(LOW*0.99),’□’),colorwhite;
主线:=(ma(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24)+MA(CLOSE,36))/4,LINETHICK2,COLORFF00FF;
股价重心:=DMA(AMOUNT/vol/100,VOL/CAPITAL),COLORGREEN,LINETHICK2;
MA14:=EMA(CLOSE,14);
MA34:=EMA(CLOSE,26);
MA54:=EMA(CLOSE,54);
MA90:=EMA(CLOSE,90);
MA120:EMA(CLOSE,120),POINTDOT,LINETHICK2,COLORWHITE;
年线:EMA(C,250),COLORYELLOW,LINETHICK2;
{中短波}
HZ:=EMA(CLOSE,13);
短波:EMA(HZ,1),COLOR00DD00,LINETHICK1;
中波:EMA(HZ,26),COLORRED,LINETHICK1;
均线148天:=EMA(C,148),POINTDOT,LINETHICK1,COLORGREEN;
成本:=SUM(AMOUNT,0)/SUM(VOL,0)/100,COLORYELLOW,LINETHICK2;
HZ2:EMA(HZ,8),COLORGREEN,LINETHICK2;
HZ4:EMA(HZ,39),COLORFF00FF,LINETHICK2;
A1:stICKLINE(HZ2<HZ4,短波,HZ4,1,0),COLORBLUE;
A2:STICKLINE(短波>HZ2,短波,HZ2,2,0),COLORGREEN;
A3:STICKLINE(中波>HZ4,中波,HZ4,1.5,0),COLORFF00FF;
{慢速kdj}
RSV:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;
FASTK:=SMA(RSV,12,1);
K:=SMA(FASTK,9,1),COLORYELLOW;
D:=SMA(K,3,1),LINETHICK2,COLORBLUE;
J:=3*K-2*D,LINETHICK1,COLORGREEN;
{中波}
VAR11:=3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)-2*SMA(SMA((CLOSE-LLV(LOW,75))
/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR22:=100-VAR11;
中势线:=(-1)*(EMA(VAR22,1)-50)+42,COLORYELLOW,LINETHICK2;
TZ:=(CLOSE-LLV(LOW,331))/(HHV(HIGH,331)-LLV(LOW,331))*100;
强势线:=SMA(TZ,5,1),LINETHICK2,COLORRED;
大盘线:=70*(HHV(HIGH,39)-CLOSE)/(HHV(HIGH,39)-LLV(LOW,39)),LINETHICK1,COLOR009900;
{量选}
AA:=VOL/SUM(VOL,13);
BB:=DMA(C,AA);
CC:=VOL/SUM(VOL,34);
DD:=DMA(C,CC);
{背离}
VAR00:=WINNER(CLOSE);
VAR1:=FORCAST(VAR00,10);
VAR2:=MA(VAR1,3);
VAR3:=MA(VAR2,12);
VAR4:=MA(VAR3,16);
VAR5:=MA(VAR4,31);
VAR6:=MA(VAR5,55);
VAR7:=VAR5;
VAR8:=VAR4>VAR2*1.11ANDVAR3>VAR2*1.095;
A:=VAR4/VAR2;
B:=VAR3/VAR2;
VAR9:=VAR2>VAR1*0.95;
TD:=VAR2/VAR1;
VAR1H:=INDEXC;
VAR2H:=MA(VAR1H,6);
VAR3H:=MA(VAR1H,24);
VAR4H:=MA(VAR1H,32);
VAR5H:=MA(VAR1H,62);
VAR6H:=MA(VAR1H,105);
VAR7H:=VAR5H;
VAR8H:=VAR4H>VAR2H*1.11ANDVAR3H>VAR2H*1.095;
VAR9H:=VAR2H>VAR1H*0.95;
PT:=(IF(H=LANDC=OANDL=CANDC>0ANDREF(H,1)=REF(L,1)ANDREF(C,1)=REF(O,1)
ANDREF(H,1)=REF(C,1)ANDREF(C,1)>0,0,1))>0;
G:=(VAR7HANDVAR8HANDVAR9HANDCLOSE/COST(8)<=0.7985
AND(COUNT(C=L,4)<3ORC>REF(C,1)))ANDPTOR
VAR7ANDVAR8ANDVAR9ANDCLOSE/COST(5)<=0.8AND
((VAR1>OPENORVAR1>REF(OPEN,1)OR
REF(VAR1,1)));
背离:=VAR2<REF(VAR2,1)ANDA>REF(A,1);
买入信号1:=VAR1>AANDVAR2>B;
买入信号2:=B>AAND1>BANDA<1ANDH=HHV(H,21);
BUY:=COUNT(背离,20)>1AND买入信号2=1ANDC>OORcrOSS(BB,DD);
DRAWICON(CROSS(短波,HZ2),中波,1);
X1:=CROSS(主线,MA90)AND大盘线<36ANDJ>KAND强势线>REF(强势线,1)AND
中势线>REF(中势线,1)AND短波-REF(短波,1)>0.088ANDHZ4-REF(HZ4,1)>0.028;
X2:=CROSS(主线,MA120)AND大盘线<36ANDJ>KAND强势线>REF(强势线,1)AND
中势线>REF(中势线,1)AND短波-REF(短波,1)>0.088ANDHZ4-REF(HZ4,1)>0.028;
X3:=CROSS(MA120,均线148天)AND大盘线<36ANDJ>KAND强势线>REF(强势线,1)AND
中势线>REF(中势线,1)AND短波-REF(短波,1)>0.088ANDHZ4-REF(HZ4,1)>0.028;
X4:=CROSS(中势线,33)AND短波>HZ2ANDO>REF(O,1)ANDC>REF(C,1)ANDJ>DAND
J<65AND大盘线<36AND强势线>36AND主线>REF(主线,1)
AND强势线>REF(强势线,1)AND中势线>REF(中势线,1)AND中势线<70ANDC>OAND
MA34>REF(MA34,1)AND短波-REF(短波,1)>0.088ANDHZ4-REF(HZ4,1)>0.028;
X5:=CROSS(短波,HZ2)AND大盘线<36AND短波>中波AND中波>HZ4AND
短波-REF(短波,1)>0.088ANDHZ4-REF(HZ4,1)>0.028;
X6:=J>KAND大盘线<36AND短波>HZ2ANDCROSS(强势线,36);
X7:=CROSS(短波,HZ2)ANDCROSS(强势线,36);
X8:=CROSS(J,K)ANDCROSS(强势线,33);
X9:=CROSS(短波,HZ2)ANDCROSS(强势线,54);
X10:=CROSS(J,K)AND大盘线<36ANDJ<65ANDC>OAND短波-REF(短波,1)>0.088;
X11:=CROSS(J,K)AND短波>HZ2ANDJ<68AND短波>REF(短波,1)ANDHZ2>REF(HZ2,1)
AND中势线>REF(中势线,1)AND短波-REF(短波,1)>0.088;
X12:=CROSS(J,K)AND大盘线<36ANDJ<68AND短波-REF(短波,1)>0.088;
X13:=CROSS(J,K)ANDCROSS(短波,HZ2)AND大盘线<36;
X14:=CROSS(短波,HZ2)AND大盘线<36ANDJ>KANDJ<68AND强势线>REF(强势线,1)AND
中势线>REF(中势线,1)AND短波-REF(短波,1)>0.088;
X15:=CROSS(短波,HZ2)AND中波>MA120AND中波>均线148天ANDHZ2>MA120AND
MA120>均线148天AND短波-REF(短波,1)>0.088;
X16:=CROSS(J,K)AND强势线>54AND强势线>REF(强势线,1)ANDJ<68;
X17:=COUNT(背离,20)>1AND短波>HZ2ANDO>REF(O,1)ANDC>REF(C,1)ANDJ>DAND
J<65AND买入信号2=1AND主线>REF(主线,1)
AND中势线>REF(中势线,1)AND中势线<70ANDC>O;
X18:=CROSS(BB,DD)ANDJ<74ANDMA34>REF(MA34,1)AND短波-REF(短波,1)>0.088;
X19:=大盘线<36ANDJ>DANDJ<65ANDC>OAND短波>REF(短波,1)ANDCROSS(HZ2,中波)
AND短波-REF(短波,1)>0.088ANDO>REF(C,1);
X20:=C>OAND短波>REF(短波,1)ANDJ>DANDJ<65AND大盘线<36ANDCROSS(中势线,33)AND中势线-REF(中势线,1)>0.23AND短波-REF(短波,1)>0.088
ANDO>REF(C,1)AND强势线>12;
X21:=短波>HZ2AND中波>HZ4AND大盘线<36ANDCROSS(J,K)ANDJ<65AND短波-REF(短波,1)>0.088;
X22:=短波>HZ2AND大盘线<36ANDCROSS(J,K)ANDJ<65AND短波-REF(短波,1)>0.088;
X23:=CROSS(J,K)ANDCROSS(短波,HZ2)AND大盘线<36ANDJ<56;
X24:=短波>HZ2AND中波>HZ4AND大盘线<36ANDJ>DANDJ<65ANDCROSS(HZ4,年线)AND短波-REF(短波,1)>0.088;
X25:=短波>HZ2ANDHZ2>HZ4AND大盘线<36ANDJ>DANDJ<65ANDJ<65ANDCROSS(强势线,46)AND短波-REF(短波,1)>0.088;
X26:=短波>HZ2AND大盘线<36ANDJ>DANDJ<65ANDCROSS(中势线,36)AND短波-REF(短波,1)>0.088;
DRAWTEXT(X1ORX2ORX3ORX4ORX5ORX6ORX7ORX8ORX9ORX10ORX11OR
X12ORX13ORX14ORX15ORX16ORX17ORX18ORX19ORX20ORX21ORX22OR
X23ORX24ORX25ORX26,HZ2-0.18,’!追’),COLORWHITE;{好}
DRAWTEXT(CROSS(短波,HZ2)ANDC>OANDJ>KANDJ>DAND大盘线<36ANDC>HZ4,L*1.09,’●’),COLORYELLOW;
DRAWTEXT(CROSS(短波,HZ2)ANDC>OANDJ>KANDJ>DAND大盘线<36ANDC>HZ4,L*1.12,’做趋势’),COLORYELLOW;
DRAWTEXT(CROSS(短波,HZ2),C,’♂’);
DRAWTEXT(CROSS(中波,HZ4),C,’♂’);
DRAWTEXT(CROSS(中波,MA120),C,’♂’);
DRAWTEXT(CROSS(HZ4,MA120),C,’♂’);
同花顺天门阵主图指标公式截图
评论(0)