通达信指标公式源码概况:

指标类别: 通达信指标公式

授权方式: 免费版

指标评级: ★★★★★

指标分类: 策略

画线方法: 副图

一、洗盘指标公式函数源码

  

STICKLINE(100,90,0,5,0),COLOR666600;  

N1:=9;N2:=5;N:=21;  

XIAO1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);  

XIAO2:=SMA(ABS(LOW-XIAO1),13,1)/SMA(MAX(LOW-XIAO1,0),10,1);  

XIAO3:=EMA(XIAO2,10);  

XIAO4:=LLV(LOW,33);  

XIAO5:=EMA(IF(LOW<=XIAO4,XIAO3,0),3);  

STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,3,0),COLOR000055;  

STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,2.6,0),COLOR000077;  

STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,2.1,0),COLOR000099;  

STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,1.5,0),COLOR0000BB;  

STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,0.9,0),COLOR0000DD;  

STICKLINE(XIAO5>REF(XIAO5,1),0,XIAO5,0.3,0),COLOR0000FF;  

STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,3,0),COLOR005500;  

STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,2.6,0),COLOR007700;  

STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,2.1,0),COLOR009900;  

STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,1.5,0),COLOR00BB00;  

STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,0.9,0),COLOR00DD00;  

STICKLINE(XIAO5<REF(XIAO5,1),0,XIAO5,0.3,0),COLOR00FF00;  

私募进场】:IF(XIAO5>REF(XIAO5,1),XIAO5,0),COLORRED,NODRAW;  

【私募洗盘】:IF(XIAO5<REF(XIAO5,1),XIAO5,0),COLORGREEN,NODRAW;  

B1:=(HHV(H,9)-C)/(HHV(H,9)-LLV(LOW,9))*100-70;  

B2:=SMA(B1,9,1)+100;  

B3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;  

B4:=SMA(B3,3,1);  

B5:=SMA(B4,3,1)+100;  

B6:=B5-B2;  

观望期:=IF(B6>60,B6-60,0);  

T1:=STICKLINE(REF(观望期,1)<观望期,观望期,REF(观望期,1),9,0),COLORYELLOW;  

T2:=STICKLINE(REF(观望期,1)>观望期,观望期,REF(观望期,1),9,0),COLORCYAN;{趋势背景}  

TAI1:=MA(C,1)/MA(REF(C,13),8)*100;  

TAI2:=MA(FORCAST(TAI1,21),3);  

TAI3:=REF(TAI1,1);  

TAI4:=REF(TAI1,2);  

邰1:=LLV(LOW,8);  

邰2:=HHV(HIGH,13);  

#股市黑客#:=EMA((CLOSE-邰1)/(邰2-邰1)*100,5),COLORRED,LINETHICK3;{输出后是趋势背景}  

※升跌临界※:=EMA(0.667*REF(#股市黑客#,1)+0.333*#股市黑客#,2),COLORGREEN,LINETHICK3;{输出后是趋势背景}  

VAR1:=(CLOSE>REF(CLOSE,1)ANDCLOSE>REF(CLOSE,2));  

VARD:=(CLOSE<REF(CLOSE,1)ANDCLOSE<REF(CLOSE,2));  

VARE:=(REF(VARD,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2));  

VARF:=(REF(VARE,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLOSE,2));  

VAR10:=(REF(VARF,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2));  

VAR11:=(REF(VAR10,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLOSE,2));  

VAR12:=(REF(VAR11,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2));  

VAR13:=(REF(VAR12,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLOSE,2));  

VAR14:=(REF(VAR13,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2));  

VAR15:=(REF(VAR14,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLOSE,2));  

VAR16:=(REF(VAR15,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2));  

VAR17:=(REF(VAR16,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLOSE,2));  

VAR18:=(REF(VAR17,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2));  

VAR19:=REF(VARDORVAREORVARFORVAR10ORVAR11ORVAR12ORVAR13ORVAR14ORVAR15ORVAR16ORVAR17ORVAR18,1)ANDVAR1;  

DIFF:=EMA(DCLOSE,12)-EMA(DCLOSE,26);{来自经典副B}  

DEA:=EMA(DIFF,9),COLORFFFF00;  

MACD:=(DIFF-DEA)*2;  

A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));  

A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));  

背离:=REF(CLOSE,A1+1)>CLOSEANDDIFF>REF(DIFF,A1+1)ANDCROSS(DIFF,DEA);  

