通达信公式指标源码财神来敲门主图指标
{跃上海平面}
N:=10;
K2:=1;
TA:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
ATR:=EMA(TA,5);
VAR81:=REF(CLOSE,N)-REF(ATR,1);
仙界线:=HHV(VAR81,5),COLORYELLOW;
{资金流入带主图;相当于5日均线。}
初始流入:=FINANCE(21)/100000000,COLORCYAN,NODRAW;
逐步流入:=FINANCE(23)/100000000,COLORRED,NODRAW;
加快流入:=FINANCE(30)/100000000,COLORRED,NODRAW;
准备上攻:=FINANCE(19)/100000000,COLORGREEN,NODRAW;
MACC1:=EMA(C,2),COLOR0000FF,LINETHICK1;
MACC2:=REF(MACC1,1),COLORFFFFFF;
MACC3:=EMA(EMA(C,7),6),COLOR00FFFF,LINETHICK1;
XGL:DRAWBAND(MACC1,RGB(255,160,0),MACC2,RGB(10,200,0));
{盖住双横杠}
F:=C/O;
STICKLINE(F>=1,C,O,2.8,1),COLORRED;
STICKLINE(F>=1,C,H,0.00001,0),COLORRED;
STICKLINE(F>=1,L,O,0.00001,0),COLORRED;
STICKLINE(F<1,C,O,2.8,0),COLORCYAN;
STICKLINE(F<1,O,H,0.00001,0),COLORCYAN;
STICKLINE(F<1,L,C,0.00001,0),COLORCYAN;
{3、重要的主图K线上的红色买点柱}
XA_1J:=EMA(EMA(CLOSE,23),23);
XA_2J:=(XA_1J-REF(XA_1J,1))/REF(XA_1J,1)*1000;
XA_3J:=DYNAINFO(11);
XA_4J:=(EMA(CLOSE,10)-EMA(CLOSE,60))*10;
XA_5J:=EMA(XA_4J,5);
XA_6J:=(CLOSE-XA_3J)/XA_3J<(-0.03);
XA_7J:=(CLOSE-XA_3J)/XA_3J<(-0.03);
XA_8J:=LAST(XA_3J>=REF(XA_3J,1),5,1) AND (CLOSE-XA_3J)/XA_3J<0.005;
XA_9J:=(CLOSE-XA_3J)/XA_3J>0.005;
XA_10J:=XA_2J<REF(XA_2J,1) AND XA_2J>0.5;
XA_11J:=XA_2J>0;
XA_12J:=XA_2J>REF(XA_2J,1) AND XA_2J<(-0.2);
XA_13J:=XA_2J>REF(XA_2J,1) AND XA_2J<0;
XA_14J:=CROSS(XA_4J,XA_5J) AND XA_4J<(-0.3);
XA_15J:=FILTER(XA_6J AND XA_12J AND XA_14J,15);
买点柱:=FILTER(XA_7J AND XA_12J AND XA_14J,15);
DRAWTEXT(买点柱,H*1.01,'1'),COLORRED;
{5日变色线}
越过成仙M240:=MA(C,240),COLORGRAY,LINETHICK1;
M144:=MA(C,144),COLORWHITE,LINETHICK1;
M88:=MA(C,88),COLORLIGRAY,LINETHICK1;
越过有道M120:=MA(C,110),COLORMAGENTA,LINETHICK3;
越过强势M60:=MA(C,60),COLORLIGRAY,LINETHICK3;
M30:=MA(C,27),COLORGREEN,LINETHICK2;
M20:=MA(C,17),COLORMAGENTA,LINETHICK2;
M10:=MA(C,10),COLORWHITE,LINETHICK1;
M5:=MA(C,3),COLORRED,LINETHICK3;
{2、短期下插线}
AN1:=MA(C,3);
AN2:=MA(C,21);
AN3:=(AN1+AN2)/2;
{6、短下插操作线无未来}
BR:=MA(CLOSE,13)+MA(CLOSE,13)-REF(MA(CLOSE,13),1);
分水岭R:=IF(MA(CLOSE,17)<BR,BR,MA(CLOSE,17)),COLORFF00FF,NODRAW;
YR:=分水岭R-(EMA(C,3)-分水岭R),DOTLINE,LINETHICK1;
OUTF:=CROSS(M5,YR);
{4、黄色块及坑后上涨}
NQ:=20;
M1P:=30;
P1P:=80;
P2P:=100;
VAR1P:=(C+H+O+L)/4;
买入P:=XMA(VAR1P,M1P)*(1-P2P/1000),COLORYELLOW,LINETHICK2;
STICKLINE(买入P>HIGH,OPEN,CLOSE,2,0),COLORYELLOW;
STICKLINE(买入P>HIGH,HIGH,LOW,0,0),COLORYELLOW;
STICKLINE(CCI<=100 AND L<=买入P,(L + H + O) / 3.18,O,3,0),COLORYELLOW;
反弹P:=MA(EMA(EMA(HIGH,5),5),5)*0.95,LINETHICK1;
XG1P:=CROSS(买入P,反弹P);
DRAWTEXT(XG1P,L*0.98,'1'),COLORWHITE;
{13、飓风眼启爆}
AHC1:=CLOSE*VOL;
AHC2:=EMA((EXPMA(AHC1,2)/EXPMA(VOL,2)+EXPMA(AHC1,5)/EXPMA(VOL,5)+EXPMA
(AHC1,10)/EXPMA(VOL,10)+EXPMA(AHC1,20)/EXPMA(VOL,20))/4,10),COLORYELLOW;
风向R:=1.06*AHC2,LINETHICK2,COLORWHITE;
吹:=1.13*AHC2,LINETHICK2,COLORWHITE;
ZT:=REF(C,1)*1.1-C<0.01 AND H=C;
飓风:=CROSS(C,风向R) AND ZT;
DRAWTEXT(飓风,H*1.01,'1'),COLORBLUE;
{7、黑夜之眼}
MMM:=1;
SVOL:=INTPART(SUM(V,0)/CAPITAL);
TJ0:=SVOL>REF(SVOL,1) OR BARSSINCE(CLOSE)=0;
SF1:=BARSLAST(TJ0)+1;
TJJ2:=SF1<REF(SF1,1);
S2:=IF(TJJ2,REF(SF1,1)+1,SF1);
S3:=SUM(TJJ2,0);
ZK1:="KD.K#WEEK"(9,3,3);
ZD2:="KD.D#WEEK"(9,3,3);
ZF1:="MACD.DIF#WEEK"(5,34,5);
ZA2:="MACD.DEA#WEEK"(5,34,5);
换手:=V/CAPITAL*100,LINETHICK0;
JCD:=CROSS(ZK1,ZD2) AND REF(ZD2,1)<60;
波段低点:=EXIST(JCD,MMM),COLORYELLOW,NODRAW;
DRAWTEXT(波段低点,L*0.98,'1'),COLORGREEN;
{2、A3及A15D}
A:=EMA((EMA(C,29)+EMA(C,31)+EMA(C,33))/3,3);
A1:=EMA((EMA(C,1)+EMA(C,3)+EMA(C,5))/3,3),COLOR1010FF;
A2:=EMA((EMA(C,3)+EMA(C,5)+EMA( C,7))/3,3),COLOR1020FF;
A3:=IF(K2!=2,EMA((EMA(C,5)+EMA(C,6)+EMA( C,7))/3,3),DRAWNULL),COLORCYAN,LINETHICK3;
A4:=IF(K2!=2, EMA((EMA(C,7)+EMA(C,9)+EMA( C,11))/3,3),DRAWNULL),COLOR1040FF;
A5:=IF(K2!=2, EMA((EMA(C,9)+EMA(C,11)+EMA( C,13))/3,3),DRAWNULL)COLOR1050FF;
A6:=IF(K2!=2, EMA((EMA(C,11)+EMA(C,13)+EMA( C,15))/3,3),DRAWNULL)COLOR1060FF;
A7:=IF(K2!=2, EMA((EMA(C,13)+EMA(C,15)+EMA( C,17))/3,3),DRAWNULL)COLOR1070FF;
A8:=IF(K2!=2, EMA((EMA(C,15)+EMA(C,17)+EMA( C,19))/3,3),DRAWNULL)COLOR1080FF;
A9:=IF(K2!=2, EMA((EMA(C,17)+EMA(C,19)+EMA( C,21))/3,3),DRAWNULL),COLORLIMAGENTA;
A10D:=IF(K2!=2, EMA((EMA(C,19)+EMA(C,21)+EMA( C,23))/3,3),DRAWNULL),COLORLIMAGENTA;
A11D:=IF(K2!=2, EMA((EMA(C,21)+EMA(C,23)+EMA( C,25))/3,3),DRAWNULL),COLORWHITE,LINETHICK2;
A15D:IF(K2!=2, A-(A1-A*0.977),DRAWNULL),COLORBLUE,LINETHICK3;
{11、变色下插线}
B55:=ATAN((A15D/REF(A15D,1)-1)*100)*180/3.1416;
IF(55>30 AND A15D>REF(A15D,1), A15D,DRAWNULL),COLORCYAN,LINETHICK3;
B100:=ATAN((M5/REF(M5,1)-1)*100)*180/3.1416;
IF(B55<0 AND A15D<REF(A15D,1), A15D,DRAWNULL),COLORRED,LINETHICK3;
{12、黄色起飞跑道}
OUT1:=CROSS(M5,A15D);
DRAWICON(OUT1,L*0.96,13);{红球}
{三轨主图}
MC:=100;
NN:=0.4;
MIDZ:MA(CLOSE,MC),COLORWHITE,LINETHICK3;
{4、大叉出现在坑边!}
BCC:=MA(CLOSE,34)+MA(CLOSE,34)-REF(MA(CLOSE,34),1);
分水岭C:=IF(MA(CLOSE,161)<BCC,BCC,MA(CLOSE,161)),LINETHICK1,POINTDOT;
下插线C:分水岭C-(EMA(C,3)-分水岭C),LINETHICK3,COLORYELLOW;
XGC:IF(下插线C>AN3,下插线C,DRAWNULL),COLORBROWN,LINETHICK3;
{越过有道120上穿MIDZ,红色三线}
OUT11:=CROSS(M5,A15D);
DRAWTEXT(OUT11,L*0.98,'3'),COLORYELLOW;
{★坑边信赖}
QFO3:=100-3*SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*100,5,1)
+2*SMA(SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*100,20,1),8,1);
QFO4:=100-3*SMA((OPEN-LLV(LOW,66))/(HHV(HIGH,66)-LLV(LOW,66))*100,8,1)
+2*SMA(SMA((OPEN-LLV(LOW,66))/(HHV(HIGH,66)-LLV(LOW,66))*100,20,1),5,1);
QFO5:=QFO3<REF(QFO4,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);
XG2C:=IF(QFO5 AND COUNT(QFO5,30)=1,20,0),STICK,LINETHICK2,COLORRED;
{STICKLINE(XG2C,L*1.02,L*1.27,0.00001,0),COLORCYAN;}
DRAWTEXT(C>REF(C,1) AND REF(RSI,1)>0 AND XG2C,L*0.98,'3'),COLORBLUE;
{▲主图有金坑吸筹,无金坑放弃。}
LCF:=REF(CLOSE,1);
RSI5:=((SMA(MAX((CLOSE - LCF),0),5,1) / SMA(ABS((CLOSE - LCF)),5,1)) * 100);
TR1F:=SUM(MAX(MAX((HIGH - LOW),ABS((HIGH - REF(CLOSE,1)))),ABS((LOW - REF(CLOSE,1)))),10);
HD:=(HIGH - REF(HIGH,1));
LD:=(REF(LOW,1) - LOW);
DMP:=SUM(IF(((HD > 0) AND (HD > LD)),HD,0),10);
DMM:=SUM(IF(((LD > 0) AND (LD > HD)),LD,0),10);
PDI:=((DMP * 100) / TR1F);
MDI:=((DMM * 100) / TR1F);
ADX:=MA(((ABS((MDI - PDI)) / (MDI + PDI)) * 100),5);
AV:=(RSI5 + ADX);
DXR:=(((ADX + REF(ADX,5)) / 2) + RSI5);
WR10:=((100 * (HHV(HIGH,60) - CLOSE)) / (HHV(HIGH,60) - LLV(LOW,60)));
NEWVOL:=(RSI5 - WR10);
金坑买入:=(AV + NEWVOL);
买入选股:=IF(CROSS(金坑买入,0),1,0),STICK,COLORRED;
VAR1Z:=SMA(买入选股,8,1);
VAR2Z:=SMA(VAR1Z,8,1),COLOR0000FF;
VAR3Z:=SMA(VAR2Z,10,1),COLOR00FFFF;
金坑吸筹:=IF(CROSS(VAR2Z,VAR3Z) AND (VAR2Z<40),5,0* 10000),COLOR0000FF,LINETHICK1;
DRAWTEXT(金坑吸筹>0,L*0.98,'1'),COLORYELLOW;
{做多资金上穿空方趋势线出洋红球13,为趋势走强信号,★下有金坑才拉升}
A50A:=33,COLORBLUE,LINETHICK1;
VAR0:=(2*CLOSE+HIGH+LOW)/4;
BCA:=MA((VAR0-LLV(LOW,17))/(HHV(HIGH,17)-LLV(LOW,17))*100,2);
做多资金:=EMA(BCA,3),LINETHICK1,COLORYELLOW;
做空资金:=EMA(做多资金,18),COLORGRAY,LINETHICK1;
VAR4C:=(HHV(HIGH,10)-CLOSE)/(HHV(HIGH,10)-LLV(LOW,10))*100;
空方趋势线:=SMA(VAR4C,3,1)+0.17,COLORLIGREEN,LINETHICK3;
OUT66:=CROSS(做多资金,A50A);
DRAWTEXT(OUT66,L*0.98,'2'),COLORYELLOW;
{XGL上穿下插线C,★大叉出现}
OUTL:=CROSS(M5,下插线C);
DRAWTEXT(OUTL,H*1.01,'2'),COLORRED;
{4、潜伏。飓风眼}
M5F:=MA(C,4);
M10F:=MA(C,8),COLORRED,LINETHICK2;
M20F:=MA(C,20);
M60F:=MA(C,60),COLORBLUE,LINETHICK2;
D3:=MIN(MIN(M5F,M10F),M20F)>M60F;
LLM:=LLV("MACD.MACD"*100,200);
HHM:=HHV("MACD.MACD"*100,200);
TJA:=C>REF(C,1)*1.05;
T:=BARSLAST(C>REF(C,1)*1.095 AND C=H);
T2L:=BARSLAST(C<REF(C,1)*1.095 AND C>REF(C,1)*1.08);
T3L:=BARSLAST(C<REF(C,1)*1.08 AND C>REF(C,1)*1.07);
T4L:=BARSLAST(C<REF(C,1)*1.07 AND C>REF(C,1)*1.06);
T5L:=BARSLAST(C<REF(C,1)*1.06 AND C>REF(C,1)*1.05);
AAF1:=REF(T,1)>100 AND REF(T2L,1)>100 AND REF(T3L,1)>100 AND REF(T4L,1)>100 AND REF(T5L,1)>80 AND TJA;
XGT:=BARSLAST(AAF1 AND HHM<60 AND LLM>-55);
D6:=BARSSINCEN(MIN(MIN(M5F,M10F),M20F)>M60F,XGT+1);
XGX:=CROSS((XGT=0 AND D3) OR D6=0,0.5);
TJJ:=COUNT(XGX,30)=2 AND XGX;
SR1:=REF(HIGH,10)=HHV(HIGH,2*10+1);
SR2:=FILTER(SR1,10);
SR3:=REF(SR2,10+1);
HDF:=REF(SR3,10);
前高:=REF(H,BARSLAST(HDF));
倍量:=VOL/REF(VOL,1)>=1.9;
突破前高:=CROSS(C,前高);
YG:= 倍量 AND 突破前高;
低2:=IF(CURRBARSCOUNT<=60, CONST(IF(ISLASTBAR=1,LLV(L, BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL);
SJ:=BARSLAST(YG);
DIF:=MACD.DIF;
H300:=HHVBARS(DIF,300);
AL:=BOLL.UB;
TQ:=BARSLAST(CROSS(AL>=REF(AL,1),0.5));
E25:=EXPMA(C,25);
ZF:=EVERY(RANGE(C/REF(C,1),0.97,1.05),TQ+1);
ZFF:=(HHV(H,TQ+1)-LLV(L,TQ+1))/LLV(L,TQ+1)*100;
TJQ:=EVERY(MAX(C,O)/AL<1.02 ,TQ+1);
XL:=(ATAN((E25/REF(E25,TQ)-1)*100)*180/3.1415926);
TJ1Q:=CROSS(DIF>=REF(DIF,H300),0.5) AND ZFF<17 AND ZF AND TJQ;
躁动:=TJ1Q AND XL>75;
A1F:=REF(C,1);
AYFF:=REF(C,10);
A31F:=(AYFF-A1F)/A1F*100;
AA1F:=(A31F-REF(A31F,1));
选股1:=CROSS(AAF1,9.8);
A11F:=REF(V,1);
VAR8:=IF(VOL/CAPITAL>0.001,1,EXP(ABS(LOG(VOL/CAPITAL*100))))>2;
A13F:=VAR8/A11F;
AA3F:=(A13F-REF(A13F,1));
选股2:=CROSS(AA3F,500);
潜伏2:=选股1 AND 选股2;
GX:=潜伏2 OR 躁动 OR CURRBARSCOUNT=CONST(SJ)+2 OR TJJ OR (CCI<=100 AND L<=低2);
准备:=FILTER(GX=1,3);
A2A:=BARSCOUNT(C);
AH:=HHV(H,200);
A1L:=LLV(L,200);
A0:=(AH-A1L)/190;
B1F:=L-A0;
DRAWTEXT(准备,L*0.98, '2'),COLORWHITE;
DRAWTEXT(飓风,L*0.98,'2'),COLORBLUE;
{财神来敲门;有函数;不影响使用}
金童子:=C/REF(C,1)>1.048 AND C=H AND BETWEEN(FORCAST(V,4)
,0.2*FORCAST(V,12),2.1*FORCAST(V,12));
财神:=FILTER(金童子,10);{58}
DRAWTEXT(财神,H*1.01,'3 财神'),COLORMAGENTA;
DRAWICON(财神,L*1.05,9);
{乔治公爵的老枪准星之;杀手潜伏。}
火弹:=MA(C,3),COLORRED,LINETHICK3;
弹夹:=MA(LOW,13)*1.2,COLORMAGENTA;
来福线:=MA(LOW,17)*1.1,COLORYELLOW;
撞针:=MA(HIGH,13)*0.9,COLORWHITE;
扳机:=MA(HIGH,89)*0.8,COLORBROWN;
准星:=CROSS(火弹,撞针);
DRAWTEXT(准星,7,'3'),COLORWHITE;
{-金坑迎财神.★坑后上涨 ★买点柱 与K线黄金坑配合使用。}
A1J:=ABS(((3.48*CLOSE+HIGH+LOW)/4-EMA(CLOSE,10))/EMA(CLOSE,10));
A2J:=DMA(((2.15*CLOSE+LOW+HIGH)/4),A1J);
金坑:=EMA(A2J,5)*1;
金坑2:=EMA(A2J,200)*1.118;
探路:=(C-REF(C,1))/REF(C,1)*100>8;
金库:=CROSS(C,金坑) AND 探路;
RRFJ:=金库,STICK;
DRAWTEXT(RRFJ,L*0.98,'3'),COLORYELLOW;
{逃}
LCC:=REF(CLOSE,1);
RSIC:=SMA(MAX(CLOSE-LCC,0),6,1)/SMA(ABS(CLOSE-LCC),6,1)*100;
DRAWTEXT(CROSS(84,RSIC) , HIGH*1.1,'逃'),COLORYELLOW;
DRAWTEXT_FIX(1,0.01,0.01,0,'绿 1黑暗之眼;2红色三线;'),COLORGREEN;
DRAWTEXT_FIX(1,0.01,0.06,0,'蓝 1飓风;2飓风眼;3坑边信赖;'),COLORBLUE;
DRAWTEXT_FIX(1,0.01,0.11,0,'白 1坑后上涨;2潜伏;3杀手潜伏;'),COLORWHITE;
DRAWTEXT_FIX(1,0.2,0.01,0,'黄 1有金坑吸筹;2下有金坑才拉升;3金坑迎财神;'),COLORYELLOW;
DRAWTEXT_FIX(1,0.2,0.06,0,'红 1买点柱;2大叉出现;3财神来敲门;'),COLORRED;
风险提示:本指标公式仅作为知识分享,不构成任何投资建议,投资有风险,交易需谨慎。
N:=10;
K2:=1;
TA:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
ATR:=EMA(TA,5);
VAR81:=REF(CLOSE,N)-REF(ATR,1);
仙界线:=HHV(VAR81,5),COLORYELLOW;
{资金流入带主图;相当于5日均线。}
初始流入:=FINANCE(21)/100000000,COLORCYAN,NODRAW;
逐步流入:=FINANCE(23)/100000000,COLORRED,NODRAW;
加快流入:=FINANCE(30)/100000000,COLORRED,NODRAW;
准备上攻:=FINANCE(19)/100000000,COLORGREEN,NODRAW;
MACC1:=EMA(C,2),COLOR0000FF,LINETHICK1;
MACC2:=REF(MACC1,1),COLORFFFFFF;
MACC3:=EMA(EMA(C,7),6),COLOR00FFFF,LINETHICK1;
XGL:DRAWBAND(MACC1,RGB(255,160,0),MACC2,RGB(10,200,0));
{盖住双横杠}
F:=C/O;
STICKLINE(F>=1,C,O,2.8,1),COLORRED;
STICKLINE(F>=1,C,H,0.00001,0),COLORRED;
STICKLINE(F>=1,L,O,0.00001,0),COLORRED;
STICKLINE(F<1,C,O,2.8,0),COLORCYAN;
STICKLINE(F<1,O,H,0.00001,0),COLORCYAN;
STICKLINE(F<1,L,C,0.00001,0),COLORCYAN;
{3、重要的主图K线上的红色买点柱}
XA_1J:=EMA(EMA(CLOSE,23),23);
XA_2J:=(XA_1J-REF(XA_1J,1))/REF(XA_1J,1)*1000;
XA_3J:=DYNAINFO(11);
XA_4J:=(EMA(CLOSE,10)-EMA(CLOSE,60))*10;
XA_5J:=EMA(XA_4J,5);
XA_6J:=(CLOSE-XA_3J)/XA_3J<(-0.03);
XA_7J:=(CLOSE-XA_3J)/XA_3J<(-0.03);
XA_8J:=LAST(XA_3J>=REF(XA_3J,1),5,1) AND (CLOSE-XA_3J)/XA_3J<0.005;
XA_9J:=(CLOSE-XA_3J)/XA_3J>0.005;
XA_10J:=XA_2J<REF(XA_2J,1) AND XA_2J>0.5;
XA_11J:=XA_2J>0;
XA_12J:=XA_2J>REF(XA_2J,1) AND XA_2J<(-0.2);
XA_13J:=XA_2J>REF(XA_2J,1) AND XA_2J<0;
XA_14J:=CROSS(XA_4J,XA_5J) AND XA_4J<(-0.3);
XA_15J:=FILTER(XA_6J AND XA_12J AND XA_14J,15);
买点柱:=FILTER(XA_7J AND XA_12J AND XA_14J,15);
DRAWTEXT(买点柱,H*1.01,'1'),COLORRED;
{5日变色线}
越过成仙M240:=MA(C,240),COLORGRAY,LINETHICK1;
M144:=MA(C,144),COLORWHITE,LINETHICK1;
M88:=MA(C,88),COLORLIGRAY,LINETHICK1;
越过有道M120:=MA(C,110),COLORMAGENTA,LINETHICK3;
越过强势M60:=MA(C,60),COLORLIGRAY,LINETHICK3;
M30:=MA(C,27),COLORGREEN,LINETHICK2;
M20:=MA(C,17),COLORMAGENTA,LINETHICK2;
M10:=MA(C,10),COLORWHITE,LINETHICK1;
M5:=MA(C,3),COLORRED,LINETHICK3;
{2、短期下插线}
AN1:=MA(C,3);
AN2:=MA(C,21);
AN3:=(AN1+AN2)/2;
{6、短下插操作线无未来}
BR:=MA(CLOSE,13)+MA(CLOSE,13)-REF(MA(CLOSE,13),1);
分水岭R:=IF(MA(CLOSE,17)<BR,BR,MA(CLOSE,17)),COLORFF00FF,NODRAW;
YR:=分水岭R-(EMA(C,3)-分水岭R),DOTLINE,LINETHICK1;
OUTF:=CROSS(M5,YR);
{4、黄色块及坑后上涨}
NQ:=20;
M1P:=30;
P1P:=80;
P2P:=100;
VAR1P:=(C+H+O+L)/4;
买入P:=XMA(VAR1P,M1P)*(1-P2P/1000),COLORYELLOW,LINETHICK2;
STICKLINE(买入P>HIGH,OPEN,CLOSE,2,0),COLORYELLOW;
STICKLINE(买入P>HIGH,HIGH,LOW,0,0),COLORYELLOW;
STICKLINE(CCI<=100 AND L<=买入P,(L + H + O) / 3.18,O,3,0),COLORYELLOW;
反弹P:=MA(EMA(EMA(HIGH,5),5),5)*0.95,LINETHICK1;
XG1P:=CROSS(买入P,反弹P);
DRAWTEXT(XG1P,L*0.98,'1'),COLORWHITE;
{13、飓风眼启爆}
AHC1:=CLOSE*VOL;
AHC2:=EMA((EXPMA(AHC1,2)/EXPMA(VOL,2)+EXPMA(AHC1,5)/EXPMA(VOL,5)+EXPMA
(AHC1,10)/EXPMA(VOL,10)+EXPMA(AHC1,20)/EXPMA(VOL,20))/4,10),COLORYELLOW;
风向R:=1.06*AHC2,LINETHICK2,COLORWHITE;
吹:=1.13*AHC2,LINETHICK2,COLORWHITE;
ZT:=REF(C,1)*1.1-C<0.01 AND H=C;
飓风:=CROSS(C,风向R) AND ZT;
DRAWTEXT(飓风,H*1.01,'1'),COLORBLUE;
{7、黑夜之眼}
MMM:=1;
SVOL:=INTPART(SUM(V,0)/CAPITAL);
TJ0:=SVOL>REF(SVOL,1) OR BARSSINCE(CLOSE)=0;
SF1:=BARSLAST(TJ0)+1;
TJJ2:=SF1<REF(SF1,1);
S2:=IF(TJJ2,REF(SF1,1)+1,SF1);
S3:=SUM(TJJ2,0);
ZK1:="KD.K#WEEK"(9,3,3);
ZD2:="KD.D#WEEK"(9,3,3);
ZF1:="MACD.DIF#WEEK"(5,34,5);
ZA2:="MACD.DEA#WEEK"(5,34,5);
换手:=V/CAPITAL*100,LINETHICK0;
JCD:=CROSS(ZK1,ZD2) AND REF(ZD2,1)<60;
波段低点:=EXIST(JCD,MMM),COLORYELLOW,NODRAW;
DRAWTEXT(波段低点,L*0.98,'1'),COLORGREEN;
{2、A3及A15D}
A:=EMA((EMA(C,29)+EMA(C,31)+EMA(C,33))/3,3);
A1:=EMA((EMA(C,1)+EMA(C,3)+EMA(C,5))/3,3),COLOR1010FF;
A2:=EMA((EMA(C,3)+EMA(C,5)+EMA( C,7))/3,3),COLOR1020FF;
A3:=IF(K2!=2,EMA((EMA(C,5)+EMA(C,6)+EMA( C,7))/3,3),DRAWNULL),COLORCYAN,LINETHICK3;
A4:=IF(K2!=2, EMA((EMA(C,7)+EMA(C,9)+EMA( C,11))/3,3),DRAWNULL),COLOR1040FF;
A5:=IF(K2!=2, EMA((EMA(C,9)+EMA(C,11)+EMA( C,13))/3,3),DRAWNULL)COLOR1050FF;
A6:=IF(K2!=2, EMA((EMA(C,11)+EMA(C,13)+EMA( C,15))/3,3),DRAWNULL)COLOR1060FF;
A7:=IF(K2!=2, EMA((EMA(C,13)+EMA(C,15)+EMA( C,17))/3,3),DRAWNULL)COLOR1070FF;
A8:=IF(K2!=2, EMA((EMA(C,15)+EMA(C,17)+EMA( C,19))/3,3),DRAWNULL)COLOR1080FF;
A9:=IF(K2!=2, EMA((EMA(C,17)+EMA(C,19)+EMA( C,21))/3,3),DRAWNULL),COLORLIMAGENTA;
A10D:=IF(K2!=2, EMA((EMA(C,19)+EMA(C,21)+EMA( C,23))/3,3),DRAWNULL),COLORLIMAGENTA;
A11D:=IF(K2!=2, EMA((EMA(C,21)+EMA(C,23)+EMA( C,25))/3,3),DRAWNULL),COLORWHITE,LINETHICK2;
A15D:IF(K2!=2, A-(A1-A*0.977),DRAWNULL),COLORBLUE,LINETHICK3;
{11、变色下插线}
B55:=ATAN((A15D/REF(A15D,1)-1)*100)*180/3.1416;
IF(55>30 AND A15D>REF(A15D,1), A15D,DRAWNULL),COLORCYAN,LINETHICK3;
B100:=ATAN((M5/REF(M5,1)-1)*100)*180/3.1416;
IF(B55<0 AND A15D<REF(A15D,1), A15D,DRAWNULL),COLORRED,LINETHICK3;
{12、黄色起飞跑道}
OUT1:=CROSS(M5,A15D);
DRAWICON(OUT1,L*0.96,13);{红球}
{三轨主图}
MC:=100;
NN:=0.4;
MIDZ:MA(CLOSE,MC),COLORWHITE,LINETHICK3;
{4、大叉出现在坑边!}
BCC:=MA(CLOSE,34)+MA(CLOSE,34)-REF(MA(CLOSE,34),1);
分水岭C:=IF(MA(CLOSE,161)<BCC,BCC,MA(CLOSE,161)),LINETHICK1,POINTDOT;
下插线C:分水岭C-(EMA(C,3)-分水岭C),LINETHICK3,COLORYELLOW;
XGC:IF(下插线C>AN3,下插线C,DRAWNULL),COLORBROWN,LINETHICK3;
{越过有道120上穿MIDZ,红色三线}
OUT11:=CROSS(M5,A15D);
DRAWTEXT(OUT11,L*0.98,'3'),COLORYELLOW;
{★坑边信赖}
QFO3:=100-3*SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*100,5,1)
+2*SMA(SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*100,20,1),8,1);
QFO4:=100-3*SMA((OPEN-LLV(LOW,66))/(HHV(HIGH,66)-LLV(LOW,66))*100,8,1)
+2*SMA(SMA((OPEN-LLV(LOW,66))/(HHV(HIGH,66)-LLV(LOW,66))*100,20,1),5,1);
QFO5:=QFO3<REF(QFO4,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);
XG2C:=IF(QFO5 AND COUNT(QFO5,30)=1,20,0),STICK,LINETHICK2,COLORRED;
{STICKLINE(XG2C,L*1.02,L*1.27,0.00001,0),COLORCYAN;}
DRAWTEXT(C>REF(C,1) AND REF(RSI,1)>0 AND XG2C,L*0.98,'3'),COLORBLUE;
{▲主图有金坑吸筹,无金坑放弃。}
LCF:=REF(CLOSE,1);
RSI5:=((SMA(MAX((CLOSE - LCF),0),5,1) / SMA(ABS((CLOSE - LCF)),5,1)) * 100);
TR1F:=SUM(MAX(MAX((HIGH - LOW),ABS((HIGH - REF(CLOSE,1)))),ABS((LOW - REF(CLOSE,1)))),10);
HD:=(HIGH - REF(HIGH,1));
LD:=(REF(LOW,1) - LOW);
DMP:=SUM(IF(((HD > 0) AND (HD > LD)),HD,0),10);
DMM:=SUM(IF(((LD > 0) AND (LD > HD)),LD,0),10);
PDI:=((DMP * 100) / TR1F);
MDI:=((DMM * 100) / TR1F);
ADX:=MA(((ABS((MDI - PDI)) / (MDI + PDI)) * 100),5);
AV:=(RSI5 + ADX);
DXR:=(((ADX + REF(ADX,5)) / 2) + RSI5);
WR10:=((100 * (HHV(HIGH,60) - CLOSE)) / (HHV(HIGH,60) - LLV(LOW,60)));
NEWVOL:=(RSI5 - WR10);
金坑买入:=(AV + NEWVOL);
买入选股:=IF(CROSS(金坑买入,0),1,0),STICK,COLORRED;
VAR1Z:=SMA(买入选股,8,1);
VAR2Z:=SMA(VAR1Z,8,1),COLOR0000FF;
VAR3Z:=SMA(VAR2Z,10,1),COLOR00FFFF;
金坑吸筹:=IF(CROSS(VAR2Z,VAR3Z) AND (VAR2Z<40),5,0* 10000),COLOR0000FF,LINETHICK1;
DRAWTEXT(金坑吸筹>0,L*0.98,'1'),COLORYELLOW;
{做多资金上穿空方趋势线出洋红球13,为趋势走强信号,★下有金坑才拉升}
A50A:=33,COLORBLUE,LINETHICK1;
VAR0:=(2*CLOSE+HIGH+LOW)/4;
BCA:=MA((VAR0-LLV(LOW,17))/(HHV(HIGH,17)-LLV(LOW,17))*100,2);
做多资金:=EMA(BCA,3),LINETHICK1,COLORYELLOW;
做空资金:=EMA(做多资金,18),COLORGRAY,LINETHICK1;
VAR4C:=(HHV(HIGH,10)-CLOSE)/(HHV(HIGH,10)-LLV(LOW,10))*100;
空方趋势线:=SMA(VAR4C,3,1)+0.17,COLORLIGREEN,LINETHICK3;
OUT66:=CROSS(做多资金,A50A);
DRAWTEXT(OUT66,L*0.98,'2'),COLORYELLOW;
{XGL上穿下插线C,★大叉出现}
OUTL:=CROSS(M5,下插线C);
DRAWTEXT(OUTL,H*1.01,'2'),COLORRED;
{4、潜伏。飓风眼}
M5F:=MA(C,4);
M10F:=MA(C,8),COLORRED,LINETHICK2;
M20F:=MA(C,20);
M60F:=MA(C,60),COLORBLUE,LINETHICK2;
D3:=MIN(MIN(M5F,M10F),M20F)>M60F;
LLM:=LLV("MACD.MACD"*100,200);
HHM:=HHV("MACD.MACD"*100,200);
TJA:=C>REF(C,1)*1.05;
T:=BARSLAST(C>REF(C,1)*1.095 AND C=H);
T2L:=BARSLAST(C<REF(C,1)*1.095 AND C>REF(C,1)*1.08);
T3L:=BARSLAST(C<REF(C,1)*1.08 AND C>REF(C,1)*1.07);
T4L:=BARSLAST(C<REF(C,1)*1.07 AND C>REF(C,1)*1.06);
T5L:=BARSLAST(C<REF(C,1)*1.06 AND C>REF(C,1)*1.05);
AAF1:=REF(T,1)>100 AND REF(T2L,1)>100 AND REF(T3L,1)>100 AND REF(T4L,1)>100 AND REF(T5L,1)>80 AND TJA;
XGT:=BARSLAST(AAF1 AND HHM<60 AND LLM>-55);
D6:=BARSSINCEN(MIN(MIN(M5F,M10F),M20F)>M60F,XGT+1);
XGX:=CROSS((XGT=0 AND D3) OR D6=0,0.5);
TJJ:=COUNT(XGX,30)=2 AND XGX;
SR1:=REF(HIGH,10)=HHV(HIGH,2*10+1);
SR2:=FILTER(SR1,10);
SR3:=REF(SR2,10+1);
HDF:=REF(SR3,10);
前高:=REF(H,BARSLAST(HDF));
倍量:=VOL/REF(VOL,1)>=1.9;
突破前高:=CROSS(C,前高);
YG:= 倍量 AND 突破前高;
低2:=IF(CURRBARSCOUNT<=60, CONST(IF(ISLASTBAR=1,LLV(L, BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL);
SJ:=BARSLAST(YG);
DIF:=MACD.DIF;
H300:=HHVBARS(DIF,300);
AL:=BOLL.UB;
TQ:=BARSLAST(CROSS(AL>=REF(AL,1),0.5));
E25:=EXPMA(C,25);
ZF:=EVERY(RANGE(C/REF(C,1),0.97,1.05),TQ+1);
ZFF:=(HHV(H,TQ+1)-LLV(L,TQ+1))/LLV(L,TQ+1)*100;
TJQ:=EVERY(MAX(C,O)/AL<1.02 ,TQ+1);
XL:=(ATAN((E25/REF(E25,TQ)-1)*100)*180/3.1415926);
TJ1Q:=CROSS(DIF>=REF(DIF,H300),0.5) AND ZFF<17 AND ZF AND TJQ;
躁动:=TJ1Q AND XL>75;
A1F:=REF(C,1);
AYFF:=REF(C,10);
A31F:=(AYFF-A1F)/A1F*100;
AA1F:=(A31F-REF(A31F,1));
选股1:=CROSS(AAF1,9.8);
A11F:=REF(V,1);
VAR8:=IF(VOL/CAPITAL>0.001,1,EXP(ABS(LOG(VOL/CAPITAL*100))))>2;
A13F:=VAR8/A11F;
AA3F:=(A13F-REF(A13F,1));
选股2:=CROSS(AA3F,500);
潜伏2:=选股1 AND 选股2;
GX:=潜伏2 OR 躁动 OR CURRBARSCOUNT=CONST(SJ)+2 OR TJJ OR (CCI<=100 AND L<=低2);
准备:=FILTER(GX=1,3);
A2A:=BARSCOUNT(C);
AH:=HHV(H,200);
A1L:=LLV(L,200);
A0:=(AH-A1L)/190;
B1F:=L-A0;
DRAWTEXT(准备,L*0.98, '2'),COLORWHITE;
DRAWTEXT(飓风,L*0.98,'2'),COLORBLUE;
{财神来敲门;有函数;不影响使用}
金童子:=C/REF(C,1)>1.048 AND C=H AND BETWEEN(FORCAST(V,4)
,0.2*FORCAST(V,12),2.1*FORCAST(V,12));
财神:=FILTER(金童子,10);{58}
DRAWTEXT(财神,H*1.01,'3 财神'),COLORMAGENTA;
DRAWICON(财神,L*1.05,9);
{乔治公爵的老枪准星之;杀手潜伏。}
火弹:=MA(C,3),COLORRED,LINETHICK3;
弹夹:=MA(LOW,13)*1.2,COLORMAGENTA;
来福线:=MA(LOW,17)*1.1,COLORYELLOW;
撞针:=MA(HIGH,13)*0.9,COLORWHITE;
扳机:=MA(HIGH,89)*0.8,COLORBROWN;
准星:=CROSS(火弹,撞针);
DRAWTEXT(准星,7,'3'),COLORWHITE;
{-金坑迎财神.★坑后上涨 ★买点柱 与K线黄金坑配合使用。}
A1J:=ABS(((3.48*CLOSE+HIGH+LOW)/4-EMA(CLOSE,10))/EMA(CLOSE,10));
A2J:=DMA(((2.15*CLOSE+LOW+HIGH)/4),A1J);
金坑:=EMA(A2J,5)*1;
金坑2:=EMA(A2J,200)*1.118;
探路:=(C-REF(C,1))/REF(C,1)*100>8;
金库:=CROSS(C,金坑) AND 探路;
RRFJ:=金库,STICK;
DRAWTEXT(RRFJ,L*0.98,'3'),COLORYELLOW;
{逃}
LCC:=REF(CLOSE,1);
RSIC:=SMA(MAX(CLOSE-LCC,0),6,1)/SMA(ABS(CLOSE-LCC),6,1)*100;
DRAWTEXT(CROSS(84,RSIC) , HIGH*1.1,'逃'),COLORYELLOW;
DRAWTEXT_FIX(1,0.01,0.01,0,'绿 1黑暗之眼;2红色三线;'),COLORGREEN;
DRAWTEXT_FIX(1,0.01,0.06,0,'蓝 1飓风;2飓风眼;3坑边信赖;'),COLORBLUE;
DRAWTEXT_FIX(1,0.01,0.11,0,'白 1坑后上涨;2潜伏;3杀手潜伏;'),COLORWHITE;
DRAWTEXT_FIX(1,0.2,0.01,0,'黄 1有金坑吸筹;2下有金坑才拉升;3金坑迎财神;'),COLORYELLOW;
DRAWTEXT_FIX(1,0.2,0.06,0,'红 1买点柱;2大叉出现;3财神来敲门;'),COLORRED;
风险提示:本指标公式仅作为知识分享,不构成任何投资建议,投资有风险,交易需谨慎。