通达信2指标——30顶(主图)
通达信指标——杠上开花主图(主图)
{杠上开花TDX (N=8)}A1:=REF(H,N)=HHV(H,2*N+1);B1:=FILTER(A1,N);C1:=BACKSET(B1,N+1);D1:=FILTER(C1,N);{高点}R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1); S11:=R11>REF(R11,1);DRAWLINE(D1,H,S11,H,1),COLORBLUE;A2:=REF(L,N)=LLV(L,2*N+1);B2:=FILTER(A2,N);C2:=BACKSET(B2,N+1);D2:=FILTER(C2,N);{低点}T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1); U11:=T11>REF(T11,1);DRAWLINE(D2,L,U11,L,1),COLORBLUE;M:=INTPART(3*N/5);A12:=REF(H,M)=HHV(H,2*M+1);B12:=FILTER(A12,M);C12:=BACKSET(B12,M+1);D12:=FILTER(C12,M);{高点}R112:=BACKSET(ISLASTBAR,BARSLAST(D12)+1); S112:=R112>REF(R112,1); DRAWLINE(D12,H,S112,H,1),COLORRED;A22:=REF(L,M)=LLV(L,2*M+1);B22:=FILTER(A22,M);C22:=BACKSET(B22,M+1);D22:=FILTER(C22,M);{低点}T112:=BACKSET(ISLASTBAR,BARSLAST(D22)+1); U112:=T112>REF(T112,1); DRAWLINE(D22,L,U112,L,1),COLORRED;V AR1111:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);V AR2222:=CROSS(VAR1111,0.9);V AR3333:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);V AR4444:=CROSS(VAR3333,0.9);压力:= REF(HIGH,BARSLAST(V AR2222));STICKLINE(CLOSE,REF(HIGH,BARSLAST(V AR2222)),REF(HIGH,BARSLAST(V AR2222)), 0.5,1),COLOREA91B5,LINETHICK3;支撑:= REF(LOW,BARSLAST(V AR4444));STICKLINE(CLOSE,REF(LOW,BARSLAST(V AR4444)),REF(LOW,BARSLAST(V AR4444)),0 .5,1),COLOR00B4FF,LINETHICK3;下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100);RRRSV:=SMA(下档线,3,1);KKK:=SMA(RRRSV,3,1);DDD:=((3 * RRRSV) - (2 * KKK));JJ12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);RSV24:=SMA(JJ12,3,1);K24:=SMA(RSV24,3,1);D24:=((3 * RSV24) - (2 * K24));压力2:=IF(CROSS(D24,DDD),HIGH,REF(HIGH,BARSLAST(CROSS(D24,DDD)))),COLORFFFFF F;压力位:=IF(ISLASTBAR,压力2,DRAWNULL);STICKLINE(ISLASTBAR ,压力位,压力位,120,0),LINETHICK4,COLORFFFFFF;底部:=LLV(HIGH,30),COLOR00FF00;底部位:=IF(ISLASTBAR,底部,DRAWNULL);STICKLINE(ISLASTBAR ,底部位,底部位,100,0),LINETHICK4,COLOR00FF00;AA05:=MA(C,5),COLOR0099CC;五日乖离率:=(C-AA05)/AA05*100;BB05:=ATAN((AA05/REF(AA05,1)-1)*100)*180/3.1416;速度5:=SMA(EMA((AA05-REF(AA05,1))/REF(AA05,1),3)*100,3,1);加速度5:EMA((速度5-REF(速度5,1)),3),NODRAW;AA10:=MA(C,10);AA20:=MA(C,20);BB10:=A TAN((AA10/REF(AA10,1)-1)*100)*180/3.1416;AA30:=MA(C,30);三拾日乖离率:=(C-AA30)/AA30*100;V AR11:=(AA20-AA30)>REF((AA20-AA30),1)AND AA20>REF(AA20,1) AND AA30>REF(AA30,1);V AR22:=(AA30-AA20)AA30BB30:=ATAN((AA30/REF(AA30,1)-1)*100)*180/3.1416;强势狙击:=FILTER(BB30>30 AND BB10>45 ANDCROSS(BB05,60),10);加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 ANDAA05>REF(AA05,1) AND 三拾日乖离率>REF(三拾日乖离率,1) ANDAA10>REF(AA10,1)AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1) ,10) ;清仓:=FILTER(COUNT(CROSS(30,BB05),5)>=1 AND (C>AA30 OR O>AA30) ANDAA05AA10DRAWICON(加仓,LOW*0.99,23);DRAWICON(清仓,HIGH*1.01,15);DRAWICON(强势狙击,LOW*0.99,13);TYP := (HIGH + LOW + CLOSE)/3;CCI1:=(TYP-MA(TYP,6))/(0.015*A VEDEV(TYP,6));差值1:=ABS(REF(CCI1,1)-CCI1),LINETHICK0;CCI2:=(TYP-MA(TYP,10))/(0.015*A VEDEV(TYP,10));差值2:=ABS(REF(CCI2,1)-CCI2),LINETHICK0;CCI3:=(TYP-MA(TYP,20))/(0.015*A VEDEV(TYP,20));差值3:=ABS(REF(CCI3,1)-CCI3),LINETHICK0;CCI4:=(TYP-MA(TYP,30))/(0.015*A VEDEV(TYP,30));差值4:=ABS(REF(CCI4,1)-CCI4),LINETHICK0;CCI5:=(TYP-MA(TYP,60))/(0.015*A VEDEV(TYP,60));差值5:=ABS(REF(CCI5,1)-CCI5),LINETHICK0;CCI:=CCI1+CCI2+CCI3+CCI4+CCI5;AAA:=(3*C+H+L+O)/6;V AR1:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(AAA,4)+3*REF(A AA,5)+2*REF(AAA,6)+REF(AAA,8))/36;V AR2:=(HHV(V AR1,5)+HHV(VAR1,10)+HHV(V AR1,20))/3;V AR3:=(LLV(V AR1,5)+LLV(V AR1,10)+LLV(VAR1,20))/3;V AR4:=(HHV(V AR2,5)+HHV(VAR2,10)+HHV(V AR2,20))/3;V AR5:=(LLV(V AR3,5)+LLV(V AR3,10)+LLV(VAR3,20))/3;V AR6:=(LLV(V AR1,2)+LLV(V AR1,4)+LLV(V AR1,6))/3;短线:V AR1,COLORWHITE;中线:V AR6,COLORYELLOW;下跌:IF(V AR1=V AR6,V AR6, DRAWNULL),COLORGREEN;TJ1:= CCI1>差值4;立桩量:=FILTER(TJ1,0);TJ2:=IF(BARSLAST(立桩量)=1 ,1,IF(BARSLAST(立桩量)=2 ,1,IF(BARSLAST(立桩量)=3 ,1,0)));成立1:=TJ2;条件成立1:=FILTER(成立1,5);TJ11:= CCI1<-差值4 ;立桩量2:=FILTER(TJ11,0);TJ22:=IF(BARSLAST(立桩量2)=1 AND CLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量2)=2 AND CLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量2)=3 AND CLOSE>REF(HIGH,3),1,0)));成立2:=TJ22;条件成立2:=FILTER(成立2,5);TJ111:=(ABS(CCI1)>CCI AND ABS( 差值1)> ABS(差值5))OR (VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>V AR1);立桩量3:=FILTER(TJ111,5);TJ222:=IF(BARSLAST(立桩量3)=1 AND CLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量3)=2 AND CLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量3)=3 AND CLOSE>REF(HIGH,3),1,0)));突破3:=TJ222=1;STICKLINE(CLOSE AND 下跌!= V AR6,REF(HIGH,BARSLAST(立桩量3)),REF(HIGH,BARSLAST(立桩量3)),10,1),COLORCYAN;STICKLINE(CLOSE AND 下跌!= V AR6,REF(LOW,BARSLAST(立桩量3)),REF(LOW,BARSLAST(立桩量3)),10,1),COLORYELLOW;TJ3:=IF(BARSLAST(立桩量3)=1 AND CLOSE>REF(LOW,1),1,IF(BARSLAST(立桩量3)=2 AND CLOSE>REF(LOW,2),1,IF(BARSLAST(立桩量3)=3 AND CLOSE>REF(LOW,3),1,0))); 三天法则:=TJ3=1;成立:=三天法则AND 突破3;条件成立:=FILTER(成立,5);TJ31:=(VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>V AR1);TJ32:=FILTER(TJ31,1);IF(条件成立AND 下跌!= V AR6 AND AA30>=REF(AA30,1),H*1.03,DRAWNULL),CROSSDOT,LINETHICK6,COLORFF33FF;IF(条件成立AND 下跌!= V AR6 AND AA30>=REF(AA30,1),H*1.03,DRAWNULL),POINTDOT,LINETHICK4,COLOR00CCFF; STICKLINE(C>=O,L,H,0,0),COLORRED;STICKLINE(CSTICKLINE(C>O,C,O,3.2,0),COLORRED;STICKLINE(1,C,O,2.8,0),COLOR454500;STICKLINE(1,C,O,2,0),COLOR555500;STICKLINE(1,C,O,1.5,0),COLOR656500;STICKLINE(1,C,O,1,0),COLOR757500;STICKLINE(1,C,O,0.5,0),COLOR858500;STICKLINE(立桩量,C,O,2.8,0),COLOR000045;STICKLINE(立桩量,C,O,2.8,0),COLOR000065;STICKLINE(立桩量,C,O,2,0),COLOR000085;STICKLINE(立桩量,C,O,1.5,0),COLOR0000A5;STICKLINE(立桩量,C,O,1,0),COLOR0000C5;STICKLINE(立桩量,C,O,0.5,0),COLOR0000E5;DRAWICON(条件成立1,REF(HIGH,BARSLAST(立桩量3)),12);DRAWICON(条件成立2,REF(LOW,BARSLAST(立桩量3)),11);。
【股票指标公式下载】-【通达信】顶底主图(攻击线、操盘线、生命线)
【通达信】顶底主图(攻击线、操盘线、生命线)-指标公式源码攻击线5:MA(C,5)LINETHICK1;操盘线10:MA(C,10)LINETHICK1;生命线30:MA(C,30)LINETHICK1;决策线60:MA(C,60)LINETHICK1;DRAWTEXT(CROSS(攻击线5,操盘线10),LOW*0.95,'攻抄金叉'),COLORRED; DRAWTEXT(CROSS(生命线30,决策线60),LOW*0.95,'生决金叉'),COLORMAGENTA; N:=20;M:=30;P1:=80;P2:=100;VAR101:=(C+H+O+L)/4;卖出:XMA(VAR101,N)*(1+P1/1000),COLORRED,LINETHICK2;买入:XMA(VAR101,M)*(1-P2/1000),COLORLIRED,LINETHICK2;幅度:=100*(卖出-买入)/买入,NODRAW;MA1:=MA(VAR101,3);STICKLINE(卖出>LOW AND 卖出<HIGH,卖出,MAX(卖出,MAX(OPEN,CLOSE)),3,0),COLORGREEN;STICKLINE(卖出>MIN(C,O) AND 卖出<MAX(C,O),卖出,MAX(OPEN,CLOSE),3,0),COLORGREEN;STICKLINE(卖出>LOW AND 卖出<HIGH,卖出,HIGH,0,0),COLORGREEN; STICKLINE(卖出<LOW,OPEN,CLOSE,3,0),COLORGREEN;STICKLINE(卖出<LOW,HIGH,LOW,0,0),COLORGREEN;STICKLINE(买入>LOW AND 买入<HIGH,买入,MIN(MIN(OPEN,CLOSE),买入),3,0),COLORMAGENTA;STICKLINE(买入>MIN(C,O) AND 买入<MAX(C,O),买入,MIN(OPEN,CLOSE),3,0),COLORMAGENTA;STICKLINE(买入>LOW AND 买入<HIGH,买入,LOW,0,0),COLORMAGENTA; STICKLINE(买入>HIGH,OPEN,CLOSE,3,0),COLORMAGENTA;STICKLINE(买入>HIGH,HIGH,LOW,0,0),COLORMAGENTA;DRAWTEXT(CROSS(LOW,买入),LOW*0.95,'买'),COLORRED,LINETHICK2; DRAWTEXT(CROSS(卖出,HIGH),HIGH*1.02,'卖'),COLORGREEN;MA20:=MA(CLOSE,20);MA120:=MA(CLOSE,120);MA30:=MA(CLOSE,37);MAP:=MA(CLOSE,8);AA5:=MA(CLOSE,21);AA10:=MA(CLOSE,8),COLORFF0000;AA12:=MA(CLOSE,12),COLORFF0000;BB10:=((ATAN((AA10 - REF(AA10,1))) * 3.1416) * 10);BB12:=((ATAN((AA12 - REF(AA12,1))) * 3.1416) * 10);MA13:=MA(CLOSE,13);VAR01:=((((OPEN + LOW) + HIGH) + CLOSE) / 4);中期大底:=LLV(LOW,30),;短期底部0:=LLV(HIGH,30);短底:=EMA(VAR01,5);支撑:=HHV(短底,60);压力1:=HHV(LOW,20),COLORFAABEC;压力:=SMA(LOW,5,1);中线:=MA(CLOSE,3);DRAWTEXT(FILTER(((((HIGH > 支撑) AND (CLOSE < 支撑)) AND ((CLOSE / OPEN) > (0 - 1.06))) AND (CLOSE < OPEN)),5),(HIGH + 0.02),'逃'),COLORFFFF00;中轨道:=(MA(HIGH,15) * 1.05);天:=(MA(LOW,15) * 0.985);人:=(MA(LOW,15) * 0.96);地:=(((HIGH + LOW) + CLOSE) / 3);B1:=HHV(地,(4 * 15));B6:=LLV(地,(4 * 15));B7:=(B1 - B6);B8:=(MA(((地 - B6) / B7),2) * 80);VAR1:=(((CLOSE - LLV(LOW,100)) / (HHV(HIGH,100) - LLV(LOW,100))) * 200); 飞龙顶底线1:=SMA(VAR1,3,1);VAR2:=SMA(飞龙顶底线1,3,1);VAR3:=((3 * 飞龙顶底线1) - (2 * VAR2));VAR4:=LLV(LOW,5);VAR5:=HHV(HIGH,5);VAR6:=(EMA((((CLOSE - VAR4) / (VAR5 - VAR4)) * 100),4) * 2);VAR7:=EMA(((0.667 * REF(VAR6,1)) + (0.333 * VAR6)),2);VAR8:=((3 * VAR6) - (2 * VAR7));VAR9:=(POW(MA(CLOSE,5),2) + MA(CLOSE,5));VARA:=(POW(MA(LOW,5),2) + MA(LOW,5));VARB:=(POW(MA(HIGH,5),2) + MA(HIGH,5));VARC:=(((((VAR9 - LLV(VARA,64)) / (HHV(VARB,64) - LLV(VARA,64))) * 150) + 65) - 10);VARD:=((SMA(VARC,3,1) * 1.5) - 100);VARE:=SMA(VARD,3,1);VARF:=((3 * VARD) - (2 * VARE));VAR10:=(((HIGH + LOW) + (CLOSE * 2)) / 4);VAR11:=EMA(VAR10,13);VAR12:=STD(VAR10,13);VAR13:=(((VAR10 - VAR11) * 100) / VAR12);VAR14:=EMA(VAR13,5);VAR15:=EMA(VAR14,13);VAR16:=((EMA(VAR14,13) + 200) - 100);VAR17:=EMA(VAR16,10);VAR18:=((3 * VAR16) - (2 * VAR17));VAR19:=(((飞龙顶底线1 + VAR6) + VARD) + VAR16);VAR1A:=(((VAR2 + VAR7) + VARE) + VAR17);VAR1B:=(((VAR3 + VAR8) + VARF) + VAR18);VAR1C:=(((HIGH + LOW) + CLOSE) / 3);VAR1D:=((AMOUNT / VOL) / 100);VAR1E:=((SUM(AMOUNT,5) / SUM(VOL,5)) / 100);VAR1F:=((VAR1C - MA(VAR1C,34)) / (0.015 * AVEDEV(VAR1C,34)));VAR21:=((((HIGH + LOW) + CLOSE) + VAR1C) / 4);VAR22:=EMA(VAR21,24);VAR23:=STD(VAR21,24);VAR24:=(((VAR21 - VAR22) / VAR23) * 100);VAR25:=((VAR1C - MA(VAR1C,24)) / (0.015 * AVEDEV(VAR1C,24)));VAR26:=EMA(VAR24,5);VAR27:=((VAR1D - MA(VAR1D,21)) / (0.015 * AVEDEV(VAR1D,21)));VAR28:=((VAR1E - MA(VAR1E,90)) / (0.015 * AVEDEV(VAR1E,90)));VAR29:=(((((((VAR28 + VAR27) + VAR26) + VAR25) + VAR1F) / 5) + 165) / 4);VAR2A:=(((((VAR19 + VAR1A) + (VAR1B * 30)) / 32) / 5) - 15);VAR2B:=(((VAR29 + VAR2A) / 2) / 1.1);VAR2C:=VAR2B;短线:=MA(VAR2C,26);MID:=(短线 + (2 * STD(VAR2C,26)));UPPER:=(短线 - (2 * STD(VAR2C,26)));LOWER:=IF((VAR2C > 短线),短线,VAR2C);XY:=MA(CLOSE,5);M80:=MA(CLOSE,80);短期底部:=(LLV(HIGH,30) * 0.93);MA80:=LLV(HIGH,30);短期底部2:=SMA(CLOSE,2,1);趋势:=(MA(LOW,10) * 0.96);趋:=(EMA(OPEN,107) * 0.897);超跌位2:=MA(CLOSE,15);GF:=MA(CLOSE,10);MAN:=(SMA(HIGH,21,2) * 1.05);上1:=(HHV(短底,60) * 0.92);压力2:=(SMA(HIGH,21,2) * 1.035);阻挡线:=(SMA(LOW,21,2) * 0.96);下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100); RSV:=SMA(下档线,3,1);K:=SMA(RSV,3,1);D:=((3 * RSV) - (2 * K));J:=(((CLOSE - MA(CLOSE,6)) / MA(CLOSE,6)) * 100);VAR2P:=(((CLOSE - MA(CLOSE,12)) / MA(CLOSE,12)) * 100);VAR3P:=(((CLOSE - MA(CLOSE,24)) / MA(CLOSE,24)) * 100);VAR4P:=(((J + (2 * VAR2P)) + (3 * VAR3P)) / 6);VAR5P:=MA(VAR4P,3);VAR6P:=(((CLOSE - LLV(LOW,34)) / (HHV(HIGH,34) - LLV(LOW,34))) * 100); RSV12:=SMA(VAR6P,3,1);K12:=SMA(RSV12,3,1);D12:=((3 * RSV12) - (2 * K12));J12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100); RSV24:=SMA(J12,3,1);K24:=SMA(RSV24,3,1);D24:=((3 * RSV24) - (2 * K24));J24:=IF(CROSS(D,D24),LOW,REF(LOW,BARSLAST(CROSS(D,D24))));压力位:=IF(CROSS(D24,D),HIGH,REF(HIGH,BARSLAST(CROSS(D24,D))));支撑位:=IF((CLOSE >= MA(CLOSE,20)),80,50);U2L:=IF((CLOSE >= MA(CLOSE,20)),50,20);L2L:=IF(((D < 支撑位) AND (REF(D,1) >= 支撑位)),HHV(REF(HIGH,1),(BARSLAST(((D >= 支撑位) AND (REF(D,1) < 支撑位))) - 1)),REF(HHV(REF(HIGH,1),(BARSLAST(((D >= 支撑位) AND (REF(D,1) < 支撑位))) - 1)),BARSLAST(((D < 支撑位) AND REF(D,1)))));RH1:=IF((HIGH > L2L),LOW,REF(LOW,BARSLAST((HIGH > L2L))));RH4:=IF((HIGH > L2L),D,REF(D,BARSLAST((HIGH > L2L))));RH42:=IF((((HIGH > RH1) AND (D < RH4)) AND (D <D24)),HIGH,REF(HIGH,BARSLAST((((HIGH > RH1) AND (D < RH4)) AND (D <D24)))));RH5:=IF(((D > U2L) AND (REF(D,1) <= U2L)),LLV(REF(LOW,1),(BARSLAST(((D <= U2L) AND (REF(D,1) > U2L))) - 1)),REF(LLV(REF(LOW,1),(BARSLAST(((D <= U2L) AND (REF(D,1) > U2L))) - 1)),BARSLAST(((D > U2L) AND REF(D,1))))); RL1:=IF((LOW < RH5),HIGH,REF(HIGH,BARSLAST((LOW < RH5))));RL4:=IF((LOW < RH5),D,REF(D,BARSLAST((LOW < RH5))));RL42:=IF((((LOW < RL1) AND (D > RL4)) AND (D >D24)),LOW,REF(LOW,BARSLAST((((LOW < RL1) AND (D > RL4)) AND (D > D24))))); 长期底部:=LLV(HIGH,30);DRAWTEXT(FILTER(((((RL42 = J24) AND (CLOSE > OPEN)) AND (CLOSE > 长期底部)) AND (LOW <= J24)),20),(LOW - 0.12),'底成'),COLOR0EABFF;RL5:=(SMA(HIGH,5,2) * 1.05);上:=(SMA(LOW,5,2) * 0.96);下:=SMA(LOW,2,1);中:=(((((3 * CLOSE) + HIGH) + LOW) + OPEN) / 6);X1:=EMA(中,10);X2:=REF(X1,1);X3:=((REF(HIGH,1) + REF(LOW,1)) / 2);X4:=(MA(CLOSE,21) + (2 * STD(CLOSE,21)));X5:=REF(CLOSE,1);X6:=((SMA(MAX((CLOSE - X5),0),7,1) / SMA(ABS((CLOSE - X5)),7,1)) * 100);X7:=CROSS(79,X6);X8:=FILTER(X7,4);X9:=MA(CLOSE,115);VAR001:=EMA(CLOSE,8);飞龙顶底线:=EMA(VAR001,20);VAR002:=CROSS(VAR001,飞龙顶底线);VAR003:=(VAR001 < MA(CLOSE,20));VAR004:=(((HHV(HIGH,36) - CLOSE) / (HHV(HIGH,36) - LLV(LOW,36))) * 100); VAR005:=SMA(VAR004,5,1);VAR006:=SMA(VAR005,8,1);VAR007:=(CROSS(VAR005,VAR006) AND (VAR006 < 5));VAR008:=((CLOSE > (LLV(CLOSE,60) + (0.3 * LLV(CLOSE,60)))) AND VAR007); VAR009:=IF((CLOSE > 1000),VAR007,VAR008);VAR00F:=CROSS(X1,X2);MA115:=VAR00F;低买:=(VAR002 AND VAR003);黑马起步:=VAR009;DRAWTEXT(X8,(HIGH * 1.03),'出货'),COLOR9000F5;DRAWTEXT((黑马起步 > 0),(HIGH * 1.04),'逃命'),COLORFF0000;逃遁:=(SMA(HIGH,21,2) * 1.05);阻挡:=(SMA(LOW,21,2) * 0.94);DRAWTEXT(FILTER(((((((((CLOSE / OPEN) > 1.03) AND ((超跌位2 - REF(超跌位2,1)) > 0)) AND ((CLOSE - REF(CLOSE,1)) > 0)) AND (HIGH < 压力1)) AND (CLOSE < 压力1)) AND ((压力2 - REF(压力2,1)) > 0)) AND (CLOSE < MAN)),3),LOW,'出击'),COLOR646E69;DRAWTEXT((((((低买 > 0) AND ((X1 - REF(X1,1)) > 0)) AND (HIGH < 压力位)) AND (HIGH < X9)) AND ((X2 - REF(X2,1)) > 0)),LOW,'黑马'),COLOR00FF00; DRAWTEXT((((CROSS(VAR2C,UPPER) AND (HIGH < 压力1)) AND ((XY -REF(XY,1)) > 0)) AND (HIGH < 支撑)),LOW,'买'),COLORFFFFFF; DRAWTEXT(FILTER((((((MA115 AND (CLOSE < 压力位)) AND ((人 - REF(人,1)) >0)) AND ((X1 - REF(X1,1)) > 0)) AND (HIGH < 上1)) AND ((CLOSE / OPEN) >1.03)),5),LOW,'●买'),COLOR93EE7D;DRAWTEXT(((((LOW <= 上) AND (HIGH >= 短期底部)) AND (CLOSE >= 长期底部)) AND ((CLOSE / OPEN) > 1.03)),(LOW - 0.08),'★抄底'),COLOR0000FF;DRAWTEXT(FILTER((((((LOW <= 阻挡线) AND ((MA20 - REF(MA20,1)) > 0)) AND (OPEN <= 上1)) AND (HIGH > 上1)) AND (CLOSE > 阻挡线)),5),LOW,'涨10%'),COLORFFFFFF;DRAWTEXT(FILTER((((((B8 <= 1) AND (LOW <= 阻挡)) AND (CLOSE > OPEN)) AND (LOW <= 中期大底)) AND (CLOSE >= 长期底部)),3),(LOW - 0.08),'短抄E'),COLORA100FF;DRAWTEXT(FILTER((((CROSS(趋势,趋) AND (HIGH < M80)) AND (HIGH < 压力1)) AND LLV(LOW,0)),10),LOW,'果断买'),COLOR668800;DRAWTEXT(FILTER(((CROSS(中线,人) AND (LOW <= 人)) AND (CLOSE >= 人)),4),(LOW - 0.06),'买'),COLOR00FF00;DRAWTEXT(FILTER((((((((MA20 - REF(MA20,1)) > 0) AND (HIGH < 支撑)) AND ((AA10 - REF(AA10,1)) > 0)) AND (HIGH < 压力1)) AND (VOL >= REF(VOL,1))) AND CROSS(CLOSE,MA20)),57),LOW,'突破生命线'),COLOR0000FF;DRAWTEXT(FILTER(((((LOW <= MA80) AND (CLOSE > MA80)) AND (CLOSE > OPEN)) AND (短期底部2 <= MA80)),8),LOW,'底'),COLORFFFF00;DRAWTEXT(((CROSS(MA20,压力位) AND (LOW <= MA20)) AND ((MA20 -REF(MA20,1)) > 0.02)),(LOW - 0.03),'●绝佳买点'),COLORAFA0AF; DRAWTEXT((((((((CROSS(CLOSE,MA20) AND (HIGH < 压力位)) AND (OPEN < MA20)) AND (HIGH < 支撑)) AND ((MAN - REF(MAN,1)) > 0)) AND ((X1 - REF(X1,1)) > 0)) AND (D < 63)) AND ((MA20 - REF(MA20,1)) > 0)),(LOW - 0.05),'●大牛浮水'),COLOR73777F;DRAWTEXT(CROSS(中期大底,短期底部),(LOW - 0.02),'短线买');短趋势线:=MA(CLOSE,13);中趋势线1:=MA(CLOSE,33),LINETHICK1;中趋势线:=MA(CLOSE,55);涨:=IF(短趋势线>REF(短趋势线,1),短趋势线,DRAWNULL),COLORRED,LINETHICK3;平:=IF(短趋势线=REF(短趋势线,1),短趋势线,DRAWNULL),COLOR00FFFF,LINETHICK3;跌:=IF(短趋势线<REF(短趋势线,1),短趋势线,DRAWNULL),COLORGREEN,LINETHICK3;STICKLINE(CROSS(MA(CLOSE,13),C) AND MA(CLOSE,13)>REF(MA(CLOSE,13) ,1) AND V<REF(V,1) ANDMA(CLOSE,13)>MA(CLOSE,55) ,L,L*0.98,3,0),COLORYELLOW;DRAWTEXT(CROSS(MA(CLOSE,13),C) AND INDEXC>MA(INDEXC,13) ANDMA(CLOSE,13)>REF(MA(CLOSE,13) ,1) AND V<REF(V,1) ANDMA(CLOSE,13)>MA(CLOSE,55) ,L*0.95,'买'),COLORRED,LINETHICK2;VAR011:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA( CLOSE,24)*100+(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100)/3;VAR012:=HHV(VAR011>20,10);DRAWTEXT(VAR011<-20 AND INDEXC<MA(INDEXC,13) AND FILTER(VAR011>REF(VAR011,1),5),L*0.93,'抄底'),COLORYELLOW,LINETHICK2;VAR013:=IF(MA(CLOSE,13)>REF(MA(CLOSE,13),1),MA(CLOSE,13),DRAWNULL); DRAWTEXT((IF(CLOSE>MA(CLOSE,13) ANDOPEN<CLOSE,-0.1,0))AND((C-REF(C,1))/(REF(C,1))>0.061)AND(MA(CLOSE,13)=VAR013) AND (MA(CLOSE,1),MA(CLOSE,13)) AND(VOL>REF(HHV(VOL,3),1)*2),L*0.98,'主力介入'),COLORMAGENTA;X:=EMA(((SLOPE(CLOSE,21) * 20) + CLOSE),68);Y:=EMA(CLOSE,10);【通达信】顶底主图(攻击线、操盘线、生命线)-指标公式效果图(文档来源:若水财经社区)。
通达信2指标——合成操盘主图(主图)
N1:=BARSCOUNT(5) ;
N:=((N1 - CURRBARSCOUNT ) + 1);
HH:=HHV(HIGH,N);
LL:=LLV(LOW,N);
最高:=HHV(N1,1),POINTDOT;
DRAWTEXT(A,L,'');
AB:=CROSS(满仓,L) AND A;
DRAWICON(AB,L,1);
VAR1A:=DMA(EMA(CLOSE,12),SUM(VOL,5)/3/CAPITAL);
VAR2A:=REF(HIGH,10)/CLOSE>1.35;
VAR3A:=(COST(20)-CLOSE)/CLOSE>0.15;
AA10:=MA(CLOSE,10);
Y:=((LLV(LOW,1) = LLV(LOW,60)) AND ((CLOSE / REF(CLOSE,1)) > 1.04));
WX:=MA(CLOSE,0);
MB5:=(MA(CLOSE,15) * IF((20 < 5),WX,1));
MB7:=(MA(CLOSE,20) * IF((20 < 7),WX,1));
SS:=(MA(CLOSE,8) * 0.998),COLORFFFFFF;
买:=(DDD >= AMA AND BMA >= BMB);
HH1:=FILTER(((DDD >= AMA) AND (BMA >= BMB)),33);
VARR1:=((SMA(MAX((CLOSE - REF(CLOSE,1)),0),12,1) / SMA(ABS((CLOSE - REF(CLOSE,1))),12,1)) * 100);
通达信指标公式源码顶底先知 主图指标 源码
VV:=(O+C+L+H)/4;Y311:=IFF(CURRBARSCOUNT=1,(XMA(VV,3)*3-MA(VV,2)+VV)/3,XMA(VV,3)); Y312:=IFF(CURRBARSCOUNT=1,(XMA(Y311,3)*3-MA(Y311,2)+Y311)/3,XMA( Y311,3));Y313:=IFF(CURRBARSCOUNT=1,(XMA(Y312,3)*3-MA(Y312,2)+Y312)/3,XMA( Y312,3));Y314:=IFF(CURRBARSCOUNT=1,(XMA(Y313,3)*3-MA(Y313,2)+Y313)/3,XMA( Y313,3));Y315:=IFF(CURRBARSCOUNT=1,(XMA(Y314,3)*3-MA(Y314,2)+Y314)/3,XMA( Y314,3));Y316:=IFF(CURRBARSCOUNT=1,(XMA(Y315,3)*3-MA(Y315,2)+Y315)/3,XMA( Y315,3));Y317:=IFF(CURRBARSCOUNT=1,(XMA(Y316,3)*3-MA(Y316,2)+Y316)/3,XMA( Y316,3));Y318:=IFF(CURRBARSCOUNT=1,(XMA(Y317,3)*3-MA(Y317,2)+Y317)/3,XMA( Y317,3));Y319:=IFF(CURRBARSCOUNT=1,(XMA(Y318,3)*3-MA(Y318,2)+Y318)/3,XMA( Y318,3));Y320:=IFF(CURRBARSCOUNT=1,(XMA(Y319,3)*3-MA(Y319,2)+Y319)/3,XMA( Y319,3));Y321:=IFF(CURRBARSCOUNT=1,(XMA(Y320,3)*3-MA(Y320,2)+Y320)/3,XMA( Y320,3));Y322:=IFF(CURRBARSCOUNT=1,(XMA(Y321,3)*3-MA(Y321,2)+Y321)/3,XMA(Y323:=IFF(CURRBARSCOUNT=1,(XMA(Y322,3)*3-MA(Y322,2)+Y322)/3,XMA( Y322,3));Y324:=IFF(CURRBARSCOUNT=1,(XMA(Y323,3)*3-MA(Y323,2)+Y323)/3,XMA( Y323,3));Y325:=IFF(CURRBARSCOUNT=1,(XMA(Y324,3)*3-MA(Y324,2)+Y324)/3,XMA( Y324,3));Y326:=IFF(CURRBARSCOUNT=1,(XMA(Y325,3)*3-MA(Y325,2)+Y325)/3,XMA( Y325,3));Y327:=IFF(CURRBARSCOUNT=1,(XMA(Y326,3)*3-MA(Y326,2)+Y326)/3,XMA( Y326,3));Y328:=IFF(CURRBARSCOUNT=1,(XMA(Y327,3)*3-MA(Y327,2)+Y327)/3,XMA( Y327,3));Y329:=IFF(CURRBARSCOUNT=1,(XMA(Y328,3)*3-MA(Y328,2)+Y328)/3,XMA( Y328,3));Y330:=IFF(CURRBARSCOUNT=1,(XMA(Y329,3)*3-MA(Y329,2)+Y329)/3,XMA( Y329,3));Y331:=IFF(CURRBARSCOUNT=1,(XMA(Y330,3)*3-MA(Y330,2)+Y330)/3,XMA( Y330,3));Y332:=IFF(CURRBARSCOUNT=1,(XMA(Y331,3)*3-MA(Y331,2)+Y331)/3,XMA( Y331,3));Y333:=IFF(CURRBARSCOUNT=1,(XMA(Y332,3)*3-MA(Y332,2)+Y332)/3,XMA( Y332,3));Y334:=IFF(CURRBARSCOUNT=1,(XMA(Y333,3)*3-MA(Y333,2)+Y333)/3,XMA( Y333,3));Y335:=IFF(CURRBARSCOUNT=1,(XMA(Y334,3)*3-MA(Y334,2)+Y334)/3,XMA( Y334,3));Y336:=IFF(CURRBARSCOUNT=1,(XMA(Y335,3)*3-MA(Y335,2)+Y335)/3,XMA( Y335,3));Y337:=IFF(CURRBARSCOUNT=1,(XMA(Y336,3)*3-MA(Y336,2)+Y336)/3,XMA( Y336,3));Y338:=IFF(CURRBARSCOUNT=1,(XMA(Y337,3)*3-MA(Y337,2)+Y337)/3,XMA( Y337,3));Y339:=IFF(CURRBARSCOUNT=1,(XMA(Y338,3)*3-MA(Y338,2)+Y338)/3,XMA( Y338,3));Y340:=IFF(CURRBARSCOUNT=1,(XMA(Y339,3)*3-MA(Y339,2)+Y339)/3,XMA( Y339,3));Y341:=IFF(CURRBARSCOUNT=1,(XMA(Y340,3)*3-MA(Y340,2)+Y340)/3,XMA( Y340,3));Y342:=IFF(CURRBARSCOUNT=1,(XMA(Y341,3)*3-MA(Y341,2)+Y341)/3,XMA( Y341,3));Y343:=IFF(CURRBARSCOUNT=1,(XMA(Y342,3)*3-MA(Y342,2)+Y342)/3,XMA( Y342,3));Y344:=IFF(CURRBARSCOUNT=1,(XMA(Y343,3)*3-MA(Y343,2)+Y343)/3,XMA(Y345:=IFF(CURRBARSCOUNT=1,(XMA(Y344,3)*3-MA(Y344,2)+Y344)/3,XMA( Y344,3));Y346:=IFF(CURRBARSCOUNT=1,(XMA(Y345,3)*3-MA(Y345,2)+Y345)/3,XMA( Y345,3));Y347:=IFF(CURRBARSCOUNT=1,(XMA(Y346,3)*3-MA(Y346,2)+Y346)/3,XMA( Y346,3));Y348:=IFF(CURRBARSCOUNT=1,(XMA(Y347,3)*3-MA(Y347,2)+Y347)/3,XMA( Y347,3));Y349:=IFF(CURRBARSCOUNT=1,(XMA(Y348,3)*3-MA(Y348,2)+Y348)/3,XMA( Y348,3));Y350:=IFF(CURRBARSCOUNT=1,(XMA(Y349,3)*3-MA(Y349,2)+Y349)/3,XMA( Y349,3));Y351:=IFF(CURRBARSCOUNT=1,(XMA(Y350,3)*3-MA(Y350,2)+Y350)/3,XMA( Y350,3));Y352:=IFF(CURRBARSCOUNT=1,(XMA(Y351,3)*3-MA(Y351,2)+Y351)/3,XMA( Y351,3));Y353:=IFF(CURRBARSCOUNT=1,(XMA(Y352,3)*3-MA(Y352,2)+Y352)/3,XMA( Y352,3));Y354:=IFF(CURRBARSCOUNT=1,(XMA(Y353,3)*3-MA(Y353,2)+Y353)/3,XMA( Y353,3));Y355:=IFF(CURRBARSCOUNT=1,(XMA(Y354,3)*3-MA(Y354,2)+Y354)/3,XMA( Y354,3));Y356:=IFF(CURRBARSCOUNT=1,(XMA(Y355,3)*3-MA(Y355,2)+Y355)/3,XMA( Y355,3));Y357:=IFF(CURRBARSCOUNT=1,(XMA(Y356,3)*3-MA(Y356,2)+Y356)/3,XMA( Y356,3));Y358:=IFF(CURRBARSCOUNT=1,(XMA(Y357,3)*3-MA(Y357,2)+Y357)/3,XMA( Y357,3));Y359:=IFF(CURRBARSCOUNT=1,(XMA(Y358,3)*3-MA(Y358,2)+Y358)/3,XMA( Y358,3));Y360:=IFF(CURRBARSCOUNT=1,(XMA(Y359,3)*3-MA(Y359,2)+Y359)/3,XMA( Y359,3));Y361:=IFF(CURRBARSCOUNT=1,(XMA(Y360,3)*3-MA(Y360,2)+Y360)/3,XMA( Y360,3));Y362:=IFF(CURRBARSCOUNT=1,(XMA(Y361,3)*3-MA(Y361,2)+Y361)/3,XMA( Y361,3));Y363:=IFF(CURRBARSCOUNT=1,(XMA(Y362,3)*3-MA(Y362,2)+Y362)/3,XMA( Y362,3));Y364:=IFF(CURRBARSCOUNT=1,(XMA(Y363,3)*3-MA(Y363,2)+Y363)/3,XMA( Y363,3));Y365:=IFF(CURRBARSCOUNT=1,(XMA(Y364,3)*3-MA(Y364,2)+Y364)/3,XMA( Y364,3));Y366:=IFF(CURRBARSCOUNT=1,(XMA(Y365,3)*3-MA(Y365,2)+Y365)/3,XMA(Y367:=IFF(CURRBARSCOUNT=1,(XMA(Y366,3)*3-MA(Y366,2)+Y366)/3,XMA( Y366,3));Y368:=IFF(CURRBARSCOUNT=1,(XMA(Y367,3)*3-MA(Y367,2)+Y367)/3,XMA( Y367,3));Y369:=IFF(CURRBARSCOUNT=1,(XMA(Y368,3)*3-MA(Y368,2)+Y368)/3,XMA( Y368,3));Y370:=IFF(CURRBARSCOUNT=1,(XMA(Y369,3)*3-MA(Y369,2)+Y369)/3,XMA( Y369,3));Y371:=IFF(CURRBARSCOUNT=1,(XMA(Y370,3)*3-MA(Y370,2)+Y370)/3,XMA( Y370,3));Y372:=IFF(CURRBARSCOUNT=1,(XMA(Y371,3)*3-MA(Y371,2)+Y371)/3,XMA( Y371,3));Y373:=IFF(CURRBARSCOUNT=1,(XMA(Y372,3)*3-MA(Y372,2)+Y372)/3,XMA( Y372,3));Y374:=IFF(CURRBARSCOUNT=1,(XMA(Y373,3)*3-MA(Y373,2)+Y373)/3,XMA( Y373,3));Y375:=IFF(CURRBARSCOUNT=1,(XMA(Y374,3)*3-MA(Y374,2)+Y374)/3,XMA( Y374,3));Y376:=IFF(CURRBARSCOUNT=1,(XMA(Y375,3)*3-MA(Y375,2)+Y375)/3,XMA( Y375,3));Y377:=IFF(CURRBARSCOUNT=1,(XMA(Y376,3)*3-MA(Y376,2)+Y376)/3,XMA( Y376,3));Y378:=IFF(CURRBARSCOUNT=1,(XMA(Y377,3)*3-MA(Y377,2)+Y377)/3,XMA( Y377,3));Y379:=IFF(CURRBARSCOUNT=1,(XMA(Y378,3)*3-MA(Y378,2)+Y378)/3,XMA( Y378,3));Y380:=IFF(CURRBARSCOUNT=1,(XMA(Y379,3)*3-MA(Y379,2)+Y379)/3,XMA( Y379,3));Y381:=IFF(CURRBARSCOUNT=1,(XMA(Y380,3)*3-MA(Y380,2)+Y380)/3,XMA( Y380,3));Y382:=IFF(CURRBARSCOUNT=1,(XMA(Y381,3)*3-MA(Y381,2)+Y381)/3,XMA( Y381,3));Y383:=IFF(CURRBARSCOUNT=1,(XMA(Y382,3)*3-MA(Y382,2)+Y382)/3,XMA( Y382,3));Y384:=IFF(CURRBARSCOUNT=1,(XMA(Y383,3)*3-MA(Y383,2)+Y383)/3,XMA( Y383,3));Y385:=IFF(CURRBARSCOUNT=1,(XMA(Y384,3)*3-MA(Y384,2)+Y384)/3,XMA( Y384,3));Y386:=IFF(CURRBARSCOUNT=1,(XMA(Y385,3)*3-MA(Y385,2)+Y385)/3,XMA( Y385,3));Y387:=IFF(CURRBARSCOUNT=1,(XMA(Y386,3)*3-MA(Y386,2)+Y386)/3,XMA( Y386,3));Y388:=IFF(CURRBARSCOUNT=1,(XMA(Y387,3)*3-MA(Y387,2)+Y387)/3,XMA(Y389:=IFF(CURRBARSCOUNT=1,(XMA(Y388,3)*3-MA(Y388,2)+Y388)/3,XMA( Y388,3));Y390:=IFF(CURRBARSCOUNT=1,(XMA(Y389,3)*3-MA(Y389,2)+Y389)/3,XMA( Y389,3));Y391:=IFF(CURRBARSCOUNT=1,(XMA(Y390,3)*3-MA(Y390,2)+Y390)/3,XMA( Y390,3));Y392:=IFF(CURRBARSCOUNT=1,(XMA(Y391,3)*3-MA(Y391,2)+Y391)/3,XMA( Y391,3));Y393:=IFF(CURRBARSCOUNT=1,(XMA(Y392,3)*3-MA(Y392,2)+Y392)/3,XMA( Y392,3));Y394:=IFF(CURRBARSCOUNT=1,(XMA(Y393,3)*3-MA(Y393,2)+Y393)/3,XMA( Y393,3));Y395:=IFF(CURRBARSCOUNT=1,(XMA(Y394,3)*3-MA(Y394,2)+Y394)/3,XMA( Y394,3));N:= 200 ; M:= 13;{DRAWGBK(C>0, RGB(0,0,00),RGB(0,0,0),0,'12',0)};DRAWKLINE(H,O,L,C);股价96:=Y395;增幅96:=XMA(XMA(XMA(股价96,3),3),3)-REF(XMA(XMA(XMA(股价96,3),3),3),1);X396:=XMA(股价96,3);J396:=(XMA(股价96,3)*3+0.5*股价96-0.5*REF(股价96,1)+增幅96)/3;Y396:=IFF(CURRBARSCOUNT=1,J396,X396),LINETHICK2,COLORGREEN;高险区1:Y396*1.1,COLORLIRED,COLORFFFF00;高险区2:Y396*1.125,COLORLIRED,COLORFF0000;高险区3:Y396*1.15,COLORLIRED,COLOR00FF00;良机区1:Y396*0.9,COLORLIBLUE,COLOR00FFFF;良机区2:Y396*0.875,COLORLIBLUE,COLORFF00FF;良机区3:Y396*0.85,COLOR0000FF;WSR1:=(CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100;WSR2:=CROSS(WSR1,5);WSR3:=CROSS(8,WSR1);WSR4:=CROSS(WSR1,-5);WSR5:=CROSS(WSR1,-8);WSR6:=WSR3;WSR7:=WSR4 OR WSR5;WSR8:=WSR7 AND FILTER(WSR7,5);WSR10:DRAWICON(WSR8,L-0.01,1);WSR9:=WSR6 AND FILTER(WSR6,5);WSR11:DRAWICON(WSR9,H+0.01,2);WSR12:=O<良机区3;DRAWICON(WSR12 AND FILTER(WSR12,12),L-0.03,9);W1:=C>REF(C,1) AND MACD<REF(MACD,1) AND MACD>0 AND V<REF(V,1);W2:=C>REF(C,1) AND MACD<0 AND MACD<REF(MACD,1) AND V<REF(V,1); XG:=W1 OR W2;VAR1:=AMOUNT/VOL/7;VAR2:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;VAR3:=SUM(AMOUNT,10)/VAR1/7;VAR4:=DMA(VAR2,VOL/VAR3);VAR5:=(CLOSE-VAR4)/VAR4*100,COLORLIMAGENTA;XG1:=CROSS(VAR5,MA(VAR5,2)) AND VAR5<0 AND C<(HHV(H,5)*0.88) AND REF(O>C,1) AND REF(O>C,2);XG3:=XG AND XG1 AND L<良机区1;WSR13:=O>良机区3 AND L<良机区1 OR XG3;DRAWICON(WSR13 AND FILTER(WSR13,10),L-0.03,23);WSR14:=H>高风区3;DRAWICON(WSR14 ANDFILTER(WSR14,15),H+0.03,19);WSR15:=H<高风区3 AND H>高风区2;DRAWICON(WSR15 ANDFILTER(WSR15,5),H+0.03,15);WSR16:=(INDEXC-MA(INDEXC,3))/MA(INDEXC,3);WSR17:=(INDEXC-MA(INDEXC,8))/MA(INDEXC,8);WSR18:=(INDEXC-MA(INDEXC,18))/MA(INDEXC,18);WSR19:=(WSR16 + WSR17 + WSR18)/3;WSR20:=(C-MA(C,3))/MA(C,3);WSR21:=(C-MA(C,8))/MA(C,8);WSR22:=(C-MA(C,18))/MA(C,18);WSR23:=(WSR20 + WSR21 + WSR22)/3;WSR24:=(WSR19>REF(WSR19,1) AND CROSS(WSR23,WSR19))*50;WSR25:=(INDEXC-MA(INDEXC,6))/MA(INDEXC,6);WSR26:=(INDEXC-MA(INDEXC,12))/MA(INDEXC,12);WSR27:=(INDEXC-MA(INDEXC,24))/MA(INDEXC,24);WSR28:=(WSR25 + WSR26 + WSR27)/3;WSR29:=(C-MA(C,6))/MA(C,6);WSR30:=(C-MA(C,12))/MA(C,12);WSR31:=(C-MA(C,24))/MA(C,24);WSR32:=(WSR29 + WSR30 + WSR31)/3;WSR33:=(WSR28>REF(WSR28,1) AND CROSS(WSR32,WSR28))*20;WSR34:=(INDEXC-MA(INDEXC,13))/MA(INDEXC,13);WSR35:=(INDEXC-MA(INDEXC,34))/MA(INDEXC,34);WSR36:=(INDEXC-MA(INDEXC,55))/MA(INDEXC,55);WSR37:=(WSR34 + WSR35 + WSR36)/3;WSR38:=(C-MA(C,13))/MA(C,13);WSR39:=(C-MA(C,34))/MA(C,34);WSR40:=(C-MA(C,55))/MA(C,55);WSR41:=(WSR38 + WSR39 + WSR40)/3;WSR42:=(WSR37>REF(WSR37,1) AND CROSS(WSR41,WSR37));WSR43:=(INDEXC-MA(INDEXC,13))/MA(INDEXC,13);WSR44:=(INDEXC-MA(INDEXC,34))/MA(INDEXC,34);WSR45:=(INDEXC-MA(INDEXC,55))/MA(INDEXC,55);WSR46:=(WSR43 + WSR44 + WSR45)/3;WSR47:=(C-MA(C,30))/MA(C,30);WSR48:=(C-MA(C,60))/MA(C,60);WSR49:=(C-MA(C,90))/MA(C,90);WSR50:=(WSR47 + WSR48 + WSR49)/3;WSR51:=(WSR46>REF(WSR46,1) AND CROSS(WSR50,WSR46));WSR52:=(INDEXC-MA(INDEXC,34))/MA(INDEXC,34);WSR53:=(INDEXC-MA(INDEXC,55))/MA(INDEXC,55);WSR54:=(INDEXC-MA(INDEXC,89))/MA(INDEXC,89);WSR55:=(WSR52 + WSR53 + WSR54)/3;WSR56:=(C-MA(C,60))/MA(C,60);WSR57:=(C-MA(C,120))/MA(C,120);WSR58:=(C-MA(C,220))/MA(C,220);WSR59:=(WSR56 + WSR57 + WSR58)/3;WSR60:=(WSR59>REF(WSR59,1) AND CROSS(WSR59,WSR55));WSR61:=WSR24 OR WSR33 OR WSR42 OR WSR51 OR WSR60; DRAWTEXT(WSR61 AND H<Y396 AND FILTER(WSR61,5),良机区3,'★'),COLOR00FFFF;DRAWTEXT(WSR61 AND H<Y396 AND FILTER(WSR61,5),良机区3*0.97,'机'),COLOR00FFFF;时间之窗:=HHVBARS(ZIG(3,M)>REF(ZIG(3,M),1)AND REF(ZIG(3,M), 1)<REF(ZIG(3,M), 2),N);DRAWTEXT(时间之窗=2,L*0.94,'★3天'),COLORRED;DRAWTEXT(时间之窗=4,H*1.06,'★5天'),COLORGREEN;DRAWTEXT(时间之窗=7,L*0.94,'★8天'),COLORRED;DRAWTEXT(时间之窗=12,H*1.06,'★13天'),COLORGREEN;DRAWTEXT(时间之窗=20,L*0.94,'★21天'),COLORLIRED;DRAWTEXT(时间之窗=33,H*1.06,'★34天'),COLORLIGREEN;DRAWTEXT(时间之窗=54,L*0.94,'★55天'),COLORLIRED;{DRAWTEXT(时间之窗=88,H*1.06,'★89天'),COLORLIGREEN; DRAWTEXT(时间之窗=143,L*0.94,'★144天'),COLORLIRED;DRAWTEXT(时间之窗=232,H*1.06,'★233天'),COLORLIGREEN; DRAWTEXT(时间之窗=376,L*0.94,'★377天'),COLORLIRED;DRAWTEXT(时间之窗=609,H*1.06,'★610天'),COLORLIGREEN; };GET:=ZIG(3,3),COLORFFFFFF;PL5:=ZIG(3,5);EN1:=ZIG(3,5)>REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)<=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)<=REF(ZIG(3,5),3);EX1:=ZIG(3,5)<REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)>=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)>=REF(ZIG(3,5),3);PL10:=ZIG(3,10);EN2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<=REF(ZIG(3,10),2)AND REF(ZIG(3,10),2)<=REF(ZIG(3,10),3);EX2:=ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)>=REF(ZIG(3,10),3);PL20:=ZIG(3,20);EN3:=ZIG(3,20)>REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)<=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)<=REF(ZIG(3,20),3);EX3:=ZIG(3,20)<REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)>=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)>=REF(ZIG(3,20),3);PL40:=ZIG(3,40);走强1:=BARSLAST(PL5<REF(PL5,1));走弱1:=BARSLAST(PL5>REF(PL5,1));走强2:=BARSLAST(PL10<REF(PL10,1));走弱2:=BARSLAST(PL10>REF(PL10,1));走强3:=BARSLAST(PL20<REF(PL20,1));走弱3:=BARSLAST(PL20>REF(PL20,1));ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱2),0);DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱2),0);ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0);DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0);DRAWTEXT(EN1 AND DTJZ5=1,L*0.98,'(A)'),COLORFFFF00;DRAWTEXT(EX1 AND DTJD5=2,H*1.02,'(B)'),COLORFF00FF;DRAWTEXT(EN2 AND ZTJZ5=1,L*0.98,'(C)'),COLOR0000FF;涨停:=IF(REF(C,1)*1.1-C<0.01 ,1,0);STICKLINE(涨停,OPEN,CLOSE,4,0),COLORRED;STICKLINE(涨停,OPEN,CLOSE,3,0),COLORYELLOW;STICKLINE(涨停,H,L,0,0),COLORYELLOW;DRAWTEXT_FIX(1,0.90,0,0,HYBLOCK),COLORFF00FF;线A1:=(MA(CLOSE,5)+MA(CLOSE,10)+MA(CLOSE,25))/3;线A4:=(MA(CLOSE,13)+MA(CLOSE,34)+MA(CLOSE,55))/3;DRAWICON(CROSS(线A1,线A4),线A1,1);DRAWTEXT(CROSS(线A1,线A4),LOW*0.96,'破'),COLORYELLOW;V1:=EMA(CLOSE,5),COLOR00FFFF;V2:=EMA((EMA(CLOSE,29))*(1.01),10),COLORFF00FF;DRAWICON(CROSS(V1,V2),LOW,1),COLORYELLOW;DRAWTEXT(CROSS(V1,V2),LOW*0.98,'招'),COLORYELLOW;AAF:LLV(LOW,34),LINETHICK1,COLORFFFFCC;BBF:MA(AAF,4),LINETHICK1,COLORYELLOW;TYP := (HIGH + LOW + CLOSE)/3;CCI1:=(TYP-MA(TYP,6))/(0.015*AVEDEV(TYP,5));差值1:=ABS(REF(CCI1,1)-CCI1),LINETHICK0;CCI2:=(TYP-MA(TYP,10))/(0.015*AVEDEV(TYP,10));差值2:=ABS(REF(CCI2,1)-CCI2),LINETHICK0;CCI3:=(TYP-MA(TYP,20))/(0.015*AVEDEV(TYP,20));差值3:=ABS(REF(CCI3,1)-CCI3),LINETHICK0;CCI4:=(TYP-MA(TYP,30))/(0.015*AVEDEV(TYP,30));差值4:=ABS(REF(CCI4,1)-CCI4),LINETHICK0;CCI5:=(TYP-MA(TYP,60))/(0.015*AVEDEV(TYP,60));差值5:=ABS(REF(CCI5,1)-CCI5),LINETHICK0;CCI:=CCI1+CCI2+CCI3+CCI4+CCI5;AAA:=(3*C+H+L+O)/6;VAR1A:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;VAR2A:=(HHV(VAR1A,5)+HHV(VAR1A,10)+HHV(VAR1A,20))/3;VAR3A:=(LLV(VAR1A,5)+LLV(VAR1A,10)+LLV(VAR1A,20))/3;VAR4A:=(HHV(VAR2A,5)+HHV(VAR2A,10)+HHV(VAR2A,20))/3;VAR5A:=(LLV(VAR3A,5)+LLV(VAR3A,10)+LLV(VAR3A,20))/3;VAR6A:=(LLV(VAR1A,2)+LLV(VAR1A,4)+LLV(VAR1A,6))/3;短线:VAR1A,COLORWHITE;中线:VAR6A,COLORYELLOW;下跌:IF(VAR1A=VAR6A,VAR6A, DRAWNULL),COLORGREEN;TJ1:= CCI1>差值4;立桩量:=FILTER(TJ1,0),NODRAW;TJ2:=IF(BARSLAST(立桩量)=1 ,1,0);STICKLINE(立桩量!=1,REF(HIGH,BARSLAST(立桩量)),REF(HIGH,BARSLAST(立桩量)),1,1),COLORCYAN;{STICKLINE(立桩量!=1,REF(LOW,BARSLAST(立桩量)),REF(LOW,BARSLAST(立桩量)),1,1),COLORCYAN;}成立1:=TJ2=1;条件成立1:=FILTER(成立1,5);DRAWTEXT(条件成立1, REF(HIGH,BARSLAST(立桩量)),'看跌'),COLORLIBLUE; TJ11:= CCI1<-差值4 ;立桩量2:=FILTER(TJ11,0),NODRAW;TJ22:=IF(BARSLAST(立桩量2)=1 AND CLOSE>REF(HIGH,1),1,0);突破2:=TJ22=1;{STICKLINE(CLOSE AND 下跌!= VAR6A,REF(HIGH,BARSLAST(立桩量2)), REF(HIGH,BARSLAST(立桩量2)),1,1),COLORYELLOW;}STICKLINE(CLOSE AND 下跌!= VAR6A,REF(LOW,BARSLAST(立桩量2)), REF(LOW,BARSLAST(立桩量2)),1,1),COLORYELLOW;TJ:=IF(BARSLAST(立桩量2)=1 AND CLOSE>REF(LOW,1),1,0);成立2:=TJ=1;条件成立2:=FILTER(成立2,5);DRAWTEXT(条件成立2,REF(LOW,BARSLAST(立桩量2)),'看涨'),COLORLIMAGENTA;TJ111:=ABS(CCI1)>CCI AND ABS( 差值1)> ABS(差值5);立桩量3:=FILTER(TJ111,3);TJ3:=IF(BARSLAST(立桩量3)=1 AND CLOSE>REF(LOW,1),1,IF(BARSLAST(立桩量3)=2 AND CLOSE>REF(LOW,2),1,IF(BARSLAST(立桩量3)=3 AND CLOSE>REF(LOW,3),1,0)));成立:=TJ3=1;条件成立:=FILTER(成立,5);DRAWTEXT(条件成立AND 下跌!= VAR6A,L*0.97,'☆成立');LC:=REF(CLOSE,1);RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100); FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);DRAWTEXT(CROSS(FF,MA15),BBF,'底背离'),COLORA6E500;DRAWTEXT(CROSS(88,RSI),(HIGH * 1.02),'顶背离'),COLOR1880FF;X1:=(C+L+H)/3;BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;EMA8:=EMA(C,8);DRAWTEXT(FILTER(BB13>1 AND EMA(X1,13)>REF(EMA(X1,8),1),10),EMA8,'∠45'),COLORWHITE;STICKLINE(1,C,O,2.8,0),COLOR666600;STICKLINE(立桩量,C,O,2.8,0),COLOR0000FF;STICKLINE(1,C,O,0,0),COLORCCCCCC;成本2:(MA(CLOSE,60)+MA(CLOSE,70)+MA(CLOSE,90)+MA(CLOSE,108))/4,COLOR RED,LINETHICK2;。
通达信指标——资金突破主图(主图)
买线:=EMA(C,2);卖线:=EMA(SLOPE(C,21)*20+C,42);BU:=CROSS(买线,卖线);SEL:=CROSS(卖线,买线);STICKLINE(买线>=卖线,LOW,HIGH,0.1,0),COLORRED;STICKLINE(买线>=卖线,CLOSE,OPEN,3,0),COLORRED;STICKLINE(买线<卖线,CLOSE,OPEN,3,0),COLORFFF000;STICKLINE(买线<卖线,LOW,HIGH,0.1,0),COLORFFF000;Z1:=REF(HIGH,4)=HHV(HIGH,2*4+1);Y1:=FILTER(Z1,3);C1:=BACKSET(Y1,3+1);D1:=FILTER(C1,3);A2:=REF(LOW,3)=LLV(LOW,2*3+1);V2:=FILTER(A2,3);C2:=BACKSET(V2,3+1);D2:=FILTER(C2,3);E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2;E2:=(HIGH+LOW)/2;H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR=1 OR BARSCOUNT(CLOSE)=1; H2:=D1 AND NOT(D2 AND E1>=E2);L1:=D2 AND NOT(D1 AND E1=E2);X1:=REF(BARSLAST(H1),1)+1;F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I1,1);L2:=LD OR ISLASTBAR=1 OR BARSCOUNT(CLOSE)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));G2:=F2>REF(F2,1);I2:=BACKSET(G2,2);HD:=I2>REF(I2,1);UU2:=BACKSET(ISLASTBAR=1,BARSLAST(HD)+1);VV2:=UU2>REF(UU2,1);WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);XX2:=WW2>REF(WW2,1);突破线:=REF(H,BARSLAST(VV2));持仓线:=REF(H,BARSLAST(XX2));TP1:=CROSS(C,突破线);TP2:=CROSS(C,持仓线);STICKLINE(TP1,H,L,0,0),COLORYELLOW;STICKLINE(TP1,C,O,3,0),COLORYELLOW;STICKLINE(TP1,C,O,3,0),COLORYELLOW;STICKLINE(TP1,C,O,1,0),COLORYELLOW;DRAWTEXT(TP1,LOW*0.98,'资金突破'),LINETHICK1,COLORYELLOW;STICKLINE(TP2,H,L,0,0),COLORYELLOW;STICKLINE(TP2,C,O,3,0),COLORYELLOW;STICKLINE(TP2,C,O,3,0),COLORYELLOW;STICKLINE(TP2,C,O,1,0),COLORYELLOW;DRAWTEXT(TP2,LOW*0.98,'资金突破'),LINETHICK1,COLORYELLOW;。
通达信主力成本主图指标公式
通达信主力成本主图指标公式通达信主力成本主图指标公式:CB:DMA(((2*C+H+L)/4+(2*H+L+C)/4+(2*L+C+H)/4)/3*90,H SL/90)/90,COLORRED,CIRCLEDOT;长底:CB*0.618,COLORWHITE;中底:CB*0.809,COLORGREEN ;警示:CB*1.191,COLORLIBLUE;脱离:CB*1.382,COLORMAGENTA;EMA((2*C+H+L)/4,240)COLORBLUE;IF(EMA((2*C+H+L)/4,240)>REF(EMA((2*C+H+L)/4,240),1),E MA((2*C+H+L)/4,240),DRAWNULL)COLORYELLOW,CIRCLEDOT;TY:=C;HD:=FILTER(BACKSET(FILTER(REF(TY,10)=HHV(TY,2*10+1),1 0),10+1),10);LD:=FILTER(BACKSET(FILTER(REF(TY,10)=LLV(TY,2*10+1),10), 10+1),10);A:=REF(C,BARSLAST(HD));B:=REF(C,BARSLAST(LD));T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD) ;T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);波浪顶:IF(T1,A,A),COLORFF00FF,POINTDOT,LINETHICK1;STICKLINE(T1,A,A,9,0),COLORFF00FF;波浪底:IF(T2,B,B),COLOR80FF00,POINTDOT,LINETHICK1;VAR3:=LLV(H,240);VAR4:=100*(C-VAR3)/VAR3;VAR5:=(C-LLV(L,528))/(HHV(H,528)-LLV(L,528))*100;VAR6:=(C-LLV(C,530))/(HHV(C,530)-LLV(C,530))*100;VAR7:=0;VAR8:=MA(HHV(C-REF(C,1),0),34)/MA(ABS(C-REF(C,1)),7)*100;VAR9:=MA(HHV(C-REF(C,1),0),13)/MA(ABS(C-REF(C,1)),13)*100;VARA:=BARSCOUNT(C);VARB:=VAR8<20 AND VAR9<23 AND VARA>35;VARC:=VARB AND COUNT(VARB,1)=1;VARD:=EMA(C,21)-EMA(C,8);VARE:=EMA(VARD,5);VARF:=TROUGH(3,6,1)<4 AND CROSS(VARD,VARE);VAR10:=IF(TROUGH(3,16,1)=0 AND H>L+0.04,4,0);VAR11:=ZIG(3,6)>REF(ZIG(3,6),1)AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2)AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);VAR12:=ZIG(3,6)<REF(ZIG(3,6),1)AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2)AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);VAR13:=ZIG(3,22)>REF(ZIG(3,22),1)AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2)AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);VAR14:=ZIG(3,22)<REF(ZIG(3,22),1)AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2)AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);VAR15:=ZIG(3,51)>REF(ZIG(3,51),1)AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2)AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);VAR16:=ZIG(3,51)<REF(ZIG(3,51),1)AND REF(ZIG(3,51),1)>=REF(ZIG(3,51),2)AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);VAR17:=ZIG(3,72)>REF(ZIG(3,72),1)AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2)AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);VAR18:=ZIG(3,72)<REF(ZIG(3,72),1)AND REF(ZIG(3,72),1)>=REF(ZIG(3,72),2)AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);VAR19:=EMA(C,2)-EMA(C,150);VAR1A:=EMA(VAR19,100);VAR1B:=2*(VAR19-VAR1A);VAR1C:=POW(VAR1B,3)*0.1+POW(VAR1B,1);VAR1D:=SQRT(SQRT(L*H*O*C));VAR1E:=EMA(VAR1D*0.97,3);VAR1F:=(H+L+C)/3;VAR20:=(VAR1F-MA(VAR1F,14))/(0.015*AVEDEV(VAR1F,14));VAR21:=CROSS(VAR1E,L);买点1:=VAR10;买点2:=(VAR11+VAR13+VAR15+VAR17);卖点1:=(VAR12+VAR14+VAR16+VAR18),LINETHICK2;VAR22:=买点1 AND VARF AND VARC AND VAR21 AND VAR4<0AND VAR5=0 AND VAR6=0 AND VAR20<(-110);VAR1:=MA(C,5);VAR2:=MA(C,10);VAR31:=MA(C,30);VARB1:=SUM(C*V*100,28)/SUM(V*100,28);VARC1:=INTPART(VARB1*100)/100;VARD1:=EMA(C,5)-EMA(C,10);VARE1:=EMA(VARD1,9);VAR131:=REF(VARE1,1);VAR141:=VARE1;VAR151:=VAR141-VAR131;VAR161:=REF(VARD1,1);VAR171:=VARD1;VAR181:=VAR171-VAR161;VAR191:=O;VAR1A1:=C;DRAWTEXT(买点1>0,L-0.01,'▲'),COLORRED; DRAWTEXT(买点2>0,L-0.01,'▲'),CO LORFF00FF; DRAWTEXT(卖点1>0,H+0.1,'卖'), COLOR33FF33;。
通达信2指标——BS买卖主图(主图)
{BS买卖主图}短趋:EMA((2*CLOSE+HIGH+LOW)/4,5),COLOR00FF00;洗盘:EMA((2*CLOSE+HIGH+LOW)/4,12),COLOR00FF00;中线:EMA((LOW+CLOSE+OPEN)/3,26),COLOR008000,LINETHICK2;牛熊:EMA(LOW,125),POINTDOT,COLOR00FF00,LINETHICK3;V AR10:=MA(CLOSE,80)-MA(CLOSE,10)/3;DRAWTEXT(IF(CLOS< V AR10 AND VOL/240> EMA(VOL,5)/240 AND CLOSE>= REF(CLOSE,1)*1.08 AND CLOSE< MA(CLOSE,13)*1.3,1,0),LOW,'☆'),COLORRED;{布林极限}UPR:=BBI+3*STD(BBI,10);DWN:=BBI-3*STD(BBI,10);XX:=CROSS(MA(C,3),DWN);V AR2SS:=(REF(HIGH,1)+REF(LOW,1))/2;V AR3SS:=MA(CLOSE,20)+2*STD(CLOSE,20);DRAWTEXT(CROSS(V AR2SS,V AR3SS),HIGH*1.02,'卖') ,COLOR008000;LC:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;DRAWTEXT(CROSS(84,RSI) , HIGH,'小心'),COLORWHITE;趋势线:=3*SMA((CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100,5,1)-2*SMA(SMA( (CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);底部:=LLV(CLOSE,30);MA3:=MA(底部,2);X:=MA(CLOSE,26);压力:=HHV(HIGH,30),COLORF8EE00;X1:=(C+L+H)/3;X2:=EMA(X1,6);X3:=EMA(X2,5);GR1:=BARSLAST(BETWEEN("BIAS.BIAS2"(6,13,24),0,5));GR2:=EMA(X1,13)> EMA(X1,21) AND EMA(X1,21)> EMA(X1,34)AND EMA(X1,13)> REF(EMA(X1,13),1);GR3:=COUNT("BIAS.BIAS2"(6,13,24)> 10 AND H= HHV(H,GR1),GR1);GR4:=H=HHV(H,GR1);GR5:="MACD.MACD"(12,26,9)GR6:=GR2 AND GR3 AND GR4;GR7:=GR2 AND GR3 AND GR4 AND GR5;GR8:=GR6 AND GR7;涨家数:INDEXADV,NODRAW,,COLORRED ;跌家数:INDEXDEC,NODRAW,COLORGREEN;RSI6:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;BIAS5:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;换手:=100*V/CAPITAL;BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;EMA8:=EMA(C,8);DRAWTEXT(FILTER(BB13> 1 AND EMA(X1,13)> REF(EMA(X1,8),1),10),EMA8,'加仓'),COLOR00FF00;短趋S:IF(短趋> REF(短趋,1),短趋,DRAWNULL),COLOR0000FF,LINETHICK1;洗盘S:IF(洗盘> REF(洗盘,1),洗盘,DRAWNULL),COLOR0000FF,LINETHICK1;中线S:IF(中线> REF(中线,1),中线,DRAWNULL),COLORMAGENTA,LINETHICK2;牛熊S:IF(牛熊> REF(牛熊,1),牛熊,DRAWNULL),COLOR0000FF,POINTDOT,LINETHICK3; 买线:=EMA(C,2);卖线:=EMA((C+H+L+O)/4,7) ;BU:=CROSS(买线,卖线);SEL:=CROSS(卖线,买线);DRAWICON(BU,L-0.1,7);DRAWICON(SEL,H+0.1,8);====================================================================== =====。
通达信2指标——涨停先锋(主图)
操作: MA((LOW+HIGH+CLOSE)/3,5),LINETHICK2,COLORWHITE;拉升:HHV(操作,13),COLORRED,LINETHICK1;压力:=HHV(操作,60),COLORRED;支撑:LLV(操作,13),LINETHICK1,COLOR00FF00;底部支撑:= LLV(LOW,60)*1.02,COLOR00CCFF;顶部:= HHV(HIGH,60)*0.98,COLORFFFFCC;V AR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);V AR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);V AR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);V AR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);V AR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);V AR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);V AR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);V AR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);V AR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);V ARA:=REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);V ARB:=REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);V ARC:=REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); STICKLINE(V AR1 OR V AR2 OR V AR3 OR V AR4 OR V AR5 OR V AR6 OR V AR7 ORV AR8 OR V AR9 OR V ARA OR V ARB OR V ARC,CLOSE,REF(CLOSE,1),3,0),COLORRED;{Oì1}V ARD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);V ARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);V ARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);V AR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);V AR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);V AR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);V AR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);V AR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);V AR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);V AR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);V AR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);V AR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); STICKLINE(V ARD OR V ARE OR V ARF OR V AR10 OR V AR11 OR V AR12 OR V AR13 ORV AR14 OR V AR15 OR V AR16 OR V AR17 OR V AR18,CLOSE,REF(CLOSE,1),3,0),COLORFFCC66;V AR19:=REF(VARD OR V ARE OR V ARF OR V AR10 OR V AR11 OR V AR12 OR V AR13 OR V AR14 OR V AR15 OR VAR16 OR V AR17 OR V AR18,1) AND V AR1;STICKLINE(V AR19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLORYELLOW;V AR1A:=REF(VAR1 OR V AR2 OR V AR3 OR V AR4 OR V AR5 OR V AR6 OR V AR7 ORV AR8 OR V AR9 OR V ARA OR V ARB OR V ARC,1) AND VARD;STICKLINE(V AR1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLORRED{98FD};STICKLINE(V AR19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR00C8FF;STICKLINE(V AR19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR10ECFF;STICKLINE(V AR19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR10FFFF;PR2:=(2*CLOSE+HIGH+LOW)/4;PR4:=LLV(LOW,5);PR5:=HHV(HIGH,4);散户:=EMA((PR2-PR4)/(PR5-PR4)*100,4);庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2);涨停先锋1:=IF(CROSS(散户,庄家) AND 散户<50 AND 29<散户ANDC>O,20,0),COLORWHITE;F:=C>O OR (C=O AND C>REF(C,1));支撑价:=LLV(LOW,19);阻力价:=HHV(HIGH,19);PPR1:=EMA(CLOSE,12)-EMA(CLOSE,26);PPR2:=EMA(PPR1,9);PPR3:=(CLOSE*2.5/100+CLOSE);PPR4:=EMA(C,3);PPR5:=LLV(HIGH,240);PPR6:=100*(CLOSE-PPR5)/PPR5;PPR7:=REF(LLV(CLOSE,480),1);PPR8:=REF(HHV(CLOSE,480),1);PPR9:=100*(CLOSE-PPR7)/(PPR8-PPR7);PPRA:=(CLOSE-LLV(CLOSE,981))/(HHV(CLOSE,981)-LLV(CLOSE,981))*100;PPRB:=(CLOSE-LLV(CLOSE,393))/(HHV(CLOSE,393)-LLV(CLOSE,393))*100;PPRC:=(CLOSE-LLV(LOW,981))/(HHV(HIGH,981)-LLV(LOW,981))*100;PPRD:=(CLOSE-LLV(LOW,393))/(HHV(HIGH,393)-LLV(LOW,393))*100;PPRE:=PPRC>98.5 OR PPRD>98.5;PPRF:=EMA(100*(CLOSE-LLV(LOW,100))/(HHV(HIGH,100)-LLV(LOW,100)),5)/4;PPR13:=PPRA=0 AND PPRC=0 AND PPR6<0;PPR14:=PPRA=100 AND PPRC=100;PPR15:=PPRB=0 OR PPRD=0 AND PPR9<0;PPR16:=PPRB=100 AND PPRD=100;PPR17:=PPR6<0 AND PPR9<0;PPR18:=PPR13 AND PPR15;PPR19:=PPR14 AND PPR16;PPR1B:=SMA(MAX(CLOSE-REF(CLOSE,1),0),49,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1) *100;PPR1C:=SMA(MAX(CLOSE-REF(CLOSE,1),0),14,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),14, 1)*100;PPR1D:=BARSCOUNT(CLOSE);PPR1E:=PPR1B<20 AND PPR1C<23 AND PPR1D>35;PPR1F:=PPR1E AND COUNT(PPR1E,1)=1;PPR20:=REF(CLOSE,1);PPR21:=SMA(MAX(CLOSE-PPR20,0),34,1)/SMA(ABS(CLOSE-PPR20),7,1)*100;PPR22:=SMA(MAX(CLOSE-PPR20,0),13,1)/SMA(ABS(CLOSE-PPR20),13,1)*100;PPR23:=BARSCOUNT(CLOSE);PPR24:=PPR21<20 AND PPR22<23 AND PPR23>35;PPR25:=PPRA=0 AND PPRF<1.2 AND PPR17;PPR27:=PPR18 AND PPRF<1.2 AND PPR17;PPR29:=SUM(HIGH-OPEN,77)/SUM(OPEN-LOW,77)*100;PPR2A:=SUM(MAX(0,HIGH-REF(CLOSE,1)),77)/SUM(MAX(0,REF(CLOSE,1)-LOW),77)*1 00;PPR2B:=CROSS(PPR29,69) AND CROSS(PPR2A,80)<150;PPR2C:=PPR24 AND PPR1F AND COUNT(PPR24,30)=1;PPR2D:=PPR1F AND PPR2C AND PPR25;短买:=(CLOSE/REF(CLOSE,1)>1.04 AND (CLOSE>10.8 AND CLOSE<10.83 OR CLOSE>6.86 AND CLOSE<6.88 OR CLOSE>13.82 AND CLOSE<13.84 OR CLOSE>7.28 AND CLOSE<7.3 OR CLOSE>12.4 AND CLOSE<12.42 OR CLOSE>22.33 AND CLOSE<22.35 OR CLOSE>4.68 AND CLOSE<4.7 OR CLOSE>26.29 AND CLOSE<26.31 OR CLOSE>7.65 AND CLOSE<7.67 OR CLOSE>13.4 AND CLOSE<13.42 OR CLOSE>7.58 AND CLOSE<7.6 OR CLOSE>20.43 AND CLOSE<20.45 OR CLOSE>19.57 AND CLOSE<19.59 OR CLOSE>6.26 AND CLOSE<6.28 OR CLOSE>7.14 AND CLOSE<7.16 OR CLOSE>6.61 AND CLOSE<6.63 OR CLOSE>11.9 AND VOL<11.92 OR CLOSE>6.7 AND CLOSE<6.72 OR CLOSE>8.19 AND CLOSE<8.21));股海万元:=(COUNT(REF(PPR4,1)<REF(PPR4,2),5)=5 AND PPR4>REF(PPR4,1))*20,COLORWHITE;PARL0:=(MA(CLOSE,5)+MA(CLOSE,10)+MA(CLOSE,15)+MA(CLOSE,20))/4;PARL1:=C/REF(C,1)<1.05 AND C/REF(C,1)>1;PARL2:=HHV(C/REF(C,1),60)>1.06 OR LLV(C/REF(C,1),60)<0.94{不选ST};PARL3:=C>O AND C<30;LOWP:=LLV(LOW,9);HIGHP:=HHV(HIGH,9);RSP:=EMA((CLOSE-LOWP)/(HIGHP-LOWP)*100,3);X:=EMA(RSP,3);Y:=MA(X,3),COLORRED;PARL4:=CROSS(X,Y) AND X<70;三天:=(CROSS(PARL0,REF(PARL0,2)) OR (PARL4 AND PARL0>REF(PARL0,2))) AND PARL1 AND PARL2 AND PARL3 AND X>Y AND X<70;P1:=LLV(LOW,10);P2:=HHV(H,25);价位线:=EMA((C-P1)/(P2-P1)*4,4);SS:=CROSS(价位线,0.3);极点买入:=SS*20,COLORWHITE;涨停先锋:=(涨停先锋1 OR 极点买入OR 股海万元OR 三天);DRAWTEXT(涨停先锋=1,支撑,'○'),COLORYELLOW;多:=EMA(C,3),COLORYELLOW;空:=EMA(C,5),COLOR00FF00;均衡:=EMA(空,5),COLORWHITE,;VFFF1:=COUNT(CROSS(多,均衡),2)=1;VFFF2:=COUNT(CROSS(空,均衡),2)=1;ZAI:=FILTER(VFFF1 AND VFFF2,2);DRAWTEXT(ZAI,均衡*0.98,'买'),COLORFF00FF;VV2:=REF(CLOSE,1);VV3:=SMA((CLOSE-VV2),6,1)/SMA(ABS(CLOSE-VV2),6,1)*100;DRAWICON(REF(VV3,1)>81 AND VV3<80,HIGH,2);DRAWTEXT(REF(VV3,1)>81 AND VV3<80,HIGH,'卖'),COLORYELLOW;VF1:=MA(CLOSE,60)-MA(CLOSE,5)/3.2;DRAWTEXT(IF(CLOSE<VF1 AND VOL/240>MA(VOL,5)/240 AND CLOSE>=REF(CLOSE,1)*1.08 AND CLOSE<MA(CLOSE,13)*1.3,1,0),LOW,'买'),COLORRED;VFFA:=(CLOSE-REF(OPEN,29))/REF(OPEN,29)*100;VFFB:=EMA(0.667*REF(VFFA,1)+0.333*VFFA,5);DRAWTEXT(IF(VOL>=1.3*MA(VOL,5) AND COUNT(VFFA>=VFFB AND VFFA<-17,3) AND REF(LOW,1)=LLV(LOW,120),1,0),LOW,'买');VFFR1:=SMA(MAX(CLOSE-REF(C,1),0),6,1)/SMA(ABS(CLOSE-REF(C,1)),6,1)*100; DRAWICON(CROSS(82,VFFR1),HIGH,2);DRAWTEXT(CROSS(82,VFFR1),HIGH,'卖'),COLORYELLOW;VFF1:=(HIGH+LOW+OPEN+2*CLOSE)/5;VFF2:=REF(VFF1,1);VFF3:=SMA(MAX(VFF1-VFF2,0),10,1)/SMA(ABS(VFF1-VFF2),10,1)*100;HY3:=IF(COUNT(VFF3<20,5)>=1 AND COUNT(VFF1=LLV(VFF1,10),10)>=1 AND CLOSE>=OPEN*1.038 AND VOL>MA(VOL,5)*1.2,1,0);DRAWTEXT(HY3,LOW,'买'),COLORYELLOW;S:=MA(VOL,5)/MA(VOL,60),COLORRED,,LINETHICK2;A:=MA(S,5),COLORGREEN,,LINETHICK2;BIAS:=(CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100;FG:=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<11 AND BIAS>-11 AND CROSS( S,FG) AND (S-FG)>0.010),2,0),STICK,LINETHICK3,COLOR00FF00;庄压:HHV(MA(H,13),13),COLORYELLOW,LINETHICK2;趋势:=LLV(MA(H,13),1),COLORGREEN,LINETHICK2;LCE:=REF(CLOSE,1);RSI5:=((SMA(MAX((CLOSE - LCE),0),5,1) / SMA(ABS((CLOSE - LCE)),5,1)) * 100); TRQ:=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) / TRQ);MDI:=((DMM * 100) / TRQ);ADX:=MA(((ABS((MDI - PDI)) / (MDI + PDI)) * 100),5);A V:=(RSI5 + ADX);DXR:=(((ADX + REF(ADX,5)) / 2) + RSI5);WR10:=((100 * (HHV(HIGH,10) - CLOSE)) / (HHV(HIGH,10) - LLV(LOW,10))); NEWVOL:=(RSI5 - WR10);阶段底部:=(A V + NEWVOL);趋势线:=LLV(阶段底部,1);DRAWTEXT(CROSS(趋势线,0),支撑*0.95,'荐'), COLORWHITE;DRAWTEXT(CROSS(230,趋势线),拉升*1.02,'减'), COLORBLUE;。
通达信2指标——1号主图(主图)
{布林}布林:=HHV(HHV(L,14),60);阻力区:=EMA(EMA(布林,16)-2*STD(布林,16),3);阻力区1:=EMA(EMA(布林,14)+2*STD(布林,14),18);DRAWBAND(阻力区,RGB(99,99,99),阻力区1,RGB(99,99,99));{四线开花}【4】:MA(CLOSE,250),COLORBLUE,LINETHICK3;【3】:MA(CLOSE,120),COLORCY AN,LINETHICK3;【2】:MA(CLOSE,60),COLORGREEN,LINETHICK3;【1】:MA(CLOSE,20),COLORLIRED,LINETHICK3;{神秘线}V0:=VOL*(O+C+H+L)/4;SM:EMA(V0,21)/EMA(VOL,21),COLOR987654,LINETHICK0;{量能平台突破}PT:IF(HHVBARS(V,35),REF(C,HHVBARS(V,35)),C),COLOR7F017F,LINETHICK0;{N日涨幅}N1:=BARSLAST(CROSS(C,MA(C,6)));N2:=BARSLAST(CROSS(MA(C,6),C));N:IF(N1<N2,N1+1,0),COLORBLUE,NODRAW;ZF%:(C-REF(C,N))/REF(C,N)*100,COLORRED,NODRAW;{三色K线}STICKLINE(C>=SM AND C>=O,OPEN,CLOSE,3,1),COLORRED;STICKLINE(C>=SM AND C>=O,LOW,MIN(O,C),0,1),COLORRED;STICKLINE(C>=SM AND C>=O,MAX(O,C),HIGH,0,1),COLORRED;STICKLINE(C>=SM AND C<O,C,O,3,0),COLORCY AN;STICKLINE(C>=SM AND C<O,C,O,1,0),COLORCY AN;STICKLINE(C>=SM AND C<O,L,HIGH,0,1),COLORCY AN;STICKLINE(C<SM AND C>=O,OPEN,CLOSE,3,1),COLORWHITE;STICKLINE(C<SM AND C>=O,LOW,MIN(O,C),0,1),COLORWHITE;STICKLINE(C<SM AND C>=O,MAX(O,C),HIGH,0,1),COLORWHITE;STICKLINE(C<SM AND C<O,C,O,3,0),COLORWHITE;STICKLINE(C<SM AND C<O,C,O,1,0),COLORWHITE;STICKLINE(C<SM AND C<O,L,HIGH,0,1),COLORWHITE;{立桩量}V2:=IF(CURRBARSCOUNT=1,VOL*240/FROMOPEN/REF(VOL,1)-1,VOL/REF(VOL,1)-1); STICKLINE(V2>=1 AND OPEN<CLOSE,OPEN,CLOSE,5,1),COLORYELLOW; STICKLINE(V2>=1 AND OPEN>CLOSE,OPEN,CLOSE,5,0),COLORCYAN;{涨跌停K线}涨跌:=REF(C,1);涨停:=IF((C-涨跌)*100/涨跌>=(10-0.01*100/涨跌),1,0);STICKLINE(涨停,OPEN,CLOSE,4,0),COLORRED;STICKLINE(涨停,H,L,0,0),COLORRED;跌停:=IF((涨跌-C)*100/涨跌>=(10-0.01*100/涨跌),1,0);STICKLINE(跌停,OPEN,CLOSE,4,0),COLORBLUE;STICKLINE(跌停,H,L,0,1),COLORBLUE;{立桩量金箍}STICKLINE(V2>=1,O,(C+O)/2,6,0),COLOR003333;STICKLINE(V2>=1,O,(C+O)/2,5,0),COLOR116666;STICKLINE(V2>=1,O,(C+O)/2,4,0),COLOR229999;STICKLINE(V2>=1,O,(C+O)/2,3,0),COLOR33CCCC;STICKLINE(V2>=1,O,(C+O)/2,2,0),COLOR44FFFF;MA10:MA(CLOSE,10),COLORYELLOW,LINETHICK1;MA5:MA(CLOSE,5),COLORWHITE,LINETHICK1;{信号系统}买入1:DRAWICON(CROSS(【1】,【2】),【2】*0.98,5);买入2:DRAWICON(CROSS(【1】,【3】),【3】*0.98,5);买入3:DRAWICON(CROSS(【1】,【4】),【4】*0.98,5);买入4:DRAWICON(CROSS(【2】,【3】),【3】*0.98,9);买入5:DRAWICON(CROSS(【2】,【4】),【4】*0.98,9);买入6:DRAWICON(CROSS(【3】,【4】),【4】*0.98,135);{买入7:DRAWICON(CROSS(MA5,MA10),MA10*0.98,1);买入8:DRAWICON(CROSS(MA5,【1】),【1】*0.976,1);买入9:DRAWICON(CROSS(MA5,【2】),【2】*0.972,1);买入10:DRAWICON(CROSS(MA5,【3】),【3】*0.968,1);买入11:DRAWICON(CROSS(MA5,【4】),【4】*0.964,1);};。
通达信指标公式源码顶底趋势主图画线指标
顶底趋势主图画线指标N:=3;A1:=REF(H,N)=HHV(H,2*N+1);B1:=FILTER(A1,N);C1:=BACKSET(B1,N+1);D1:=FILTER(C1,N);{高点}A2:=REF(L,N)=LLV(L,2*N+1);B2:=FILTER(A2,N);C2:=BACKSET(B2,N+1);D2:=FILTER(C2,N);{低点}E1:=(REF(LLV(L,2*N),1)+REF(HHV(H,2*N),1))/2;E2:=(H+L)/2;{高低点出现在同一K线上时可作取舍}H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(C)=1; L1:=(D2 AND NOT(D1 AND E1<E2));H2:=D1 AND NOT(D2 AND E1>=E2);X1:=REF(BARSLAST(H1),1)+1;F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,L,10000),X1));G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I1,1),LINETHICK0;{过滤后低点}L2:=LD OR ISLASTBAR OR BARSCOUNT(C)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,H,0),X2));G2:=F2>REF(F2,1);I2:=BACKSET(G2,2);HD:=I2>REF(I2,1),LINETHICK0;{过滤后高点}R1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);S1:=R1>REF(R1,1);{前一高}T1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);U1:=T1>REF(T1,1);{前一低}R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2);S2:=R2>REF(R2,1);{前二高}T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);U2:=T2>REF(T2,1);{前二低}T3:=BACKSET(U2,REF(BARSLAST(LD),1)+2);U3:=T3>REF(T3,1);{前三低}T4:=BACKSET(U3,REF(BARSLAST(LD),1)+2);U4:=T4>REF(T4,1);{前四低}R3:=BACKSET(S2,REF(BARSLAST(HD),1)+2);S3:=R3>REF(R3,1);{前三高}R4:=BACKSET(S3,REF(BARSLAST(HD),1)+2);S4:=R4>REF(R4,1);{前四高}★压力1:DRAWLINE(S2,H,S1,H,1),COLORMAGENTA,LINETHICK1; ★支撑1:DRAWLINE(U2,L,U1,L,1),COLOR8FBC8F,LINETHICK1;★压力2:DRAWLINE(S3,H,S2,H,1),COLORFF8000;★支撑2:DRAWLINE(U3,L,U2,L,1),COLOR99CC32;★压力3:DRAWLINE(S4,H,S3,H,1),COLOR0000FF;★支撑3:DRAWLINE(U4,L,U3,L,1),COLOR00FF7F; DRAWICON(S2,H*1.01,10);DRAWICON(S3,H*1.01,10);DRAWNUMBER(S2,H*1.02,H),COLORCFB53B; DRAWNUMBER(S1,H*1.02,H),COLORCFB53B; DRAWNUMBER(S3,H*1.02,H),COLORCFB53B;DRAWICON(U1,L*0.99,11);DRAWICON(U2,L*0.99,11);DRAWICON(U3,L*0.99,11);DRAWICON(U4,L*0.99,11);DRAWNUMBER(U1,L*0.98,L),COLORCYAN;DRAWNUMBER(U2,L*0.98,L),COLORCYAN;DRAWNUMBER(U3,L*0.98,L),COLORCYAN;DRAWNUMBER(U4,L*0.98,L),COLORCYAN;。
通达信指标公式源码自用的主图
强势区域:EMA(C,250),COLORYELLOW,DOTLINE;AA:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,30))/MA(CLOSE,30);JAX:=DMA((2*CLOSE+LOW+HIGH)/4,AA);压力:(1+9/100)*JAX,COLORLIRED;支撑:(1-9/100)*JAX,COLORLIRED;顶:(1+13/100)*JAX,COLORLIRED;底:(1-13/100)*JAX,COLORLIRED;下降压力线:DRAWLINE(HIGH>=HHV(HIGH,10),HIGH,LOW<=LLV(LOW,3),HHV(HIGH,3),1),COLOR YELLOW;DRAWBAND(MA(C,13),RGB(155,50,50),MA(C,21),RGB(83,123,68));DRAWKLINE(H,O,L,C);主力线:MA(C,13),COLORLIRED;工作线:MA(C,21),COLORLIRED;生命线:EMA(CLOSE,60),COLORRED, LINETHICK1;强势判定:EMA(C,250),COLORRED,DOTLINE;ELE:=(((REF(HIGH,1))+(REF(LOW,1))+(REF(OPEN,1))+2*(REF(CLOSE,1)))/5);突破价:=(ELE+((REF(HIGH,1))-(REF(LOW,1)))),NODRAW;阻力价:=(2*ELE-(REF(LOW,1))),NODRAW;DRAWTEXT(ISLASTBAR,强势判定,'←强势判定'),COLORFFCC10,COLORMAGENTA; DRAWTEXT(ISLASTBAR,生命线,'←生命线'),COLORFFCC10,COLORMAGENTA; DRAWTEXT(ISLASTBAR,压力,'←压力'),COLORFFCC10,COLORYELLOW;DRAWTEXT(ISLASTBAR,支撑,'←支撑'),COLORFFCC10,COLORYELLOW;DRAWTEXT(ISLASTBAR,顶,'←落袋为安'),COLORFFCC10,COLORYELLOW; DRAWTEXT(ISLASTBAR,底,'←底.短线机会'),COLORFFCC10,COLORYELLOW; DRAWTEXT(ISLASTBAR,主力线,'←主力线'),COLORFFCC10,COLORYELLOW; DRAWTEXT(ISLASTBAR,工作线,'←工作线'),COLORFFCC10,COLORYELLOW;IF(主力线<=REF(主力线,1),主力线,DRAWNULL),COLORGREEN;IF(工作线<=REF(工作线,1),工作线,DRAWNULL),COLORGREEN;IF(压力<=REF(压力,1),压力,DRAWNULL),COLORGREEN;IF(支撑<=REF(支撑,1),支撑,DRAWNULL),COLORGREEN;IF(顶<=REF(顶,1),顶,DRAWNULL),COLORGREEN;IF(底<=REF(底,1),底,DRAWNULL),COLORGREEN;IF(生命线<=REF(生命线,1),生命线,DRAWNULL),COLORGREEN;IF(强势判定<=REF(强势判定,1),强势判定,DRAWNULL),COLORGREEN;。
通达信二色主图指标公式
B1:=EMA((2*CLOSE+HIGH+LOW)/4,5);A1:IF(EMA((2*CLOSE+HIGH+LOW)/4,6)>REF(EMA((2*CLOSE+HIGH+LOW)/4,6),1),B1, DRAWNULL),COLOR0000FF;A2:IF(EMA((2*CLOSE+HIGH+LOW)/4,6)<REF(EMA((2*CLOSE+HIGH+LOW)/4,6),1),B1, DRAWNULL),COLOR00FF00;B2:=EMA((2*CLOSE+HIGH+LOW)/4,13);A3:IF(EMA((2*CLOSE+HIGH+LOW)/4,10)>REF(EMA((2*CLOSE+HIGH+LOW)/4,13),1), B2,DRAWNULL),COLOR0000FF;A4:IF(EMA((2*CLOSE+HIGH+LOW)/4,10)<REF(EMA((2*CLOSE+HIGH+LOW)/4,13),1), B2,DRAWNULL),LINETHICK2,COLOR00FF00;B3:=REF(EMA((LOW+CLOSE+OPEN)/3,25),1);A5:IF(EMA((LOW+CLOSE+OPEN)/3,28)>REF(EMA((LOW+CLOSE+OPEN)/3,28),1),B3, DRAWNULL),LINETHICK3,COLOR0000FF;A6:IF(EMA((LOW+CLOSE+OPEN)/3,28)<REF(EMA((LOW+CLOSE+OPEN)/3,28),1),B3, DRAWNULL),LINETHICK3,COLOR00FF00;B4:=(EMA(LOW,125)+EMA((CLOSE+LOW)/2,125))/2;A7:IF((EMA(LOW,125)+EMA((CLOSE+LOW)/2,250))/2>REF((EMA(LOW,125)+EMA((CL OSE+LOW)/2,250))/2,1),B4,DRAWNULL),POINTDOT,COLOR0000FF;A8:IF((EMA(LOW,125)+EMA((CLOSE+LOW)/2,250))/2<REF((EMA(LOW,125)+EMA((CL OSE+LOW)/2,250))/2,1),B4,DRAWNULL),POINTDOT,COLOR00FF00;短高H:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*RE F(H,6)+13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12)+7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+ REF(H,20))/210,COLORBLUE,LINETHICK1;短低L:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L ,6)+13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12)+7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+ REF(L,20))/210,COLORBLUE,LINETHICK1;D90H:=EMA(短高H,90)-(EMA(短高H,90)-EMA(短低L,90))*0.2,COLORRED,LINETHICK1;D90L:=EMA(短低L,90)+(EMA(短高H,90)-EMA(短低L,90))*0.2,COLORRED,LINETHICK1; 高0:=(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1+XMA(XMA(H,25),25),LINETHICK1,CO LORWHITE;低0:=XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1,LINETHICK1,COL ORWHITE;中中中:=((XMA(XMA(H,15),15)+XMA(XMA(H,20),20)+XMA(XMA(H,30),30)+XMA(XMA(H,40), 40))/4+(XMA(XMA(L,15),15)+XMA(XMA(L,20),20)+XMA(XMA(L,30),30)+XMA(XMA(L,40 ),40))/4)/2,LINETHICK0,COLORGREEN;EMA中中中:=EMA(中中中,10),LINETHICK0,COLORWHITE;A:=(3*C+L+O+H)/6;B:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+14*REF (A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+ REF(A,20))/210,COLORRED,LINETHICK1;D:=MA(B,10),COLORRED,LINETHICK2;D14:=MA(B,14),COLORRED,LINETHICK2;D21:=MA(B,21),COLORRED,LINETHICK2;A9:=MA((3*C+L+O+H)/6,28);B9:=(20*A9+19*REF(A1,1)+18*REF(A9,2)+17*REF(A9,3)+16*REF(A9,4)+15*REF(A9,5) +14*REF(A9,6)+13*REF(A9,7)+12*REF(A9,8)+11*REF(A9,9)+10*REF(A9,10)+9*REF(A9,11)+8*REF(A9 ,12)+7*REF(A9,13)+6*REF(A9,14)+5*REF(A9,15)+4*REF(A9,16)+3*REF(A9,17)+2*REF(A9, 18)+REF(A9,12))/210,COLORGREEN,LINETHICK1;D1:=MA(B9,14),COLORGREEN,LINETHICK2;中中顶:=(XMA(XMA(H,15),15)+XMA(XMA(H,20),20)+XMA(XMA(H,30),30)+XMA(XMA(H,40), 40))/4*2-(XMA(XMA(L,15),15)+XMA(XMA(L,20),20)+XMA(XMA(L,30),30)+XMA(XMA(L,4 0),40))/4,LINETHICK2,COLORGREEN;中中底:=(XMA(XMA(L,15),15)+XMA(XMA(L,20),20)+XMA(XMA(L,30),30)+XMA(XMA(L,40),4 0))/4*2-(XMA(XMA(H,15),15)+XMA(XMA(H,20),20)+XMA(XMA(H,30),30)+XMA(XMA(H,4 0),40))/4,LINETHICK2,COLORGREEN;短中顶:=(XMA(XMA(H,5),5)+XMA(XMA(H,8),8)+XMA(XMA(H,11),11)+XMA(XMA(H,14),14)+X MA(XMA(H,4),4))/5+((XMA(XMA(H,5),5)+XMA(XMA(H,8),8)+XMA(XMA(H,11),11)+XMA( XMA(H,14),14)+XMA(XMA(H,4),4))/5-(XMA(XMA(L,5),5)+XMA(XMA(L,8),8)+XMA(XMA(L,11),11)+XMA(XMA(L,14),14)+XMA(XMA(L,4),4))/5)/2,LINETHICK0,COLORWHITE;短中底:=(XMA(XMA(L,5),5)+XMA(XMA(L,8),8)+XMA(XMA(L,11),11)+XMA(XMA(L,14),14))/4-( (XMA(XMA(H,5),5)+XMA(XMA(H,8),8)+XMA(XMA(H,11),11)+XMA(XMA(H,14),14)+XMA( XMA(H,4),4))/5-(XMA(XMA(L,5),5)+XMA(XMA(L,8),8)+XMA(XMA(L,11),11)+XMA(XMA(L ,14),14)+XMA(XMA(L,4),4))/5)/2,LINETHICK0,COLORWHITE;中顶:=(XMA(XMA(H,30),30)+XMA(XMA(H,40),40)+XMA(XMA(H,50),50)+XMA(XMA(H,60), 60))/4*2.03-(XMA(XMA(L,30),30)+XMA(XMA(L,40),40)+XMA(XMA(L,50),50)+XMA(XMA( L,60),60))/4,LINETHICK2,COLORRED;中底:=(XMA(XMA(L,30),30)+XMA(XMA(L,40),40)+XMA(XMA(L,50),50)+XMA(XMA(L,60),6 0))/4*1.97-(XMA(XMA(H,30),30)+XMA(XMA(H,40),40)+XMA(XMA(H,50),50)+XMA(XMA( H,60),60))/4,LINETHICK2,COLORRED;长顶:=(XMA(XMA(H,90),90)+XMA(XMA(H,120),120)+XMA(XMA(H,150),150))/3*2.08-(XMA (XMA(L,90),90)+XMA(XMA(L,120),120)+XMA(XMA(L,150),150))/3,LINETHICK2,COLOR YELLOW;长底:=(XMA(XMA(L,90),90)+XMA(XMA(L,120),120)+XMA(XMA(L,150),150))/3*1.92-(XMA( XMA(H,90),90)+XMA(XMA(H,120),120)+XMA(XMA(H,150),150))/3,LINETHICK2,COLOR YELLOW;AF长:=EMA((CLOSE+HIGH+LOW)/3,18);BF长:=REF(AF长,1);AF中:=EMA((CLOSE+HIGH+LOW)/3,10);BF中:=REF(AF中,1);AF5:=EMA((CLOSE+HIGH+LOW)/3,6);BF5:=REF(AF5,1);AF3:=EMA((CLOSE+HIGH+LOW)/3,3);BF3:=REF(AF3,1);买入定位:=AF长>BF长OR AF中>BF中OR AF5>BF5 OR AF3>BF3;卖出定位:=AF长<BF长OR AF中<BF中OR AF5<BF5;顶底定位:=AF长<BF长OR AF中<BF中OR AF5<BF5 OR AF3<BF3;STICKLINE(买入定位=1,LOW,HIGH,0.0,1),COLORRED;STICKLINE(买入定位=1,CLOSE,OPEN,3,1),COLORRED;STICKLINE(AF中<BF中,LOW,HIGH,0.0,0),COLORGREEN;STICKLINE(AF中<BF中,CLOSE,OPEN,3,1),COLORGREEN;STICKLINE(卖出定位=1 AND 中中顶>中顶,LOW,HIGH,0.0,1),COLORGREEN;STICKLINE(卖出定位=1 AND 中中顶>中顶,CLOSE,OPEN,3,1),COLORGREEN; STICKLINE(顶底定位=1 AND H>中中顶AND H>中顶,CLOSE,OPEN,3,1),COLORGREEN;STICKLINE(顶底定位=1 AND H>中中顶AND H>中顶,LOW,HIGH,0.0,1),COLORGREEN; 加仓定位1:=卖出定位=1 AND 中中顶>中顶;加仓定位2:=顶底定位=1 AND H>中中顶AND H>中顶;DRAWTEXT(中中中<EMA中中中AND CROSS(AF中,BF中) AND 短中底<中中底AND 短中底<中底,L*0.97,'↖大牛'),COLORFF00FF;DRAWTEXT(中中中>=EMA中中中AND CROSS(AF中,BF中) AND 短中底<中中底,L*0.97,'↖黑马'),COLORFF00FF;DRAWTEXT(CROSS(BF3,AF3) AND H>中中顶AND H>中顶,H*1.03,'↙【逃】'),COLORGREEN;DRAWTEXT(加仓定位1=0 AND 加仓定位2=0 AND CROSS(AF中,BF中) AND 中中中>=EMA中中中,L*0.995,'↖追'),COLORYELLOW;DRAWTEXT(CROSS(AF长,BF长) AND 中底<长底,L*0.97,'↖【赌】'),COLORRED; DRAWTEXT(CROSS(AF长,BF长) AND 中底<长底AND 中底>长底,L*0.97,'↖中底'),COLORYELLOW;STICKLINE(AF中>BF中AND 短中底<中底AND 短中底<中底,CLOSE,OPEN,2,0),COLORRED;DRAWTEXT(AF3>BF3 AND 短中底<中中底AND H<中中底,L*0.985,'↖骗'),COLORWHITE;STICKLINE(AF3>BF3 AND 短中底<中中底AND H<中中底,CLOSE,OPEN,2,0),COLORRED;STICKLINE(中中中>=EMA中中中AND CROSS(AF中,BF中) AND AF中<中中中AND AF中<(中顶+中底)/2 AND H<短中顶,CLOSE,OPEN,3,0),COLORRED;DRAWTEXT(中中中>=EMA中中中AND CROSS(AF中,BF中) AND AF中<中中中AND AF中<(中顶+中底)/2 AND H<短中顶,L*0.97,'↖【买】'),COLORRED;DRAWTEXT(CROSS(BF中,AF中) AND 中中中<EMA中中中,H*1.01,'↙卖'),COLORGREEN;DRAWICON(AF中<中中中AND AF中<(中顶+中底)/2 AND H<短中顶AND CROSS(AF 中,BF中) AND 中中中<EMA中中中,L*0.99,1);。
通达信指标公式源码启动金三角主图指标
MA5:MA(C,5),COLORYELLOW;MA10:MA(CLOSE,10),COLORFF00FF;MA30:MA(C,30),COLORRED,LINETHICK2;跌:IF(MA(CLOSE,30)<=REF(MA(CLOSE,30),1),MA(CLOSE,30),DRAWNULL),CO LORGREEN,LINETHICK2;MA60:MA(CLOSE,60),COLORFFCC66;GJTJ1:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5));GJTJ2:=100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10));GJTJ3:=100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20));GJTJ4:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30));BAIJIN1:=BARSLAST(CROSS(30,GJTJ1))<2 ANDBARSLAST(CROSS(GJTJ1,50))<2;BAIJIN2:=BARSLAST(CROSS(GJTJ4,GJTJ1))<2 AND GJTJ1>GJTJ4;BAIJIN3:=GJTJ1>60 AND GJTJ4>70;DRAWTEXT(BAIJIN1 AND BAIJIN2 AND BAIJIN3,L-0.02,'白金'),COLORWHITE; HUANGJIN1:=BARSLAST(CROSS(50,GJTJ1))<3 ANDBARSLAST(CROSS(GJTJ1,50))<3;HUANGJIN2:=BARSLAST(CROSS(GJTJ4,GJTJ1))<2 AND GJTJ1>GJTJ4; DRAWTEXT(HUANGJIN1 AND HUANGJIN2,L-0.03,'黄金'),COLORYELLOW; XG:=BARSLAST(CROSS(GJTJ4,GJTJ1))<5 AND GJTJ1>GJTJ4; DRAWTEXT(COUNT(XG,3)=1 AND XG AND C>MA(C,20),L-0.02,'启动金三角'),COLORRED;M10:=MA(C,10);M13:=MA(C,13);VVVV5:=CROSS(M10,M13);WWF1:DRAWICON(VVVV5,H,11);QQQQ1:STICKLINE(VVVV5<C,REF(C,BARSLAST(CROSS(M10,M13))),REF(C,BA RSLAST(CROSS(M10,M13))),-1,-1),COLORWHITE;RC1:=REF(C,1);大阴线:=C<0.96*O OR C<=RC1*0.96 OR C>1000 AND C<=RC1*0.98;大阴T:=BARSLAST(FILTER(大阴线,3));{调整显示密度}大阴实顶: REF(O,大阴T),COLORLIGREEN,POINTDOT;{显示大阴K线的开盘价O};MTM:=MA(C,6)-MA(C,13)+C;MTMMA:MA(MTM,5),DOTLINE,COLORRED;AAA:=(3*C+H+L+O)/6;VAR21:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(AAA, 4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;TJ1:=VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>VAR21;立桩量:=FILTER(TJ1,5);D1:REF(LOW,BARSLAST(立桩量)),COLORYELLOW,NODRAW,LINETHICK1;买线:=EMA(C,2);卖线:=EMA(SLOPE(C,21)*20+C,42);BU:=CROSS(买线,卖线);SEL:=CROSS(卖线,买线);DRAWICON(BU,L-0.1,1);DRAWICON(SEL,H+0.1,2);空:=EMA(CLOSE,5);动平衡:EMA(空,34),COLORYELLOW,LINETHICK2;双线持币:HHV(MA(HIGH,3),2),COLORGREEN,LINETHICK2;单线持股:LLV(MA(HIGH,3),1),COLORRED,LINETHICK2;STICKLINE(买线>=卖线,LOW,HIGH,0,0),COLORLIRED;STICKLINE(买线>=卖线,CLOSE,OPEN,3,2),COLORLIRED;STICKLINE(买线<卖线,LOW,HIGH,0,0),COLORCYAN;STICKLINE(买线<卖线,CLOSE,OPEN,3,2),COLORCYAN;STICKLINE(OPEN>CLOSE,CLOSE,OPEN,2.5,0),COLORCYAN;涨停:=IF(REF(C,1)*1.1-C<0.2 ,1,0);STICKLINE(涨停,OPEN,CLOSE,4,0),COLORRED;STICKLINE(涨停,OPEN,CLOSE,3,0),COLORYELLOW;STICKLINE(涨停,H,L,0,0),COLORYELLOW;核心K线:=V/REF(V,1)>=1.91 AND C>REF(C,1) AND C>O;TT:=V=HHV(V,21);BBL:=核心K线AND TT;BL:=FILTER(BBL,2);K1:=SUMBARS(BL,1);一买:=BL,NODRAW;DRAWTEXT(一买,L,'↖一买'),COLORYELLOW;二买:=CROSS(C,REFV(C,K1-1)),NODRAW;DRAWTEXT(二买,REFV(C,K1-1),'↖二买'),COLORRED;。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
N:=8;
MA1:MA(C,3);
MA2:MA(C,10),COLORFF8000;
MA3:MA(C,30);
MA4:MA(C,60),COLORFFBBCC;
TY:=C;
A1:=REF(TY,N)=HHV(TY,2*N+1);
B1:=FILTER(A1,N);
C1:=BACKSET(B1,N+1);
HD:=FILTER(C1,N);
A2:=REF(TY,N)=LLV(TY,2*N+1);
B2:=FILTER(A2,N);
C2:=BACKSET(B2,N+1);
LD:=FILTER(C2,N);
A:=REF(C,BARSLAST(HD));
B:=REF(L,BARSLAST(LD));
T1:=BARSLAST(HD)
T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);
顶:IF(T1,A,A),COLORYELLOW,POINTDOT,LINETHICK1;
底:IF(T2,B,B),COLORGREEN,POINTDOT;
上升:IF(MA3>REF(MA3,1),MA3,DRAWNULL),COLORRED,LINETHICK2; 下降:IF(MA3
平:IF(MA(C,30)=REF(MA(C,30),1),MA(C,30),DRAWNULL),COLOR00FFFF,LINETHICK2; BB:=(LMA(C,30)) AND (VO;
DRAWICON(BB,L*0.98,1);
STICKLINE(BB,O,C,1.5,0),COLORYELLOW;
换手:=VOL*100/CAPITAL;
STICKLINE(换手>15 AND C>O AND COUNT((CROSS(MA(VOL,3),MA(VOL,34))),3), OPEN,CLOSE,1.5,0),COLORFF6600;{放量蓝色K线信号}
YCX:=MA3>=REF(MA3,1);
H1:=MAX(MAX(MA1,MA2),MA3);
L1:=MIN(MIN(MA1,MA2),MA3);{一阳穿3线}
一阳穿线:= H1REF(MA2,1); {穿C线洋红色K线}
STICKLINE(一阳穿线,O,C,1.5,1),COLORLIGREEN;{洋红色K线}
ZX:=(MA1+MA3)/2;
QSXS:=MA1>=MA3 AND MA3>REF(MA3,1);
GD:=ZX>=REF(ZX,1) AND REF(ZX,1)
YB:=C>REF((O-C)/2+C,2);
买:=CROSS(C,ZX) AND (GD OR YB) AND QSXS;
DRAWTEXT(买AND BB,L*0.99, '买'),COLORLIBLUE;
DRAWTEXT(买AND 一阳穿线,L*0.99, '阳'),COLOR5290FF;
ZH1:=MAX(MAX(MA1,MA2),MA2);
ZH2:=MIN(MIN(MA1,MA2),MA2);
ZH3:=(FILTER((ZH1-ZH2)/ZH2<0.0005 AND C>O AND MA1>REF(MA1,1)
AND (LZH1),1));
DRAWTEXT(买AND ZH3,L*0.99, '合'),COLORYELLOW;。