通达信指标公式源码概况:
指标类别: 通达信指标公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
VAR2:=(H+L+O+2*C)/5;
低吸线:EMA(SLOPE(VAR2,21)*20+VAR2,55);
BB:=LLV(H,1);
神顶线:FORCAST(FORCAST(BB,15),15), COLORYELLOW,LINETHICK2;
神顶逃顶抄底线:FORCAST(FORCAST(BB,25),25), COLORRED,LINETHICK2;
IF(SLOPE(神顶抄底逃顶线,2)0,低吸线,C),CIRCLEDOT,COLORMAGENTA;
C,CIRCLEDOT,COLORBLACK;
VAR20:=(C*2+H+L)/4;
VAR3:=EMA(VAR20,3);
VAR4:=EMA(VAR3,6);
L1:=EMA(VAR20,3);
L2:=EMA(VAR3,4);
L3:=EMA(VAR4,5);
VAR5:=REF(L1,1)L1 AND L1L2;
STICKLINE(L1=L2,H,L,1,0),COLORRED;
STICKLINE(L1L2,H,L,1,0),COLORGREEN;
STICKLINE(L1=L2,C,O,4,0),COLORRED;
STICKLINE(L1L2,C,O,4,0),COLORGREEN;
STICKLINE(VAR5,H,L,1,0) COLORYELLOW;
STICKLINE(VAR5,C,O,4,0) COLORYELLOW;
实时线:MA(CLOSE,1),COLORYELLOW;
VAR1:=CLOSEREF(CLOSE,1) AND CLOSEREF(CLOSE,2);
VAR2:=REF(VAR1,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,2);
VAR3:=REF(VAR2,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,2);
VAR4:=REF(VAR3,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,2);
VAR5:=REF(VAR4,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,2);
VAR6:=REF(VAR5,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,2);
VAR7:=REF(VAR6,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,2);
VAR8:=REF(VAR7,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,2);
VAR9:=REF(VAR8,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,2);
VARA:=REF(VAR9,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,2);
VARB:=REF(VARA,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,2);
VARC:=REF(VARB,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,2);
STICKLINE(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR
VAR8 OR VAR9 OR VARA OR VARB OR VARC,CLOSE,REF(CLOSE,1),3,1),COLORRED;{红1}
VARD:=CLOSEREF(CLOSE,1) AND CLOSEREF(CLOSE,2);
VARE:=REF(VARD,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,2);
VARF:=REF(VARE,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,2);
VAR10:=REF(VARF,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,2);
VAR11:=REF(VAR10,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,2);
VAR12:=REF(VAR11,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,2);
VAR13:=REF(VAR12,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,2);
VAR14:=REF(VAR13,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,2);
VAR15:=REF(VAR14,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,2);
VAR16:=REF(VAR15,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,2);
VAR17:=REF(VAR16,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,2);
VAR18:=REF(VAR17,1) AND CLOSE=REF(CLOSE,1) AND CLOSE=REF(CLOSE,2);
STICKLINE(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR
VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,CLOSE,REF(CLOSE,1),3,0),COLORFFCC66;
VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR
VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;
STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),4,1),COLORYELLOW;
VAR1A:=REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR
VAR8 OR VAR9 OR VARA OR VARB OR VARC,1) AND VARD;
STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),5,2),COLOR00FF00{98FD};
STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR00C8FF;
STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR10ECFF;
STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR10FFFF;
STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR00D900;
STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),5,0),COLORBLUE;
STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),0,0),COLOR090FF2;
CJ2:=DMA(EMA(CLOSE,12),SUM(VOL,5)/3/CAPITAL);
CJ3:=(CLOSE-CJ2)/CJ2*100;
CJ4:=REF(CJ3,1)-40 AND CJ3REF(CJ3,1) AND REF(CJ3,1)REF(CJ3,2) AND CJ3-REF(CJ3,1)2.5;
CJ5:=(CLOSE-OPEN)/OPEN*100;
CJ6:=REF(CLOSE,1);
CJ7:=SMA(MAX(CLOSE-CJ6,0),6,1)/SMA(ABS(CLOSE-CJ6),6,1)*100;
CJ8:=COUNT(CJ720,20)=1;
CJ9:=CJ59 AND CJ8;
CJA:=100*WINNER(OPEN);
CJB:=100*WINNER(CLOSE);
CJC:=CJB-CJA;
CJD:=CJC=30;
CJE:=CLOSE/MA(CLOSE,3)=1.07 AND CLOSE=HHV(CLOSE,3) AND MA(VOL,2)/MA(VOL,40)=3 AND MA(VOL,2)=HHV(MA(VOL,2),3) AND VOLREF(VOL,1) AND CLOSEREF(CLOSE,1);
CJF:=REF(CLOSE,1);
CJ10:=SMA(MAX(CLOSE-CJF,0),5,1)/SMA(ABS(CLOSE-CJF),5,1)*100;
CJ11:=COUNT(CJ1020,20)=1;
CJ12:=CJE AND CJ11;
CJ13:=MA(CLOSE,4);
CJ14:=MA(CLOSE,10);
CJ15:=MA(CLOSE,20);
CJ16:=MA(CLOSE,25);
CJ17:=COUNT(CROSS(CJ14,CJ15),2)=1;
CJ18:=COUNT(CROSS(CJ13,CJ16),2)=1;
CJ19:=CJ17 AND CJ18;
CJ1A:=CJ12 AND CJD AND CJ19;
CJ1B:=MA(CLOSE,80)-MA(CLOSE,10)/3;
CJ1C:=CLOSECJ1B AND VOL/240MA(VOL,5)/240 AND CLOSEREF(CLOSE,1)*1.08 AND CLOSEMA(CLOSE,13)*1.3;
短底反弹:=CJ4 OR CJ9 OR CJ1A OR CJ1C;
DRAWTEXT(短底反弹,LOW*0.97, #39;短底反弹 #39;),COLORGREEN;
DRAWTEXT(CROSS(0.94,(L/(MA(CLOSE,14) * 0.9))),LOW, #39;抄底 #39;),COLORWHITE;
DIF1:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA1:=EMA(DIF1,9);
MACD1:=2*(DIF1-DEA1),STICK;
MACD2:=EMA(MACD1,3);
STICKLINE(MACD1MACD2 AND MACD10,0,MACD1,3.2,0),COLOR000055;
STICKLINE(MACD1MACD2 AND MACD10,0,MACD1,2.7,0),COLOR000077;
STICKLINE(MACD1MACD2 AND MACD10,0,MACD1,2.1,0),COLOR000099;
STICKLINE(MACD1MACD2 AND MACD10,0,MACD1,1.5,0),COLOR0000BB;
STICKLINE(MACD1MACD2 AND MACD10,0,MACD1,0.9,0),COLOR0000DD;
STICKLINE(MACD1MACD2 AND MACD10,0,MACD1,0.3,0),COLOR0000FF;
STICKLINE(MACD1MACD2 AND MACD10,0,MACD1,3.2,0),COLOR555555;
STICKLINE(MACD1MACD2 AND MACD10,0,MACD1,2.7,0),COLOR777777;
STICKLINE(MACD1MACD2 AND MACD10,0,MACD1,2.1,0),COLOR999999;
STICKLINE(MACD1MACD2 AND MACD10,0,MACD1,1.5,0),COLORBBBBBB;
STICKLINE(MACD1MACD2 AND MACD10,0,MACD1,0.9,0),COLORDDDDDD;
STICKLINE(MACD1MACD2 AND MACD10,0,MACD1,0.3,0),COLORFFFFFF;
STICKLINE(MACD1MACD2,0,MACD1,3.2,0),COLORB20000;
STICKLINE(MACD1MACD2,0,MACD1,2.7,0),COLOREC0000;
STICKLINE(MACD1MACD2,0,MACD1,2.1,0),COLORFF4600;
STICKLINE(MACD1MACD2,0,MACD1,1.5,0),COLORFF6300;
STICKLINE(MACD1MACD2,0,MACD1,0.9,0),COLORFF8B00;
STICKLINE(MACD1MACD2,0,MACD1,0.3,0),COLORFFAB00;
STICKLINE(MACD1=0 OR MACD1=0,0,0,50,1),COLORWHITE;
DIF:DIF1,COLOR33FF33,LINETHICK1;
DEA:DEA1,COLORYELLOW,LINETHICK1;
MACD:MACD1,NODRAW,COLORMAGENTA;
N:=7; N2:=8; N3:=9;
VAR1:=REF(MA(C,20),10);开:=O-VAR1;高:=H-VAR1;低:=L-VAR1;收:=C-VAR1;MID:=MA(C,20);
UPPER:=MID+2*STD(C,20);LOWER:=MID-2*STD(C,20);
V1:=(C-LOWER)/(UPPER-LOWER)*100;
V2:=V1-EMA(V1,5);K1:=SUM(LLV(V2,4),4)/4;V3:=EMA(V2,64)*10;V4:=EMA(0.4*V2*(-1),3);
V5:=-1*EMA(V2,39)*10;A:=V310;B:=V2V4;D:=V510;E:=V3=10 OR V2=V4 OR V5=10;
1:MA(收, N);
均线2:MA(收, N2);
均线3:MA(收, N3);
STICKLINE(C,0,0,6,0),COLORD9D919;
STICKLINE(收=开 AND E,高,低,0,0), COLORYELLOW;
STICKLINE(收=开 AND E,收,开,2,0) ,COLORYELLOW;
STICKLINE(收 开 AND E,高,低,0,0) ,COLORYELLOW;
STICKLINE(收 开 AND E,收,开,2,0) ,COLORYELLOW;
STICKLINE(开 收 AND A ,低,高,0,0),COLORFF0000;
STICKLINE(开 收 AND A ,收,开,2,0),COLORFF0000;
STICKLINE(开=收 AND A,低,高,0,0),COLORYELLOW;
STICKLINE(开=收 AND A,收,开,2,1),COLORYELLOW;
STICKLINE(开 收 AND B,低,高,0,0),COLORRED;
STICKLINE(开 收 AND B,收,开,2,0),COLORRED;
STICKLINE(开=收 AND B,低,高,0,0),COLORRED;
STICKLINE(开=收 AND B,收,开,2,1),COLORRED;
STICKLINE(开 收 AND D,低,高,0,0),COLORGREEN;
STICKLINE(开 收 AND D,收,开,2,0),COLORGREEN;
{STICKLINE(开=收 AND D,收,开,2,1),COLORGREEN};
N:=2;
{招财猫}OK:=EMA(O,60);
CG:=EMA(C,60);
PDU:=IF(OKREF(OK,1) AND CGREF(CG,1),1,0);
Z1:=MA(C,13);
ZX:=REF(Z1,13/2+1);
LIFE:=(EMA(C,60)+EMA(C,90))/2;
VAR1:=(2*C+H+L)/4;
SNOOK:=EMA(VAR1,99)*0.91;
A1:=(C-REF(C,1))/REF(C,1)*100;
MA5:=BARSLAST(A13);
MA20:=IF(MA50,1,0);
STICKLINE(CZX AND C=LIFE,O,C,3,0),COLOR0000FF;
STICKLINE(CZX AND C=SNOOK,O,C,3,0),COLOR00FF00;
STICKLINE(CZX AND CSNOOK AND CLIFE,O,C,3,0),COLORFF0000;
STICKLINE(CZX AND MA20=0,O,C,3,0),COLOR00FFFF;
STICKLINE(CZX,O,C,1,0),COLORFFFFFF;
DRAWICON(CROSS(C,ZX),L*0.99,1);
DRAWICON(CROSS(ZX,C),H*1.01,5);
BY20:=MA(C,5);
招财猫:=MA(C,20),LINETHICK2,COLOR00FFFF;
鼠变异:=IF(BY20招财猫,招财猫,BY20),LINETHICK2,COLOR808080;
:=CROSS(C,ZX) AND CZX AND MA20=0 ,LINETHICK0;
RB:=BARSCOUNT(C)=ISLASTBAR;
RD:=BARSLAST(RB);
K2:=HHV(H,50);
K1:=LLV(L,50);
T1:=CZX AND C=LIFE;
T2:=CZX AND CSNOOK AND CLIFE;
T3:=CZX AND C=SNOOK;
T4:=C=ZX;
T5:=鼠变异REF(鼠变异,1) AND 鼠变异!=招财猫 ;
T6:=鼠变异REF(鼠变异,1) AND 鼠变异=招财猫 AND PDU!=1;
T7:=鼠变异REF(鼠变异,1) AND 鼠变异=招财猫 AND PDU=1;
T8:=CZX AND MA20=0 ;
EEE:=T1+T2+T3+T4+T5+T6+T7+T8 ;
E:=(K2-K1)/(EEE+8) ;
DRAWTEXT(C0 AND T10 AND ISLASTBAR,K2-E, #39;出洞了逮住它! #39;),COLOR0000FF;
DRAWTEXT(C0 AND T20 AND ISLASTBAR,K2-E, #39;鼠玩猫守着它!, #39;),COLORFF7700;
DRAWTEXT(C0 AND T30 AND ISLASTBAR,K2-E, #39;露尾巴动作快!, #39;),COLOR00FF00;
DRAWTEXT(C0 AND T40 AND ISLASTBAR,K2-E, #39;没有了打个盹!, #39;),COLOR808080;
DRAWTEXT(C0 AND T50 AND ISLASTBAR,K2-E*2, #39;发现鼠迹! #39;),COLOR00FF00;
DRAWTEXT(C0 AND T60 AND ISLASTBAR,K2-E*2, #39;瞬间鼠影! #39;),COLORFF66FF;
DRAWTEXT(C0 AND T70 AND ISLASTBAR,K2-E*2, #39;恶鼠难遁! #39;),COLOR0000FF;
{K线回顾副图}
开:REF(OPEN,N-1)NODRAW;
收:REF(CLOSE,N-1)NODRAW,COLORYELLOW;
高:REF(HIGH,N-1)NODRAW,COLORWHITE;
低:REF(LOW,N-1)NODRAW,COLORYELLOW;
DRAWKLINE(高,开,低,收);