顶背离:=REF(CLOSE,A2+1)<CLOSEANDREF(DIFF,A2+1)>DIFFANDCROSS(DEA,DIFF);  

¥①:IF(REF((MA(C,5)-C)/C>0.04AND(MA(C,10)-MA(C,5))/MA(C,5)>0.04AND观望期=0ANDC>REF(C,1),1),44,0),LINETHICK3,COLORCYAN;{进}  

¥②:IF(REF("KDJ.J",1)<0AND"KDJ.J">0ANDTAI1>=TAI2ANDTAI3>TAI4,34,0),LINETHICK3,COLOR0000FF;{进}  

¥③:IF(REF(#股市黑客#,1)<=13&&CROSS(#股市黑客#,※升跌临界※)&&REF(MA(C,55),1)>REF(MA(C,55),2)&&(VAR19ORREF(VAR19,1)),23,0),COLORBLUE,LINETHICK3;  

¥④:IF(底背离,57,0),LINETHICK3,COLORBROWN;  

DRAWTEXT(底背离,54,'←MACD底背离'),COLORWHITE;  

DRAWICON(REF(#股市黑客#,1)<=13&&CROSS(#股市黑客#,※升跌临界※)&&REF(MA(C,55),1)>REF(MA(C,55),2)&&(VAR19ORREF(VAR19,1)),25,5);  

DRAWICON(REF((MA(C,5)-C)/C>0.04AND(MA(C,10)-MA(C,5))/MA(C,5)>0.04AND观望期=0ANDC>REF(C,1),1),46,5);  

DRAWICON(REF("KDJ.J",1)<0AND"KDJ.J">0ANDTAI1>=TAI2ANDTAI3>TAI4,36,5),COLORYELLOW;  

VAR01:=LLV(L,10);VAR02:=HHV(H,25);  

趋势线:=EMA((C-VAR01)/(VAR02-VAR01)*4,4);  

价:=EMA(MA((((C-REF(C,1))+(H-REF(H,1))+(L-REF(L,1)))/3)/C,5),1);  

价5:=MA(价,5);  

量:=EMA(MA((V-REF(V,1))/V,5),1);  

量5:=MA(量,5);  

角:=1>(ATAN((C/REF(C,1)-1)*100)*180/3.14115926)>-1;  

W:=(C/REF(C,1))>1.01;  

横盘:=REF(((HHV(价,3)-LLV(价,3))/LLV(价,3)),1)<=(0.00/100)ANDREF(((HHV(价5,3)-LLV(价5,3))/LLV(价5,3)),1)<=(0.00/100);  

量横盘:=REF(((HHV(量,3)-LLV(量,3))/LLV(量,3)),1)<=(0.00/100)ANDREF(((HHV(量5,3)-LLV(量5,3))/LLV(量5,3)),1)<=(0.00/100);  

量比:=((量+REF(量,1)+REF(量,2))/(量5+REF(量5,1)+REF(量5,2)))>0.5;  

A:=COUNT(0.00<=价<=0.02AND0.00<=价5<=0.02,CROSS(价,价5))=1ANDW,COLORYELLOW;  

ABB:=COUNT(0.00<=价<=0.02AND0.00<=价5<=0.02,横盘AND量比AND量横盘AND角)=1ANDW,COLORRED;  

逃顶高手:=AANDABB;  

地量一:=MA(V,3)/MA(V,20)<0.4;  

地量二:=COUNT(V/(V,20)<0.4,3)=3;  

地量三:=V/MA(V,30)<0.5ANDV/HHV(V,30)<0.2;  

AA:=SUMBARS(vol,CAPITAL);  

地量四:=VOL<MA(VOL,AA)/3;  

地量选股:=(地量一OR地量二OR地量三OR地量四)=1AND(REF(地量一,1)ORREF(地量二,1)ORREF(地量三,1)ORREF(地量四,1))=0;  

P1:=5;  

P2:=4;  

VARAB:=LLV(LOW,P1);  

VARBB:=HHV(HIGH,P1);  

KA1:=MA((CLOSE-VARAB)/(VARBB-VARAB)*100,P2),COLORRED;  

DA1:=MA(0.667*REF(KA1,1)+0.333*KA1,2),COLORWHITE;  

庄家:=KA1;  

散户:=DA1;  

低吸:=CROSS(庄家,散户)AND庄家<30;  

VAR2D:=(2*CLOSE+HIGH+LOW)/4;  

VAR03:=IF(YEAR>=2099ANDMONTH>2,0,1);  

VAR04:=LLV(LOW,5);  

VAR05:=HHV(HIGH,4);  

庄家1:=EMA((VAR2D-VAR04)/(VAR05-VAR04)*100,4)*VAR03;  

散户1:=EMA(0.667*REF(庄家1,1)+0.333*庄家1,2)*VAR03;  

短进1:=CROSS(庄家1,散户1)AND庄家1<50AND29<庄家1;  

低吸1:=CROSS(庄家1,散户1)AND庄家1<30;  

买入:=逃顶高手AND低吸AND(短进1OR低吸1)AND趋势线>REF(趋势线,1);  

{短线买入立柱图}  

STICKLINE(买入,0,6,3,0),COLORRED;  

DRAWICON(买入,5,5)COLORFF00FF;  

DRAWTEXT(逃顶高手AND地量选股,2,'地量'),COLORYELLOW;  

DRAWTEXT(买入,4.5,'短线买入'),COLORYELLOW;VAR21:=REF(CLOSE,1);  

VAR22:=((SMA(MAX((CLOSE-VAR21),0),6,1)/SMA(ABS((CLOSE-VAR21)),6,1)*100));  

短期顶部:CROSS(+80,VAR22)*8,COLORWHITE,LINETHICK2,STICK;  

LC:=REF(CLOSE,1);  

RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;  

卖点:=CROSS(85,RSI1)*30,COLOR00FF00,LINETHICK2;  

卖:IF(卖点,6.5,0),STICK,COLORGREEN,LINETHICK4;  

洗钱A:=(CLOSE-LLV(LOW,32))/(HHV(HIGH,32)-LLV(LOW,32))*1.2*CLOSE;  

量1:=EMA(洗钱A,3);  

量2:=EMA(洗钱A,5);  

量3:=EMA(洗钱A,7);  

STICKLINE(量1>量2,量3,量1,3,1),COLORRED;  

STICKLINE(量1<量2,量3,量1,2,0),COLORCYAN;  

T1:=量2>量3AND量1<REF(量1,1);  

T2:=量2<量3AND量1>REF(量1,1);  

STICKLINE(T1,量1,量3,2,0),COLORYELLOW;  

STICKLINE(T2,量1,量3,3,1),COLORFF00FF;  

洗钱B:=SMA(洗钱A,13,1);  

分水岭:SMA(洗钱B,2.5,1.5),LINETHICK2,COLORWHITE;  

牛线:3*洗钱B-2*分水岭,LINETHICK2,COLORFF00FF;  

熊线:4*分水岭-3*洗钱B,LINETHICK2,COLORFF6633;  

DIF1:=EMA(C,12)-EMA(C,26);  

DEA1:=EMA(DIF1,9);  

MACD1:=2*(DIF1-DEA1);  

QZQ:=BARSLAST(REF(MACD,1)<0ANDMACD>0);  

QM:=LLVBARS(MACD1,QZQ+20);  

MQDZ:=IF(QM>QZQ,REF(MACD1,QM),0);  

QF:=LLVBARS(DIF1,QZQ+20);  

DQDZ:=IF(QF>QZQ,REF(DIF1,QF),0);  

XG1:=MACD1<0ANDMACD1>MQDZANDDIF1<0ANDDIF1>DQDZANDC=LLV(C,QZQ+20)ANDMQDZ<0ANDDQDZ<0;  

XG:REF(XG1,1)=1ANDMACD1>REF(MACD1,1);  

VAR21A:=(REF(HIGH,1)+REF(LOW,1))/2;  

VAR61:=REF(CLOSE,1);VAR70A:=SMA(MAX(CLOSE-VAR61,0),6,1)/SMA(ABS(CLOSE-VAR61),6,1)*100;  

DRAWICON(CROSS(90,VAR70A),H*0.8.04,9);MTM1:=C-REF(C,1);  

A013:=HHV(HIGH,34);  

A014:=(2*CLOSE+HIGH+LOW)/4;  

A015:=LLV(LOW,34);  

A016:=EMA(((A014-A015)/(A013-A015))*100,13);  

A017:=EMA(0.667*REF(A016,1)+0.333*A016,2);  

KKMD:=A016-A017>1ANDA016<30ANDA017<30;  

DRAWTEXT(FILTER(KKMD,30),L*0.05,'▲短买'),COLOR00FFFF;  

VAR06:=REF(C,1);  

VAR07:=SMA(MAX(C-VAR06,0),6,1)/SMA(ABS(C-VAR06),6,1)*100;  

DRAWTEXT(CROSS(82,VAR07),H*0.9,'◤减仓'),COLORGREEN;  

RSVB:=(C-LLV(L,25))/(HHV(HIGH,25)-LLV(L,25))*100;  

K:=SMA(RSVB,3,1);  

D:=SMA(K,3,1);  

J:=3*K-2*D;  

VARA6:=(2*C+H+L)/3;  

VARA7:=EMA(EMA(EMA(VARA6,4),4),4);  

VARA8:=(VARA7-REF(VARA7,1))/REF(VARA7,1)*100;  

VARA9:=MA(VARA8,3)+0.03;  

VARA10:=MA(VARA8,1);  

DRAWICON(CROSS(VARA9,VARA10)ANDJ>90,H*0.96,12),COLORGREEN;  

DRAWTEXT(CROSS(VARA9,VARA10)ANDJ>90,H*1.02,'卖'),COLORCYAN;  

LCD:=REF(CLOSE,1);  

RSI:=SMA(MAX(CLOSE-LCD,0),4.1,1)/SMA(ABS(CLOSE-LCD),4.1,1)*100;  

建仓:CROSS(RSI,11)*10,COLORRED;

image.png

二、洗盘线指标源码

  

VAR1:=SAR(10,2,20);  

S:IF(VAR1>C,VAR1,DRAWNULL),COLORRED,CIRCLEDOT;  

X:IF(VAR1<C,VAR1,DRAWNULL),COLORGREEN,CIRCLEDOT;  

B1:=REF(C,1);B2:=REF(C,2);  

SS:=IF(C>REF(C,1)ANDREF(C,1)>=REF(C,2),1,IF(C<REF(C,1)ANDREF(C,1)<=REF(C,2),-1,IF(C>REF(C,2)ANDREF(C,2)>REF(C,1),2,IF(C<REF(C,2)ANDREF(C,2)<REF(C,1),-2,0))));  

SM:=IF(REF(SS,1)>0ORREF(SS,1)<0,REF(SS,1),IF(REF(SS,2)>0ORREF(SS,2)<0,REF(SS,2),IF(REF(SS,3)>0ORREF(SS,3)<0,REF(SS,3),IF(REF(SS,4)>0ORREF(SS,4)<0,REF(SS,4),IF(REF(SS,5)>0ORREF(SS,5)<0,REF(SS,5),IF(REF(SS,6)>0ORREF(SS,6)<0,REF(SS,6),IF(REF(SS,7)>0ORREF(SS,7)<0,REF(SS,7),0)))))));  

VAR1:=SAR(10,2,20);  

S:IF(VAR1>C,VAR1,DRAWNULL),COLORRED,CIRCLEDOT;  

X:IF(VAR1<C,VAR1,DRAWNULL),COLORGREEN,CIRCLEDOT;  

B1:=REF(C,1);B2:=REF(C,2);  

SS:=IF(C>REF(C,1)ANDREF(C,1)>=REF(C,2),1,IF(C<REF(C,1)ANDREF(C,1)<=REF(C,2),-1,IF(C>REF(C,2)ANDREF(C,2)>REF(C,1),2,IF(C<REF(C,2)ANDREF(C,2)<REF(C,1),-2,0))));  

SM:=IF(REF(SS,1)>0ORREF(SS,1)<0,REF(SS,1),IF(REF(SS,2)>0ORREF(SS,2)<0,REF(SS,2),IF(REF(SS,3)>0ORREF(SS,3)<0,REF(SS,3),IF(REF(SS,4)>0ORREF(SS,4)<0,REF(SS,4),IF(REF(SS,5)>0ORREF(SS,5)<0,REF(SS,5),IF(REF(SS,6)>0ORREF(SS,6)<0,REF(SS,6),IF(REF(SS,7)>0ORREF(SS,7)<0,REF(SS,7),0)))))));  

MC:IF(REF(SS,1)>0ORREF(SS,1)<0,B2,IF(SM>0,MIN(B1,B2),MAX(B1,B2))),COLORFF00FF;  

STICKLINE(SS=1ORSM>=1ANDSS=0,B1,C,0.8,1),COLORRED;  

STICKLINE(SS=-1ORSM<=-1ANDSS=0,B1,C,0.8,0),COLORFF9000;  

STICKLINE(SS=2,B2,C,0.8,1),COLORRED;  

STICKLINE(SS=-2,B2,C,0.8,0),COLORFF9000;  

STICKLINE((SS=-1ORSS=-2)ANDSM>0,B2,B1,0.8,1),COLORRED;  

STICKLINE((SS=1ORSS=2)ANDSM<0,B2,B1,0.8,0),COLORFF9000;  

MC:IF(REF(SS,1)>0ORREF(SS,1)<0,B2,IF(SM>0,MIN(B1,B2),MAX(B1,B2))),COLORFF00FF;  

STICKLINE(SS=1ORSM>=1ANDSS=0,B1,C,0.8,1),COLORRED;  

STICKLINE(SS=-1ORSM<=-1ANDSS=0,B1,C,0.8,0),COLORFF9000;  

STICKLINE(SS=2,B2,C,0.8,1),COLORRED;  

STICKLINE(SS=-2,B2,C,0.8,0),COLORFF9000;  

STICKLINE((SS=-1ORSS=-2)ANDSM>0,B2,B1,0.8,1),COLORRED;  

STICKLINE((SS=1ORSS=2)ANDSM<0,B2,B1,0.8,0),COLORFF9000;  

DIF:=EMA(CLOSE,6)-EMA(CLOSE,16);  

DEA:=EMA(DIF,9);  

资金窗:CROSS(DIF,DEA)ANDDEA>-0.05,COLORFFFFFF,NODRAW;  

DRAWICON(资金窗,LOW*0.98,5);  

DRAWTEXT(资金窗>0,LOW*0.99,'资金窗'),COLORFFFFFF;  

VAR26:=EMA(CLOSE,2)-EMA(CLOSE,150);  

VAR27:=EMA(VAR26,100);  

VAR28:=2*(VAR26-VAR27);  

VAR29:=POW(VAR28,3)*0.1+POW(VAR28,1);  

VAR2A:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE));  

VAR2B:=EMA(VAR2A*0.97,3);  

VAR2C:=(HIGH+LOW+CLOSE)/3;  

VAR2D:=(VAR2C-MA(VAR2C,14))/(0.015*AVEDEV(VAR2C,14));  

龙抬头:=IF(VAR28>0.1,VAR29,0)*5,COLORCYAN;  

护盘:CROSS(VAR28,1),COLORFF9900,NODRAW;  

DRAWICON(护盘,LOW*0.96,31);  

DRAWTEXT(护盘>0,LOW*0.95,'护盘'),COLORFF9900;  

后金窗:COUNT(L=LLV(L,20),20)=1ANDL=LLV(L,20),NODRAW,COLORFF00FF;  

DRAWICON(后金窗,LOW*1,22);  

DRAWTEXT(后金窗>0,LOW*0.99,'后金窗'),COLORFF00FF;  

STICKLINE(后金窗ANDFILTER(后金窗,31)>0,L*1.01,L*1.01,300,0),COLORYELLOW;  

C3:=REF(C,1);  

涨停:=IF((C-C3)*100/C3>=(10-0.01*100/C3),1,0);  

STICKLINE(涨停,OPEN,CLOSE,3,0),COLORYELLOW;  

跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);  

STICKLINE(跌停,OPEN,CLOSE,2,0),COLORGREEN;  

RC1:=REF(C,1);  

涨停率10:=10-1/RC1;  

涨停率5:=5-1/RC1;  

比前涨率:=(C-RC1+0.004)*100/RC1;  

比前跌率:=(RC1-C-0.004)*100/RC1;  

本日涨率:=(C-O+0.004)*100/O;  

本日跌率:=(O-C-0.004)*100/O;  

大阳线:=C>OAND(比前涨率>=涨停率5OR本日涨率>=涨停率5)  

AND比前涨率<涨停率10AND涨停=0;  

STICKLINE(大阳线,O,C,3,0),COLOR0000BB;  

大阴线:=C<OAND(比前跌率>=涨停率5OR本日跌率>=涨停率5)  

AND比前跌率<涨停率10AND跌停=0;  

STICKLINE(大阴线,O,C,3,0),COLORLIGREEN;  

HIGHN:=10;  

AAB:=REF(H,HIGHN)=HHV(H,2*HIGHN+1);  

QY:=BACKSET(AAB,HIGHN+1);  

CC:=FILTER(QY,HIGHN)ANDH=HHV(H,HIGHN+1);  

DRAWICON(CC,H*1.01,2);  

DRAWTEXT(CC>0,H*1,'洗盘'),COLORFFFFFF;  

涨停2:=(C/REF(C,1))>1.095;  

STICKLINE(涨停2,HIGH,OPEN,1,0),COLORYELLOW;  

跌停2:=C/REF(C,1)<0.9;  

STICKLINE(跌停2,HIGH,LOW,1,0),COLORGREEN;  

VAR1:=(EMA(C,12)-EMA(C,26))*100+50;  

VAR2:=EMA(VAR1,9);  

VAR3:=((HHV(H,21)-C)/(HHV(H,21)-LLV(L,21)))*100-10;  

VAR4:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;  

STICKLINE(C>REF(C,1),H,L,0,0),COLOR0000FF;  

STICKLINE(C>REF(C,1),O,C,3.1,1),COLOR000066;  

STICKLINE(C>REF(C,1),O,C,2.6,1),COLOR000099;  

STICKLINE(C>REF(C,1),O,C,2,1),COLOR0000CC;  

STICKLINE(C>REF(C,1),O,C,1.2,1),COLOR0000FF;  

STICKLINE(C>REF(C,1),O,C,0.4,1),COLORCC66FF;  

STICKLINE(C<REF(C,1),H,L,0,0),COLORFF0000;  

STICKLINE(C<REF(C,1),O,C,3.1,1),COLORCC0000;  

STICKLINE(C<REF(C,1),O,C,2.6,1),COLORFF4400;  

STICKLINE(C<REF(C,1),O,C,2,1),COLORFF8800;  

STICKLINE(C<REF(C,1),O,C,1.2,1),COLORFFCC00;  

STICKLINE(C<REF(C,1),O,C,0.4,1),COLORFFFF00;  

STICKLINE(C=REF(C,1),H,L,0,0),COLORFFFFFF;  

STICKLINE(C=REF(C,1),O,C,3.1,1),COLOR777777;  

STICKLINE(C=REF(C,1),O,C,2.6,1),COLOR999999;  

STICKLINE(C=REF(C,1),O,C,2,1),COLORBBBBBB;  

STICKLINE(C=REF(C,1),O,C,1.2,1),COLORDDDDDD;  

STICKLINE(C=REF(C,1),O,C,0.4,1),COLORFFFFFF;  

A0:=(L+H+C*2)/4;  

工作:EMA(A0,14)COLORYELLOW,LINETHICK1;  

度假:EMA(A0,25)COLORGREEN,LINETHICK2;  

A1X:=(工作-REF(工作,1))/REF(工作,1)*100;  

A2X:=(度假-REF(度假,1))/REF(度假,1)*100;  

G:=BARSLAST(CROSS(A1X,0));  

买入止损:REF(A0,G),COLORWHITE,LINETHICK1;  

A2:=3*EMA((C-LLV(L,30))/(HHV(H,30)-LLV(L,30))*100,5)-2*EMA((C-LLV(L,30))/(HHV(H,30)-LLV(L,30))*100,5);  

A4:=(HHV(H,34)-C)/(HHV(H,34)-LLV(L,34))*100;  

A5:=EMA(CLOSE,12)-EMA(CLOSE,26);  

A6:=EMA(A5,9);  

A7:=(A5<-0.1ANDA5>A6);  

财神:IF(A7,LLV(L,21),DRAWNULL)COLORRED,CIRCLEDOT;  

DRAWICON(CROSS(A2,EMA(A2,5))AND(A4-EMA(A2,5))>40ANDA7,LLV(L,21)*1.02,1);  

STICKLINE(C>REF(C,1)*1.09,C,O,3.1,0)COLOR000055;  

STICKLINE(C>REF(C,1)*1.09,C,O,2.6,0)COLOR000077;  

STICKLINE(C>REF(C,1)*1.09,C,O,2.1,0)COLOR000099;  

STICKLINE(C>REF(C,1)*1.09,C,O,1.5,0)COLOR0000BB;  

STICKLINE(C>REF(C,1)*1.09,C,O,0.9,0)COLOR0000DD;  

STICKLINE(C>REF(C,1)*1.09,C,O,0.3,0)COLOR0000FF;  

STICKLINE(C<REF(C,1)*0.901,C,O,3.1,0)COLOR005500;  

STICKLINE(C<REF(C,1)*0.901,C,O,2.6,0)COLOR007700;  

STICKLINE(C<REF(C,1)*0.901,C,O,2.1,0)COLOR009900;  

STICKLINE(C<REF(C,1)*0.901,C,O,1.5,0)COLOR00BB00;  

STICKLINE(C<REF(C,1)*0.901,C,O,0.9,0)COLOR00DD00;  

STICKLINE(C<REF(C,1)*0.901,C,O,0.3,0)COLOR00FF00;  

减:IF(A2X>=0,度假,DRAWNULL),COLORMAGENTA,LINETHICK2;  

少:IF(A1X>=0,工作,DRAWNULL),COLORRED,LINETHICK2;  

操:IF(A1X>=0,买入止损,DRAWNULL),LINETHICK2,COLORRED;  

作:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.1,REF(A0,BARSLAST(CROSS(A1X,0)))*1.1,DRAWNULL),COLORGREEN,POINTDOT;  

