以下是通达信瀑布线源码副图
{瀑布线}
VAR100:={IF(DATE<1150730 AND DATE>900101,1,0)}1;
VAR1:=(2*CLOSE+HIGH+LOW+OPEN)*VAR100/5;
A1: (EMA(VAR1,3)*VAR100+EMA(VAR1,6)*VAR100+EMA(VAR1,12)*VAR100+EMA(VAR1,24))/4*VAR100;
A2: EMA(A1,2),COLORLIGRAY;
A3: EMA(A2,2)*VAR100;
A4: EMA(A3,2)*VAR100;
A5: EMA(A4,2)*VAR100;
A6: EMA(A5,2)*VAR100;
A7: EMA(A6,2)*VAR100;
长趋线:EMA(CLOSE,55)*VAR100, CIRCLEDOT;
VAR11:=MA(CLOSE,1)*VAR100;
VAR22:=MA(CLOSE,3)*VAR100;
VAR33:MA(VAR22,1)*VAR100;
VAR44:MA(VAR22,3)*VAR100;
STICKLINE(VAR33>VAR44*VAR100,VAR33*VAR100,VAR44*VAR100,1,0),COLORFF00FF;
STICKLINE(VAR33<VAR44*VAR100,VAR33*VAR100,VAR44*VAR100,1,0),COLORFFCC00;
A:=IF(CLOSE>=OPEN,(CLOSE-OPEN)/4,0)*VAR100;
{阳线上下影}
STICKLINE(CLOSE>=OPEN,CLOSE,HIGH,0,0), COLORRED;
STICKLINE(CLOSE>=OPEN,OPEN,LOW,0,0), COLORRED;
{阴线上下影}
STICKLINE(CLOSE<OPEN,OPEN,HIGH,0,0), COLOR00EC00;
STICKLINE(CLOSE<OPEN,CLOSE,LOW,0,0), COLOR00EC00;
{阳K线}
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,2.8.2,0),COLOR0000B5;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,1.9.2,0),COLOR0000C5;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,1.8,0),COLOR0000D4;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,0.4,0),COLOR0000EC;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,0.2,0),COLOR0000FF;
{阴K线}
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,2.8.2,0),COLOR009000;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,1.9.2,0),COLOR00B400;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,1.8,0),COLOR00C100;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,0.4,0),COLOR00DB00;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,0.2,0),COLOR00EC00;
ZDZ:=CONST(HHV(MAX(H,长趋线),120));
ZXZ:=CONST(LLV(MIN(L,长趋线),120));
T1:=IF(FINDSTR(EXTERNSTR(0,13),'万元'),STRCAT('敢死队席位:',EXTERNSTR(0,13)),'');
T2:=IF(FINDSTR(EXTERNSTR(0,12),'。'),STRCAT('智能诊断:',EXTERNSTR(0,12)),'');
T3:=IF(FINDSTR(EXTERNSTR(0,8),'公告'),STRCAT('年报业绩:',EXTERNSTR(0,8)),'');
T4:=IF(FINDSTR(EXTERNSTR(0,10),','),STRCAT('主题投资:',EXTERNSTR(0,10)),'');
T5:=IF(FINDSTR(EXTERNSTR(0,15),'-'),STRCAT('解禁日期:',EXTERNSTR(0,15)),'');
T6:=IF(FINDSTR(EXTERNSTR(0,1),','),STRCAT('决策提示:',EXTERNSTR(0,1)),'');
T7:=IF(FINDSTR(EXTERNSTR(0,14),'-'),STRCAT('业绩预报:',EXTERNSTR(0,14)),'');
T8:=IF(FINDSTR(EXTERNSTR(0,11),'-'),STRCAT('机构评级:',EXTERNSTR(0,11)),'');
T9:=IF(FINDSTR(EXTERNSTR(0,9),'-'),STRCAT('中报业绩:',EXTERNSTR(0,9)),'');
N:=IF(TOTALBARSCOUNT>=120,120,TOTALBARSCOUNT);
{本输出适用于锁定K线数为120,N可改为你习惯的K线数,见下图}
HH0:=HHV(H,N);
LL0:=LLV(L,N);
MM0:=CONST((HH0+LL0)*0.5);
S01:=CONST(IF(REF(C,N-15)>MM0,1.00,-0.08));
S02:=CONST(IF(REF(C,N-15)>MM0,-1,1));
S1:=IF(FINDSTR(EXTERNSTR(0,13),'万元'),S01+(0.08*S02),S01),NODRAW;
S2:=IF(FINDSTR(EXTERNSTR(0,12),'。'),S1+(0.08*S02),S1),NODRAW;
S3:=IF(FINDSTR(EXTERNSTR(0,8),'公告'),S2+(0.08*S02),S2),NODRAW;
S4:=IF(FINDSTR(EXTERNSTR(0,10),','),S3+(0.08*S02),S3);
S5:=IF(FINDSTR(EXTERNSTR(0,15),'-'),S4+(0.08*S02),S4);
S6:=IF(FINDSTR(EXTERNSTR(0,1),','),S5+(0.08*S02),S5);
S7:=IF(FINDSTR(EXTERNSTR(0,14),'-'),S6+(0.08*S02),S6);
S8:=IF(FINDSTR(EXTERNSTR(0,11),'-'),S7+(0.08*S02),S7);
S9:=IF(FINDSTR(EXTERNSTR(0,9),'-'),S8+(0.08*S02),S8);
KK:=IF(S1<=0,0.05,IF(S1>=0,-0.05,0));
DRAWTEXT_FIX(1,0,S1+KK,0,T1)COLOR00FFFF;
DRAWTEXT_FIX(1,0,S4+KK,0,T4)COLOR0088FF;
DRAWTEXT_FIX(1,0,S5+KK,0,T5)COLOR00FF00;
DRAWTEXT_FIX(1,0,S6+KK,0,T6)COLOR0000FF;
DFX:=(ZDZ-ZXZ)/6;
LWS:=CURRBARSCOUNT;
DRAWTEXT(LWS=50 AND NOT(CONST(VAR100)),ZDZ-1*DFX,'WWW.88GS.COM'),COLORFF00FF;