顺:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.2,REF(A0,BARSLAST(CROSS(A1X,0)))*1.2,DRAWNULL),COLORGREEN,POINTDOT;  

应:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.3,REF(A0,BARSLAST(CROSS(A1X,0)))*1.3,DRAWNULL),COLORGREEN,CIRCLEDOT;  

趋:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.4,REF(A0,BARSLAST(CROSS(A1X,0)))*1.4,DRAWNULL),COLORGREEN,POINTDOT;  

势:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.5,REF(A0,BARSLAST(CROSS(A1X,0)))*1.5,DRAWNULL),COLORGREEN,POINTDOT;  

破:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.6,REF(A0,BARSLAST(CROSS(A1X,0)))*1.6,DRAWNULL),COLORGREEN,POINTDOT;  

位:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.7,REF(A0,BARSLAST(CROSS(A1X,0)))*1.7,DRAWNULL),COLORGREEN,POINTDOT;  

出:IF(H>=REF(A0,BARSLAST(CROSS(A1X,0)))*1.8,REF(A0,BARSLAST(CROSS(A1X,0)))*1.8,DRAWNULL),COLORGREEN,POINTDOT;  

C2:=REF(C,1);  

涨停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),1,0);  

STICKLINE(涨停,OPEN,CLOSE,1.5,0),COLORRED;  

STICKLINE(涨停,H,L,0,0),COLORRED;  

跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2),1,0);  

STICKLINE(跌停,OPEN,CLOSE,1.5,0),COLORGREEN;  

STICKLINE(跌停,H,L,0,1),COLORGREEN;  

image.png

[源码注释]通达信公式动态翻译结果

YX1赋值:2日前的收盘价/3日前的收盘价>1.095 AND 2日前的最高价=2日前的收盘价

YX2赋值:1日前的收盘价/2日前的收盘价<0.95 OR (1日前的收盘价/2日前的收盘价<0.96 and="">1.05)

YX3赋值:收盘价/1日前的收盘价>1.03

输出夹阴抓板:YX1 AND YX2 AND YX3

推荐阅读:洗盘结束公式源码

  

N:=20;  

P:=1.618;  

TYP:=(HIGH+LOW+CLOSE+OPEN)/4;  

CCI:=(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));  

MV:=FORCAST(OBV,3);  

CCIV:=(MV-MA(MV,N))/(0.015*AVEDEV(MV,N));  

{布林线信号}  

CC:FORCAST((CCI+CCIV)/2,3),LINETHICK2;  

中轨:MA(CC,N);  

上轨:中轨+P*STD(CC,N);  

下轨:中轨-P*STD(CC,N);  

{DRAWICON(CROSS(CC,下轨),下轨*1.2,1);{买信号B}  

{DRAWICON(CROSS(上轨,CC),上轨*1.2,2);{卖信号S}  

100,POINTDOT;  

-100,POINTDOT;  

主力持仓:EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3),COLORMAGENTA,LINETHICK2;  

主力筹码集中度:WINNER(C)*100,COLORRED,LINETHICK2;  

散筹筹码集中度:(WINNER(C*1.1)-WINNER(C*0.9))*100,COLORGREEN,LINETHICK2;  

强弱分界:80,COLORYELLOW;  

趋势线:3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);  

VAR1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);  

VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1);  

VAR3:=EMA(VAR2,10);  

VAR4:=LLV(LOW,33);  

VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),3);  

主力进场:  

STICKLINE(VAR5>REF(VAR5,1),0,VAR5,7,0),COLORRED;  

洗盘:  

STICKLINE(VAR5<REF(VAR5,1),0,VAR5,7,0),COLORGREEN;  

T:=BARSLAST(H=HHV(H,60)ANDC<OANDO>REF(C,1)ANDH/L>1.05);  

TJ1:=EVERY(C<REF(C,1),2);  

TJ2:=EVERY(L<=REF(L,1),2);  

LT:=BARSLAST(REF(T,2)=0ANDTJ1ANDTJ2);  

TJ3:=T-LT=2ANDC>REF(C,T)*1.02;  

TJ4:=BARSLASTCOUNT(C>O)=4ANDC/REF(C,1)>1.045;  

XG1:=REF(EVERY(MAX(C,O)<REF(H,T),T),1)ANDO>REF(H,1)ANDTJ3ANDT<15ANDNOT(TJ4);  

XG:=COUNT(XG1,T)=1ANDXG1;  

QF:=BACKSET(XG=1,T+1);  

QFT:=BARSLAST(CROSS(QF=1,0.5));  

DRAWTEXT(QFT=0,H*1.1,'开始洗盘'),COLORYELLOW;  

DRAWICON(QFT=0,H,12);  

STICKLINE(QFT>=0ANDQF=1,REF(H,T),REF(H,T),4,-1),COLORLIBLUE;  

DRAWTEXT(XG=1,L*0.95,'买'),COLORYELLOW;  

DRAWICON(XG=1,L,11);  

n1:=6;n2:=12;  

q1:=(close*vol)/sum(vol,100);  

a1:=ma(q1,n1);  

zm1:=sma(a1,n1,1);  

zm2:=sma(a1,n2,1);  

zmf:(zm1-zm2)*10000,colorstick,linethick2;  

fm:sma(zmf,3,1);  

t1:=if(c>ma(close,13),1,0);  

t2:=if(c<ma(close,13),1,0);  

t3:=count(if(zmf>0andzmf>ref(zmf,1),1,0),4)>=4;  

t4:=count(if(zmf<0,1,0),5)>=5;  

t5:=filter(t1andt4,20);  

t6:=filter(t2andt3,20);  

drawtext(t5,zmf-3,'洗盘谷'),colorgreen;  

drawtext(t6,zmf+3,'建仓峰'),coloryellow;  

LR:=36;  

B:=13;  

N:=100;  

UR:=5;  

SHORT:=21;  

LONG:=44;  

MIDD:=11;  

M:=11;  

{KDJ的MACD}  

RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;  

K:=SMA(RSV,3,1);  

D:=SMA(K,3,1);  

J:=3*K-2*D;  

DIFF:EMA(J,8)-EMA(J,16),COLOR0044FF;  

DEA:EMA(DIFF,5),COLOR00FF00;  

DRAWBAND(DIFF,RGB(255,80,0),DEA,RGB(0,255,100));  

MACD:2*(DIFF-DEA),COLORSTICK;  

0,COLORFF9900,DOTLINE;  

{卖}  

KC:=FORCAST(((2*C+H+L)/4*0.618+C*0.382),3);  

AAX:=(KC-MA(KC,9))/MA(KC,9)*100;  

VAR0:=MIN(EXIST(KC,55),9);  

AAX1:=EMA(AAX,VAR0)*VAR0;  

AAX2:=MA(AAX1,3);  

AAX3:=MA(AAX1,5);  

DRAWTEXT(AAX3>10ANDAAX1<REF(AAX1,1)ANDCROSS(AAX2,AAX1),12,'卖'),COLOR00FFFF,LINETHICK3;  

DRAWTEXT(AAX3>10ANDAAX1<REF(AAX1,1)ANDCROSS(AAX2,AAX1),15,'◆'),COLOR0000FF,LINETHICK3;  

DRAWTEXT_FIX(1,0.02,0,0,'■现在KDJ的参数是:N=9,M1=3,M2=3;'),COLOR0000FF;  

DRAWTEXT_FIX(1,0.02,0.1,0,'■【KDJ】的【MACD】的参数是:LONG=8,LONG=16,M=5;'),COLOR00FF00;

image.png

每日公式解答:

公式编写要求:

长上影线幅度大于3个点的选股公式。

公式编写方法:

XG:H/MAX(C,O)>1.02;

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。