通达信指标公式源码概况:指标类别: 通达信指标公式授权方式: 免费版指标评级: ★★★★★指标分类: 策略画线方法: 副图一、水平压力线主图指标公式 P:=2; N:=26; 涨幅:=(c-ref(c,1))/ref(c,1); st判断:=STRCMP( st ,STKNAME); 涨停:=if(st判断 1,涨幅 0.099,if(st判断=1,涨幅 0.049,0)); MID:MA(CLOSE,N); UPPER:MID+P*STD(CLOSE,N),COLOR006600; LOWER:MID-P*STD(CLOSE,N),COLOR660066; DRAWLINE(1,C,1,O,00),COLOR00FFFF; STICKLINE(1,L,H,1.8,0),COLOR333333; STICKLINE(C REF(C,1),O,C,1.5,0),COLORRED; STICKLINE(C REF(C,1)*1.095,O,C,5,0),COLOR0066FF; STICKLINE(C REF(C,1)ANDO C,O,C,1.5,0),COLOR990099; STICKLINE(C REF(C,1),O,C,1.5,0),COLORBLUE; STICKLINE(C REF(C,1)*0.9,O,C,5,0),COLORFFFF33; STICKLINE(C REF(C,1)ANDO C,O,C,1.5,0),COLOR00FF00; A0:=C REF(C,1)ORC=REF(C,1); AA0:=L LOWER; AA1:=REF(AA0,1)ANDC LOWERANDA0; AA2:=REF(AA0,1)ANDL LOWER; AA3:=REF(O,1) LOWERANDC LOWER; AA4:=REF(O,1) LOWERANDL LOWER; DRAWICON(AA1ANDNOT(REF(AA1,1)),L*0.98,7),ALIGN1; AA5:=AA1ANDNOT(REF(AA1,1))ANDMID REF(MID,1); M1:=10; M2:=60; EXP1:EXPMA(CLOSE,M1),LINETHICK2; EXP2:EXPMA(CLOSE,M2),LINETHICK3; 豆豆:=C; A1:=REF(豆豆,10)=HHV(豆豆,2*10+1);B1:=FILTER(A1,10);C1:=BACKSET(B1,10+1);HD:=FILTER(C1,10); A2:=REF(豆豆,10)=LLV(豆豆,2*10+1);B2:=FILTER(A2,10);C2:=BACKSET(B2,10+1);LD:=FILTER(C2,10); A:=REF(C,BARSLAST(HD));B:=REF(L,BARSLAST(LD)); T1:=BARSLAST(HD) BARSLAST(LD)ANDNOT(HD); T2:=BARSLAST(HD) BARSLAST(LD)ANDNOT(LD); 压力:IF(T1,A,A),COLORRED,POINTDOT,LINETHICK4; 支撑:IF(T2,B,B),COLORYELLOW,POINTDOT,LINETHICK4; 二分之一位:=IF(C OANDC REF(C,1),L+(H-L)/2,L+(H-L)/2); STICKLINE(CURRBARSCOUNT,二分之一位,二分之一位,3,1),COLORYELLOW; STICKLINE(CURRBARSCOUNT=2,二分之一位,二分之一位,3,1),COLORYELLOW; 当前二分之一位:L+(H-L)/2,NODRAW; 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; VAR1:=(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; VAR2:=(HHV(VAR1,5)+HHV(VAR1,10)+HHV(VAR1,20))/3; VAR3:=(LLV(VAR1,5)+LLV(VAR1,10)+LLV(VAR1,20))/3; VAR4:=(HHV(VAR2,5)+HHV(VAR2,10)+HHV(VAR2,20))/3; VAR5:=(LLV(VAR3,5)+LLV(VAR3,10)+LLV(VAR3,20))/3; VAR6:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3; 短线:VAR1,COLORWHITE; 中线:VAR6,COLORYELLOW; 下跌:IF(VAR1=VAR6,VAR6,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)=1ANDCLOSE REF(HIGH,1),1,0); 突破2:=TJ22=1; {STICKLINE(CLOSEAND下跌!=VAR6,REF(HIGH,BARSLAST(立桩量2)), REF(HIGH,BARSLAST(立桩量2)),1,1),COLORYELLOW;} STICKLINE(CLOSEAND下跌!=VAR6,REF(LOW,BARSLAST(立桩量2)), REF(LOW,BARSLAST(立桩量2)),1,1),COLORYELLOW; TJ:=IF(BARSLAST(立桩量2)=1ANDCLOSE REF(LOW,1),1,0); 成立2:=TJ=1; 条件成立2:=FILTER(成立2,5); DRAWTEXT(条件成立2,REF(LOW,BARSLAST(立桩量2)), 看涨 ),COLORLIMAGENTA; TJ111:=ABS(CCI1) CCIANDABS(差值1) ABS(差值5); 立桩量3:=FILTER(TJ111,3); TJ3:=IF(BARSLAST(立桩量3)=1ANDCLOSE REF(LOW,1),1,IF(BARSLAST(立桩量3)=2ANDCLOSE REF(LOW,2),1,IF(BARSLAST(立桩量3)=3ANDCLOSE REF(LOW,3),1,0))); 成立:=TJ3=1; 条件成立:=FILTER(成立,5); DRAWTEXT(条件成立AND下跌!=VAR6,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 1ANDEMA(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; AA:=IF((CLOSE 100),CLOSE,(CLOSE/100)); A:=INTPART(((4*(LOG(AA)/LOG(2)))+1)); B:=((A-1)/4); 支撑:IF((CLOSE 100),(POW(2,B)*100),POW(2,B)),CIRCLEDOT,LINETHICK1,COLORBROWN; 压力:IF((CLOSE 100),(POW(2,(B+(1/4)))*100),POW(2,(B+(1/4)))),CIRCLEDOT,LINETHICK1,COLORFF5500; DRAWICON(REF(压力,1)=支撑,L*0.95,1); {DRAWICON(支撑 HHV(H,15),H*1.05,2);}; DRAWTEXT(ISLASTBAR,支撑, ----支撑 ),COLOR00AAFF; DRAWTEXT(ISLASTBAR,压力, ----压力 ),COLORFF5500;二、精准支撑压力线主图公式 DRAWGBK(CLOSE 0,RGB(0,0,0),RGB(20,58,120),0,61,0); X_1:=MA(CLOSE,13); X_2:=100-ABS((CLOSE-X_1)/X_1*100); X_3:=LLV(LOW,75); X_4:=HHV(HIGH,75); X_5:=(X_4-X_3)/100; X_6:=SMA((CLOSE-X_3)/X_5,20,1); X_7:=SMA((OPEN-X_3)/X_5,20,1); X_8:=3*X_6-2*SMA(X_6,15,1); X_9:=3*X_7-2*SMA(X_7,15,1); X_10:=100-X_9; X_11:=100-X_8; X_12:=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); X_13:=EMA(X_12,5); DRAWBAND(IF(X_13-X_11 =0,X_13-X_11,0),RGB(150,90,50),0,RGB(50,50,50)); X_14:=(2*CLOSE+HIGH+LOW)/4; X_15:=LLV(LOW,34); X_16:=HHV(HIGH,34); X_17:=MAX((X_14-X_15)/(X_16-X_15)*100,8); X_18:=SMA(X_17,8,1); X_19:=SMA(X_18,5,1); DRAWBAND(X_18,RGB(250,248,0),X_19,RGB(0,118,0)); J:3*X_18-2*X_19,COLORMAGENTA; IF(EMA(((2*CLOSE+HIGH+LOW+OPEN)/5-LLV((2*CLOSE+HIGH+LOW+OPEN)/5,60))/(HHV((2*CLOSE+HIGH+LOW+OPEN)/5,60)-LLV((2*CLOSE+HIGH+LOW+OPEN)/5,60)),2)*100 90OREMA(((2*CLOSE+HIGH+LOW+OPEN)/5-LLV((2*CLOSE+HIGH+LOW+OPEN)/5,15))/(HHV((2*CLOSE+HIGH+LOW+OPEN)/5,15)-LLV((2*CLOSE+HIGH+LOW+OPEN)/5,15)),2)*100 95ANDJ 80,J,DRAWNULL),COLORGREEN,LINETHICK2; IF(EMA(((2*CLOSE+HIGH+LOW+OPEN)/5-LLV((2*CLOSE+HIGH+LOW+OPEN)/5,60))/(HHV((2*CLOSE+HIGH+LOW+OPEN)/5,60)-LLV((2*CLOSE+HIGH+LOW+OPEN)/5,60)),2)*100 10OREMA(((2*CLOSE+HIGH+LOW+OPEN)/5-LLV((2*CLOSE+HIGH+LOW+OPEN)/5,15))/(HHV((2*CLOSE+HIGH+LOW+OPEN)/5,15)-LLV((2*CLOSE+HIGH+LOW+OPEN)/5,15)),2)*100 5ANDJ 5,J,DRAWNULL),COLORYELLOW,LINETHICK2; X_20:=SMA(CLOSE,2,1); X_21:=SMA(MAX(CLOSE-X_20,0),6,1)/SMA(ABS(CLOSE-X_20),6,1)*100; X_22:=SMA(HIGH,2,1); X_23:=SMA(MAX(HIGH-X_22,0),6,1)/SMA(ABS(HIGH-X_22),6,1)*100; X_24:=SMA(OPEN,2,1); X_25:=SMA(MAX(OPEN-X_24,0),6,1)/SMA(ABS(OPEN-X_24),6,1)*100; X_26:=SMA(LOW,2,1); X_27:=SMA(MAX(LOW-X_26,0),6,1)/SMA(ABS(LOW-X_26),6,1)*100; X_28:=SMA(10000*CLOSE/INDEXC,2,1); X_29:=SMA(MAX(10000*CLOSE/INDEXC-X_28,0),6,1)/SMA(ABS(10000*CLOSE/INDEXC-X_28),6,1)*100; X_30:=(X_21+X_25+X_23+X_27+X_29)/5; X_31:=EMA(EMA(X_30,6),5); 底部【机会区】:IF(X_30 =15ANDX_31 =15,J,DRAWNULL),COLORRED,LINETHICK3; 顶部【风险区】:IF(X_30 =85ANDX_31 =80,J,DRAWNULL),COLORWHITE,LINETHICK3; 控仓(险):EMA(WINNER(CLOSE)*100,5) 85ANDX_18 85OR(EMA(WINNER(CLOSE)*100,5) 90ORX_18 90),NODRAW,COLORCYAN; STICKLINE(控仓(险),J,85,0,1),COLORCYAN,LINETHICK3; X_32:=REF(LOW,1)*0.9; X_33:=EMA(X_32,30); X_34:=CLOSE-REF(CLOSE,1); X_35:=MAX(X_34,0); X_36:=ABS(X_34); X_37:=SMA(X_35,7,1)/SMA(X_36,7,1)*100; X_38:=SMA(X_35,13,1)/SMA(X_36,13,1)*100; X_39:=BARSCOUNT(CLOSE); X_40:=SMA(MAX(X_34,0),6,1)/SMA(ABS(X_34),6,1)*100; X_41:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100; X_42:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100; X_43:=SMA((SMA(X_42,4,1)-50)*2,3,1); X_44:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100; X_45:=SMA(X_44,4,1); X_46:=SMA(X_45,3,1); X_47:=(HHV(HIGH,30)-CLOSE)/CLOSE*100; 神龙大底:(X_40 =25ANDX_41 (-95)ANDX_47 20ANDX_43 (-30)ANDX_46 30ANDX_33-CLOSE =(-0.25)ANDX_37 22ANDX_38 28ANDX_39 50)*50,COLORYELLOW; X_48:=VOL/REF(VOL,1) =1.91ANDCLOSE REF(CLOSE,1)ANDCLOSE OPEN; X_49:=VOL =HHV(VOL,21); X_50:=X_48ANDX_49; 倍量反弹:(X_30 =15ANDX_31 =15ANDX_50)*70,COLORGREEN; X_51:=BARSLAST(MONTH!=REF(MONTH,1))+1; 月±%:(CLOSE/REF(CLOSE,X_51)-1)*100,NODRAW,COLORRED; LC:=REF(CLOSE,1); RSI:SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100; MARSI:MA(RSI,6); 波段界:MA(MARSI,30),POINTDOT; 下降波段界:IF(波段界 REF(波段界,1),波段界,DRAWNULL),COLORGREEN,POINTDOT,LINETHICK5; 上升波段界:IF(波段界 REF(波段界,1),波段界,DRAWNULL),COLORRED,POINTDOT,LINETHICK5; 天顶线:DMA(COST(99.999),WINNER(COST(99.999))),COLORRED; 压力线:DMA(COST(95),WINNER(COST(99.999))),COLOR00BB00; 拉升线:DMA(COST(75),WINNER(COST(99.999))),COLOR6600FF; 平均成本:DMA(COST(50),WINNER(COST(99.999))),COLORYELLOW; 三分线:DMA(COST(33),WINNER(COST(99.999))),COLORMAGENTA; 建仓线:DMA(COST(20),WINNER(COST(99.999))),COLORGREEN; 底仓线:DMA(COST(10),WINNER(COST(99.999))),COLORWHITE; 无利线:DMA(COST(0.001),WINNER(COST(99.999))),COLORGREEN; HB:=COST(99.999); LB:=COST(0.001); B3:=(HB-LB)/50; B31:=HB-B3; B32:=HB-2*B3; B33:=HB-3*B3; B34:=HB-4*B3; B35:=HB-5*B3; B36:=HB-6*B3; B37:=HB-7*B3; B38:=HB-8*B3; B39:=HB-9*B3; B310:=HB-10*B3; B311:=HB-11*B3; B312:=HB-12*B3; B313:=HB-13*B3; B314:=HB-14*B3; B315:=HB-15*B3; B316:=HB-16*B3; B317:=HB-17*B3; B318:=HB-18*B3; B319:=HB-19*B3; B320:=HB-20*B3; B321:=HB-21*B3; B322:=HB-22*B3; B323:=HB-23*B3; B324:=HB-24*B3; B325:=HB-25*B3; B326:=HB-26*B3; B327:=HB-27*B3; B328:=HB-28*B3; B329:=HB-29*B3; B330:=HB-30*B3; B331:=HB-31*B3; B332:=HB-32*B3; B333:=HB-33*B3; B334:=HB-34*B3; B335:=HB-35*B3; B336:=HB-36*B3; B337:=HB-37*B3; B338:=HB-38*B3; B339:=HB-39*B3; B340:=HB-40*B3; B341:=HB-41*B3; B342:=HB-42*B3; B343:=HB-43*B3; B344:=HB-44*B3; B345:=HB-45*B3; B346:=HB-46*B3; B347:=HB-47*B3; B348:=HB-48*B3; B349:=HB-49*B3; A1:=WINNER(HB)*100-WINNER(B31)*100; A2:=WINNER(B31)*100-WINNER(B32)*100; A3:=WINNER(B32)*100-WINNER(B33)*100; A4:=WINNER(B33)*100-WINNER(B34)*100; A5:=WINNER(B34)*100-WINNER(B35)*100; A6:=WINNER(B35)*100-WINNER(B36)*100; A7:=WINNER(B36)*100-WINNER(B37)*100; A8:=WINNER(B37)*100-WINNER(B38)*100; A9:=WINNER(B38)*100-WINNER(B39)*100; A10:=WINNER(B39)*100-WINNER(B310)*100; A11:=WINNER(B310)*100-WINNER(B311)*100; A12:=WINNER(B311)*100-WINNER(B312)*100; A13:=WINNER(B312)*100-WINNER(B313)*100; A14:=WINNER(B313)*100-WINNER(B314)*100; A15:=WINNER(B314)*100-WINNER(B315)*100; A16:=WINNER(B315)*100-WINNER(B316)*100; A17:=WINNER(B316)*100-WINNER(B317)*100; A18:=WINNER(B317)*100-WINNER(B318)*100; A19:=WINNER(B318)*100-WINNER(B319)*100; A20:=WINNER(B319)*100-WINNER(B320)*100; A21:=WINNER(B320)*100-WINNER(B321)*100; A22:=WINNER(B321)*100-WINNER(B322)*100; A23:=WINNER(B322)*100-WINNER(B323)*100; A24:=WINNER(B323)*100-WINNER(B324)*100; A25:=WINNER(B324)*100-WINNER(B325)*100; A26:=WINNER(B325)*100-WINNER(B326)*100; A27:=WINNER(B326)*100-WINNER(B327)*100; A28:=WINNER(B327)*100-WINNER(B328)*100; A29:=WINNER(B328)*100-WINNER(B329)*100; A30:=WINNER(B329)*100-WINNER(B330)*100; A31:=WINNER(B330)*100-WINNER(B331)*100; A32:=WINNER(B331)*100-WINNER(B332)*100; A33:=WINNER(B332)*100-WINNER(B333)*100; A34:=WINNER(B333)*100-WINNER(B334)*100; A35:=WINNER(B334)*100-WINNER(B335)*100; A36:=WINNER(B335)*100-WINNER(B336)*100; A37:=WINNER(B336)*100-WINNER(B337)*100; A38:=WINNER(B337)*100-WINNER(B338)*100; A39:=WINNER(B338)*100-WINNER(B339)*100; A40:=WINNER(B339)*100-WINNER(B340)*100; A41:=WINNER(B340)*100-WINNER(B341)*100; A42:=WINNER(B341)*100-WINNER(B342)*100; A43:=WINNER(B342)*100-WINNER(B343)*100; A44:=WINNER(B343)*100-WINNER(B344)*100; A45:=WINNER(B344)*100-WINNER(B345)*100; A46:=WINNER(B345)*100-WINNER(B346)*100; A47:=WINNER(B346)*100-WINNER(B347)*100; A48:=WINNER(B347)*100-WINNER(B348)*100; A49:=WINNER(B348)*100-WINNER(B349)*100; A50:=WINNER(B349)*100-WINNER(LB)*100; STICKLINE(ISLASTBAR,B31,B31,A1*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B32,B32,A2*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B33,B33,A3*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B34,B34,A4*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B35,B35,A5*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B36,B36,A6*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B37,B37,A7*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B38,B38,A8*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B39,B39,A9*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B310,B310,A10*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B311,B311,A11*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B312,B312,A12*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B313,B313,A13*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B314,B314,A14*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B315,B315,A15*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B316,B316,A16*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B317,B317,A17*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B318,B318,A18*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B319,B319,A19*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B320,B320,A20*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B321,B321,A21*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B322,B322,A22*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B323,B323,A23*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B324,B324,A24*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B325,B325,A25*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B326,B326,A26*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B327,B327,A27*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B328,B328,A28*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B329,B329,A29*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B330,B330,A30*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B331,B331,A31*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B332,B332,A32*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B333,B333,A33*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B334,B334,A34*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B335,B335,A35*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B336,B336,A36*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B337,B337,A37*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B338,B338,A38*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B339,B339,A39*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B340,B340,A40*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B341,B341,A41*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B342,B342,A42*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B343,B343,A43*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B344,B344,A44*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B345,B345,A45*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B346,B346,A46*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B347,B347,A47*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B348,B348,A48*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,B349,B349,A49*50,0),COLORYELLOW; STICKLINE(ISLASTBAR,LB,LB,A50*DATE,0),COLORGREEN; STICKLINE(C =O,C,O,3,0),COLORMAGENTA; STICKLINE(C =O,H,L,0,0),COLORMAGENTA; STICKLINE(C =O,C,O,3,0),COLORLIGREEN; STICKLINE(C =O,H,L,0,0),COLORLIGREEN; N:=20;P:=3; BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4; DWN:BBI-P*STD(BBI,N),LINETHICK2; UPR:BBI+P*STD(BBI,N),LINETHICK2; MA5:MA(c,5),COLORFF50FF,LINETHICK2; partline(MA5,MA5 =ref(MA5,1),RGB(255,0,0),MA5 ref(MA5,1),RGB(0,250,0)),LINETHICK3; DRAWGBKLAST(MA5 =ref(MA5,1),STRIP(RGB(0,150,0),RGB(150,0,0),1)); DRAWGBKLAST(MA5 =ref(MA5,1),STRIP(RGB(150,0,0),RGB(0,150,0),1)); VAR326:=IF(CLOSE ref(CLOSE,1),88,0); VAR327:=IF(CLOSE/ref(CLOSE,1) 1.050ANDHIGH/CLOSE 1.010ANDVAR326 0,91,0); DRAWTEXT(VAR327 90,LOW*0.99, 追 ),COLORYELLOW; STICKLINE(VAR327 90,OPEN,CLOSE,3,0),COLORYELLOW; STICKLINE(VAR327 90,LOW,HIGH,0,0),COLORYELLOW; {45度异动} 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 1andeMA(x1,13) ref(eMA(x1,8),1),10), eMA8, ∠45上升 ),coloryelLOW; AAA:=(3*C+H+L+O)/6; VAR41:=(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)ANDVOL 2*ref(VOL,1)ANDCLOSE VAR41; 立桩量:=FILTER(TJ1,5); TJ2:=IF(BARSLAST(立桩量)=1ANDCLOSE ref(HIGH,1),1,IF(BARSLAST(立桩量)=2ANDCLOSE ref(HIGH,2),1,IF(BARSLAST(立桩量)=3ANDCLOSE ref(HIGH,3),1,0))); 突破:=TJ2=1; TJ3:=IF(BARSLAST(立桩量)=1ANDCLOSE ref(LOW,1),1,IF(BARSLAST(立桩量)=2ANDCLOSE ref(LOW,2),1,IF(BARSLAST(立桩量)=3ANDCLOSE ref(LOW,3),1,0))); 三天法则:=TJ3=1; 成立:=三天法则AND突破; 条件成立:=FILTER(成立,3); DRAWTEXT(条件成立,L*0.99, 立桩量 ),COLORYELLOW; var1:=CLOSE ref(CLOSE,1)ANDCLOSE ref(CLOSE,2); var2:=ref(var1,1)ANDCLOSE =ref(CLOSE,1)ANDCLOSE =ref(CLOSE,2); var3:=ref(var2,1)ANDCLOSE =ref(CLOSE,1)ANDCLOSE =ref(CLOSE,2); var4:=ref(var3,1)ANDCLOSE =ref(CLOSE,1)ANDCLOSE =ref(CLOSE,2); var5:=ref(var4,1)ANDCLOSE =ref(CLOSE,1)ANDCLOSE =ref(CLOSE,2); var6:=ref(var5,1)ANDCLOSE =ref(CLOSE,1)ANDCLOSE =ref(CLOSE,2); var7:=ref(var6,1)ANDCLOSE =ref(CLOSE,1)ANDCLOSE =ref(CLOSE,2); var8:=ref(var7,1)ANDCLOSE =ref(CLOSE,1)ANDCLOSE =ref(CLOSE,2); var9:=ref(var8,1)ANDCLOSE =ref(CLOSE,1)ANDCLOSE =ref(CLOSE,2); varA:=ref(var9,1)ANDCLOSE =ref(CLOSE,1)ANDCLOSE =ref(CLOSE,2); varB:=ref(varA,1)ANDCLOSE =ref(CLOSE,1)ANDCLOSE =ref(CLOSE,2); varC:=ref(varB,1)ANDCLOSE =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(varDORvarEORvarFORvar10ORvar11ORvar12ORvar13OR var14ORvar15ORvar16ORvar17ORvar18,1)ANDvar1; var1A:=ref(var1ORvar2ORvar3ORvar4ORvar5ORvar6ORvar7OR var8ORvar9ORvarAORvarBORvarC,1)ANDvarD; STICKLINE(var19,ref(CLOSE,1),ref(CLOSE,2),8,0),COLOR00FFFF;{黄色} STICKLINE(var1A,ref(CLOSE,1),ref(CLOSE,2),8,0),COLORFF00FF;{粉红色} 黄底买入:var19,LINETHICK0,COLOR00ffff; 粉顶卖出:var1A,LINETHICK0,COLORFF50FF;红色持股:0,LINETHICK0,COLORRED; 绿色持币:0,LINETHICK0,COLOR00d900; DRAWICON(var19,ref(CLOSE,1)*0.99,7),ALIGN1; DRAWICON(var1A,ref(CLOSE,1)*1.02,8),ALIGN1; DRAWTEXTABS(2,5, 所属板块: +BKNAME),COLORFF50FF,LINETHICK1; 流通盘大小:=FINANCE2(37)/1000000*100; DRAWTEXTABS(2,20, 流通盘大小: +NUMTOSTRN(流通盘大小,2)+ 亿 + 电子盲制作 ),LINETHICK1,COLORRED; 每股收益:=FINANCE2(3); 每股市盈率:=DYNAINFO(39); 每股净资产:=FINANCE2(4); 销售毛利率:=FINANCE2(12); 主营收入同比:=FINANCE2(11); 净利润同比增长:=FINANCE2(10); DRAWTEXTABS(160,35, 每股收益: +NUMTOSTRN(每股收益,2)+ 元 ),COLOR00FF00; DRAWTEXTABS(160,50, 每股市盈率: +NUMTOSTRN(每股市盈率,1)+ 倍 ),COLORRED; DRAWTEXTABS(160,65, 每股净资产: +NUMTOSTRN(每股净资产,2)+ 元 ),COLORRED; DRAWTEXTABS(2,35, 销售毛利率: +NUMTOSTRN(销售毛利率,2)+ % ),LINETHICK1,COLOR00FF00; DRAWTEXTABS(2,50, 主营收入同比增长: +NUMTOSTRN(主营收入同比,2)+ % ),LINETHICK1,ColorYELLOW; DRAWTEXTABS(2,65, 净利润同比增长: +NUMTOSTRN(净利润同比增长,2)+ % ),LINETHICK1,COLOR00FF00; DRAWTEXTABS(3,80, 历史最高价: +HHV(HIGH,0)),Colorred; DRAWTEXTABS(3,95, 历史最低价: +LLV(LOW,0)),ColorAFFF00; A4:=MA(CLOSE,20); A5:=(CLOSE MA(CLOSE,5)); A6:=(MA(CLOSE,5) MA(CLOSE,10)); A7:=(CLOSE MA(CLOSE,10)); A8:=(MA(CLOSE,5) MA(CLOSE,20)); A9:=(CLOSE MA(CLOSE,20)); A10:=ref(A4,1); A11:=(A4 A10); AVX:=(((((IF(A5,10,(0-10))+IF(A6,10,(0-10)))+IF(A7,10,(0-10)))+IF(A8,10,(0-10)))+IF(A9,10,(0-10)))+IF(A11,10,(0-10))); DSLX:=(CLOSE/INDEXC); DSLX1:=MA(DSLX,5); DSLX2:=MA(DSLX,10); V1:=MA(VOL,5); V2:=MA(VOL,10); 阻力位:=IF((CLOSE 200),(CLOSE*1.01),(CLOSE*1.07)); 阻力位1:=IF((CLOSE 10),(CLOSE*1.05),阻力位); 止损位:=IF((CLOSE 200),(CLOSE*0.99),(CLOSE*0.93)); 止损位1:=IF((CLOSE 10),(CLOSE*0.95),止损位); TJTS1:=BARSTATUS=2andc 200; TJTS2:=BARSTATUS=2andc 200; k2:=HHV(h,BARSLAST(DISPSTATUS=1)+1); DRAWTEXT(TJTS1and((CROSS(AVX,1)AND(V1 =V2))AND(DSLX =DSLX1)),k2*0.99, 该股的量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3左右。 ),ALIGN2,colorDC143C; DRAWTEXT(TJTS1and((CROSS(AVX,1)AND(V1 V2))AND(DSLX =DSLX1)),k2*0.99, 该股虽然走势趋强,但量能还显不足,可以考虑短线进场,仓位在1/2左右。 ),ALIGN2,colorDC143C; DRAWTEXT(TJTS1and((CROSS(AVX,1)AND(V1 V2))AND(DSLX DSLX1)),k2*0.99, 该股量价配合良好,但相对其它股票并没有明显走强,可以考虑短线进场,仓位1/2左右。 ),ALIGN2,colorDC143C; DRAWTEXT(TJTS1and((CROSS(AVX,1)AND(V1 =V2))AND(DSLX DSLX1)),k2*0.99, 该股形态尚可,但量能不足,股票也未完全走强,可以短线参与,仓位1/3左右。 ),ALIGN2,color0000FF; DRAWTEXT(TJTS1and((CROSS(1,AVX)AND(V1 =V2))AND(DSLX =DSLX1)),k2*0.99, 该股形态变坏,但走势相对其它股票尚可,重仓者减持大半,清仓者可以观望。 ),ALIGN2,color00FF00; DRAWTEXT(TJTS1and((CROSS(1,AVX)AND(V1 V2))AND(DSLX =DSLX1)),k2*0.99, 该股随大盘一起下跌,程明显缩量走势,考虑到大盘风险,减持或清仓。 ),ALIGN2,color00FF00; DRAWTEXT(TJTS1and((CROSS(1,AVX)AND(V1 =V2))AND(DSLX DSLX1)),k2*0.99, 该股放量下跌,走势明显偏弱,离场观望。 ),ALIGN2,color00FF00; DRAWTEXT(TJTS1and((CROSS(1,AVX)AND(V1 V2))AND(DSLX DSLX1)),k2*0.99, 该股缩量下跌,走势偏弱,离场观望。 ),ALIGN2,color00FF00; DRAWTEXT(TJTS1and((((AVX =1)AND(ref(AVX,1) 0))AND(V1 =V2))AND(DSLX =DSLX1)),k2*0.99, 该股形态良好,强势明显,量能充足,可以继续持有。 ),ALIGN2,color00FFFF; DRAWTEXT(TJTS1and((((AVX =1)AND(ref(AVX,1) 0))AND(V1 V2))AND(DSLX =DSLX1)),k2*0.99, 该股上行趋势不变,强势依然,但量能开始转弱,注意风险。 ),ALIGN2,color00FFFF; DRAWTEXT(TJTS1and((((AVX =1)AND(ref(AVX,1) 0))AND(V1 =V2))AND(DSLX DSLX1)),k2*0.99, 该股仍然具备上涨潜力,但股性偏弱,可考虑减仓。 ),ALIGN2,color00FFFF; DRAWTEXT(TJTS1and((((AVX =1)AND(ref(AVX,1) 0))AND(V1 V2))AND(DSLX DSLX1)),k2*0.99, 该股走势趋弱,量能不足,减持大部分筹码。 ),ALIGN2,color00FFFF; DRAWTEXT(TJTS1and((((AVX 1)AND(ref(AVX,1) 0))AND(V1 =V2))AND(DSLX =DSLX1)),k2*0.99, 该股形态不佳,注意成交量的变化,但目前不适合参与。 ),ALIGN2; DRAWTEXT(TJTS1and((((AVX 1)AND(ref(AVX,1) 0))AND(V1 V2))AND(DSLX =DSLX1)),k2*0.99, 该股趋势不明,股价偏弱,注意量能变化,目前不宜参与。 ),ALIGN2; DRAWTEXT(TJTS1and((((AVX 1)AND(ref(AVX,1) 0))AND(V1 =V2))AND(DSLX DSLX1)),k2*0.99, 该股有走强迹象,但量能不足,趋势不明,不适合操作。 ),ALIGN2; DRAWTEXT(TJTS1and((((AVX 1)AND(ref(AVX,1) 0))AND(V1 V2))AND(DSLX DSLX1)),k2*0.99, 该股走势太弱,没有参与价值。 ),ALIGN2; DRAWTEXT(TJTS2and(CROSS(AVX,1)AND(V1 =V2)),k2*0.99, 大盘量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3左右, ),ALIGN2,color0000FF; DRAWTEXT(TJTS2and(CROSS(AVX,1)AND(V1 =V2)),k2*0.98, 如前期经过一轮下跌,此时为最佳买点,但如果前期有过一段涨幅则介入需谨慎。 ),ALIGN2,color0000FF; DRAWTEXT(TJTS2and(CROSS(AVX,1)AND(V1 V2)),k2*0.99, 大盘虽然走势趋强,但量能还显不足,如果前期经过一轮下跌, ),ALIGN2,color0000FF; DRAWTEXT(TJTS2and(CROSS(AVX,1)AND(V1 V2)),k2*0.98, 可以考虑短线进场,仓位在1/2左右,一旦量能放大可以加仓买入。 ),ALIGN2,color0000FF; DRAWTEXT(TJTS2and(CROSS(1,AVX)AND(V1 =V2)),k2*0.99, 大盘形态走坏,重仓者可以减去大部分仓位。 ),ALIGN2,color00FF00; DRAWTEXT(TJTS2and(CROSS(1,AVX)AND(V1 V2)),k2*0.99, 大盘缩量调整,注意风险,短线清仓观望。 ),ALIGN2,color00FF00; DRAWTEXT(TJTS2and(((AVX =1)AND(ref(AVX,1) 0))AND(V1 =V2)),k2*0.99, 大盘走势良好,量能理想,可以继续持有强势股。 ),ALIGN2,color00FFFF; DRAWTEXT(TJTS2and(((AVX =1)AND(ref(AVX,1) 0))AND(V1 V2)),k2*0.99, 大盘形态良好,但量能稍显不足,随时准备减仓。 ),ALIGN2,color00FFFF; DRAWTEXT(TJTS2and(((AVX 1)AND(ref(AVX,1) 0))AND(V1 =V2)),k2*0.99, 大盘趋势不明,注意成交量变化,目前不适宜进场。 ),ALIGN2; DRAWTEXT(TJTS2and(((AVX 1)AND(ref(AVX,1) 0))AND(V1 V2)),k2*0.99, 大盘趋势向下,量能萎缩,不适合进场。 ),ALIGN2;[源码注释]通达信公式动态公式解读AMV0赋值:成交量(手)*(开盘价+收盘价+最高价+最低价)/4输出势:AMV0的21日指数移动平均/成交量(手)的21日指数移动平均输出压:6*2日内势的最高值-5*势输出托:2*势-压选股公式:AMV0赋值:成交量(手)*(开盘价+收盘价+最高价+最低价)/4势赋值:AMV0的21日指数移动平均/成交量(手)的21日指数移动平均压赋值:6*2日内势的最高值-5*势托赋值:2*势-压输出XG:1日前的压 托 AND 托=压推荐阅读:支撑线和压力线指标公式 SAT:=IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100 100,100,(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100); AA10:MA(CLOSE,8),COLOR0000FF;AA12:MA(CLOSE,12),COLOR0000FF;BB10:=((ATAN((AA10-REF(AA10,1)))*3.1416)*10); BB12:=((ATAN((AA12-REF(AA12,1)))*3.1416)*10);MA13:=MA(CLOSE,13); STICKLINE((((AA12 =AA10)AND(BB12 =1))AND(BB10 =1)),AA10,AA12,4,0),COLOR0080FF; STICKLINE((((AA12 =AA10)AND(BB10 =1))AND(BB10 =1)),AA10,AA12,4,0),COLOR00FF00; 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 1ANDEMA(X1,13) REF(EMA(X1,8),1),10), EMA8, ∠45上升 ),COLORWHITE;压力:MA(REF(HHV(C,30),1),2),COLOR9DFFFF; 支撑:MA(REF(LLV(C,30),1),2),COLORABFF46;AA1:=AMOUNT/V;BB1:=L AA1*0.9; CC1:=(C-REF(C,1))/REF(C,1)*100 1.2; DD1:=L MA(C,5)*0.921;EE1:=V MA(V,5)*1.5; FF1:=BB1ANDCC1ANDDD1ANDEE1;DRAWTEXT(FF1,(LOW*0.99), 老鼠仓 ),COLOR4080FF; A51:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1); 黑马线:=EMA(A51,5);A54:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100; 趋势线:=(MA(3*SMA(A54,6,1)-2*SMA(SMA(A54,5,1),5,1),2)); DRAWTEXT(CROSS(趋势线,0)AND黑马线 40,(HIGH*0.97), ▲大黑马 ),COLORYELLOW; 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),(LOW*0.99), 底背离 ),COLORA6E500; DRAWTEXT(CROSS(88,RSI),(HIGH*1.02), 顶背离 ),COLOR1880FF; VAR2:=LLV(LOW,27);VAR3:=HHV(HIGH,34);VAR4:=EMA((CLOSE-VAR2)/(VAR3-VAR2)*4,4)*25; 注意买:=IF((VAR4 10),80,100);RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100; K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;超跌:=IF(J 0,10,0);BDDD:=LLV(J,2)=LLV(J,8); 买入:=IF(CROSS(J,REF(J+0.01,1))ANDBDDDANDJ 20,30,0); DRAWTEXT(买入AND注意买=100AND超跌=0,LOW, 短线 ),COLOR8000FF; MTM:=C-REF(C,1);DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6); 买:=IF(LLV(DX,2)=LLV(DX,7)ANDCOUNT(DX 0,2)ANDCROSS(DX,MA(DX,2)),1,0); DA1:=IF(130 TOTALBARSCOUNT,TOTALBARSCOUNT,130); DA:=IF(CURRBARSCOUNT DA1,0,DA1); HI:=REFDATE(HHV(H,DA),DATE); LO:=REFDATE(LLV(L,DA),DATE); C1:=IF(CURRBARSCOUNT =DA,C,DRAWNULL); GZ:=EXP(LN(HI/LO)/10); LH1:=SUM(IF(C1 =(HI/GZ),V,0),DA); LH2:=SUM(IF(C1 =(HI/POW(GZ,2))ANDC1 (HI/GZ),V,0),DA); LH3:=SUM(IF(C1 =(HI/POW(GZ,3))ANDC1 (HI/POW(GZ,2)),V,0),DA); LH4:=SUM(IF(C1 =(HI/POW(GZ,4))ANDC1 (HI/POW(GZ,3)),V,0),DA); LH5:=SUM(IF(C1 =(HI/POW(GZ,5))ANDC1 (HI/POW(GZ,4)),V,0),DA); LH6:=SUM(IF(C1 =(HI/POW(GZ,6))ANDC1 (HI/POW(GZ,5)),V,0),DA); LH7:=SUM(IF(C1 =(HI/POW(GZ,7))ANDC1 (HI/POW(GZ,6)),V,0),DA); LH8:=SUM(IF(C1 =(HI/POW(GZ,8))ANDC1 (HI/POW(GZ,7)),V,0),DA); LH9:=SUM(IF(C1 =(LO*GZ)ANDC1 LO*POW(GZ,2),V,0),DA); LH10:=SUM(IF(C1 =LOANDC1 LO*GZ,V,0),DA); L1:=REFDATE(HHV(LH1,DA),DATE),LINETHICK0; L2:=REFDATE(HHV(LH2,DA),DATE),LINETHICK0; L3:=REFDATE(HHV(LH3,DA),DATE),LINETHICK0; L4:=REFDATE(HHV(LH4,DA),DATE); L5:=REFDATE(HHV(LH5,DA),DATE); L6:=REFDATE(HHV(LH6,DA),DATE); L7:=REFDATE(HHV(LH7,DA),DATE); L8:=REFDATE(HHV(LH8,DA),DATE); L9:=REFDATE(HHV(LH9,DA),DATE); L10:=REFDATE(HHV(LH10,DA),DATE); SS:=(L1+L2+L3+L4+L5+L6+L7+L8+L9+L10); STICKLINE(CEILING(DA*L1/SS)*3 =CURRBARSCOUNT,HI*99/100,HI/GZ,9,0)COLOR3C3C3A; STICKLINE(CEILING(DA*L2/SS)*3 =CURRBARSCOUNT,HI/POW(GZ,1)*99/100,HI/POW(GZ,2),9,0)COLOR3C3C3A; STICKLINE(CEILING(DA*L3/SS)*3 =CURRBARSCOUNT,HI/POW(GZ,2)*99/100,HI/POW(GZ,3),9,0)COLOR3C3C3A; STICKLINE(CEILING(DA*L4/SS)*3 =CURRBARSCOUNT,HI/POW(GZ,3)*99/100,HI/POW(GZ,4),9,0)COLOR3C3C3A; STICKLINE(CEILING(DA*L5/SS)*3 =CURRBARSCOUNT,HI/POW(GZ,4)*99/100,HI/POW(GZ,5),9,0)COLOR3C3C3A; STICKLINE(CEILING(DA*L6/SS)*3 =CURRBARSCOUNT,HI/POW(GZ,5)*99/100,HI/POW(GZ,6),9,0)COLOR3C3C3A; STICKLINE(CEILING(DA*L7/SS)*3 =CURRBARSCOUNT,HI/POW(GZ,6)*99/100,HI/POW(GZ,7),9,0)COLOR3C3C3A; STICKLINE(CEILING(DA*L8/SS)*3 =CURRBARSCOUNT,LO*POW(GZ,2),LO*POW(GZ,3)*99/100,9,0)COLOR3C3C3A; STICKLINE(CEILING(DA*L9/SS)*3 =CURRBARSCOUNT,LO*POW(GZ,1),LO*POW(GZ,2)*99/100,9,0)COLOR3C3C3A; STICKLINE(CEILING(DA*L10/SS)*3 =CURRBARSCOUNT,LO,LO*POW(GZ,1)*99/100,9,0)COLOR3C3C3A; ZDZ1501:=MAX(L1,MAX(L2,MAX(L3,MAX(L4,MAX(L5,MAX(L6,MAX(L7,MAX(L8,MAX(L9,L10))))))))); STICKLINE(CEILING(DA*IF(ZDZ1501=L1,L1,IF(ZDZ1501=L2,L2, IF(ZDZ1501=L3,L3,IF(ZDZ1501=L4,L4,IF(ZDZ1501=L5,L5,IF(ZDZ1501=L6,L6,IF(ZDZ1501=L7,L7,IF(ZDZ1501=L8,L8, IF(ZDZ1501=L9,L9,IF(ZDZ1501=L10,L10,DRAWNULL))))))))))/SS)*3 =CURRBARSCOUNT, IF(ZDZ1501=L1,HI*99/100,IF(ZDZ1501=L2,HI/POW(GZ,1)*99/100, IF(ZDZ1501=L3,HI/POW(GZ,2)*99/100,IF(ZDZ1501=L4,HI/POW(GZ,3)*99/100, IF(ZDZ1501=L5,HI/POW(GZ,4)*99/100,IF(ZDZ1501=L6,HI/POW(GZ,5)*99/100,IF(ZDZ1501=L7,HI/POW(GZ,6)*99/100,IF(ZDZ1501=L8,LO*POW(GZ,2), IF(ZDZ1501=L9,LO*POW(GZ,1),IF(ZDZ1501=L10,L10,DRAWNULL)))))))))), IF(ZDZ1501=L1,HI/GZ,IF(ZDZ1501=L2,HI/POW(GZ,2)*99/100, IF(ZDZ1501=L3,HI/POW(GZ,3)*99/100,IF(ZDZ1501=L4,HI/POW(GZ,4)*99/100, IF(ZDZ1501=L5,HI/POW(GZ,5)*99/100,IF(ZDZ1501=L6,HI/POW(GZ,6)*99/100,IF(ZDZ1501=L7,HI/POW(GZ,7)*99/100,IF(ZDZ1501=L8,LO*POW(GZ,3)*99/100, IF(ZDZ1501=L9,LO*POW(GZ,2)*99/100,IF(ZDZ1501=L10,LO*POW(GZ,1)*99/100,DRAWNULL)))))))))), 9,0)COLOR666666; DRAWKLINE(H,O,L,C); HB:=COST(99.99); LB:=COST(0.01); B3:=(HB-LB)/50; B31:=HB-B3; B32:=HB-2*B3; B33:=HB-3*B3; B34:=HB-4*B3; B35:=HB-5*B3; B36:=HB-6*B3; B37:=HB-7*B3; B38:=HB-8*B3; B39:=HB-9*B3; B310:=HB-10*B3; B311:=HB-11*B3; B312:=HB-12*B3; B313:=HB-13*B3; B314:=HB-14*B3; B315:=HB-15*B3; B316:=HB-16*B3; B317:=HB-17*B3; B318:=HB-18*B3; B319:=HB-19*B3; B320:=HB-20*B3; B321:=HB-21*B3; B322:=HB-22*B3; B323:=HB-23*B3; B324:=HB-24*B3; B325:=HB-25*B3; B326:=HB-26*B3; B327:=HB-27*B3; B328:=HB-28*B3; B329:=HB-29*B3; B330:=HB-30*B3; B331:=HB-31*B3; B332:=HB-32*B3; B333:=HB-33*B3; B334:=HB-34*B3; B335:=HB-35*B3; B336:=HB-36*B3; B337:=HB-37*B3; B338:=HB-38*B3; B339:=HB-39*B3; B340:=HB-40*B3; B341:=HB-41*B3; B342:=HB-42*B3; B343:=HB-43*B3; B344:=HB-44*B3; B345:=HB-45*B3; B346:=HB-46*B3; B347:=HB-47*B3; B348:=HB-48*B3; B349:=HB-49*B3; B350:=HB-50*B3; AMY1:=WINNER(HB)*100-WINNER(B31)*100; AMY2:=WINNER(B31)*100-WINNER(B32)*100; AMY3:=WINNER(B32)*100-WINNER(B33)*100; AMY4:=WINNER(B33)*100-WINNER(B34)*100; AMY5:=WINNER(B34)*100-WINNER(B35)*100; AMY6:=WINNER(B35)*100-WINNER(B36)*100; AMY7:=WINNER(B36)*100-WINNER(B37)*100; AMY8:=WINNER(B37)*100-WINNER(B38)*100; AMY9:=WINNER(B38)*100-WINNER(B39)*100; AMY10:=WINNER(B39)*100-WINNER(B310)*100; AMY11:=WINNER(B310)*100-WINNER(B311)*100; AMY12:=WINNER(B311)*100-WINNER(B312)*100; AMY13:=WINNER(B312)*100-WINNER(B313)*100; AMY14:=WINNER(B313)*100-WINNER(B314)*100; AMY15:=WINNER(B314)*100-WINNER(B315)*100; AMY16:=WINNER(B315)*100-WINNER(B316)*100; AMY17:=WINNER(B316)*100-WINNER(B317)*100; AMY18:=WINNER(B317)*100-WINNER(B318)*100; AMY19:=WINNER(B318)*100-WINNER(B319)*100; AMY20:=WINNER(B319)*100-WINNER(B320)*100; AMY21:=WINNER(B320)*100-WINNER(B321)*100; AMY22:=WINNER(B321)*100-WINNER(B322)*100; AMY23:=WINNER(B322)*100-WINNER(B323)*100; AMY24:=WINNER(B323)*100-WINNER(B324)*100; AMY25:=WINNER(B324)*100-WINNER(B325)*100; AMY26:=WINNER(B325)*100-WINNER(B326)*100; AMY27:=WINNER(B326)*100-WINNER(B327)*100; AMY28:=WINNER(B327)*100-WINNER(B328)*100; AMY29:=WINNER(B328)*100-WINNER(B329)*100; AMY30:=WINNER(B329)*100-WINNER(B330)*100; AMY31:=WINNER(B330)*100-WINNER(B331)*100; AMY32:=WINNER(B331)*100-WINNER(B332)*100; AMY33:=WINNER(B332)*100-WINNER(B333)*100; AMY34:=WINNER(B333)*100-WINNER(B334)*100; AMY35:=WINNER(B334)*100-WINNER(B335)*100; AMY36:=WINNER(B335)*100-WINNER(B336)*100; AMY37:=WINNER(B336)*100-WINNER(B337)*100; AMY38:=WINNER(B337)*100-WINNER(B338)*100; AMY39:=WINNER(B338)*100-WINNER(B339)*100; AMY40:=WINNER(B339)*100-WINNER(B340)*100; AMY41:=WINNER(B340)*100-WINNER(B341)*100; AMY42:=WINNER(B341)*100-WINNER(B342)*100; AMY43:=WINNER(B342)*100-WINNER(B343)*100; AMY44:=WINNER(B343)*100-WINNER(B344)*100; AMY45:=WINNER(B344)*100-WINNER(B345)*100; AMY46:=WINNER(B345)*100-WINNER(B346)*100; AMY47:=WINNER(B346)*100-WINNER(B347)*100; AMY48:=WINNER(B347)*100-WINNER(B348)*100; AMY49:=WINNER(B348)*100-WINNER(B349)*100; AMY50:=WINNER(B349)*100-WINNER(LB)*100; DJG:=MAX(AMY1,MAX(AMY2,MAX(AMY3,MAX(AMY4,MAX(AMY5,MAX(AMY6,MAX(AMY7,MAX(AMY8,MAX(AMY9,MAX(AMY10, MAX(AMY11,MAX(AMY12,MAX(AMY13,MAX(AMY14,MAX(AMY15,AMY16))))))))))))))); XJG:=MAX(AMY17,MAX(AMY18,MAX(AMY19,MAX(AMY20, MAX(AMY21,MAX(AMY22,MAX(AMY23,MAX(AMY24,MAX(AMY25,MAX(AMY26,MAX(AMY27,MAX(AMY28,MAX(AMY29,MAX(AMY30, MAX(AMY31,MAX(AMY32,MAX(AMY33,MAX(AMY34,AMY35)))))))))))))))))); SH:=MAX(AMY36,MAX(AMY37,MAX(AMY38,MAX(AMY39,MAX(AMY40, MAX(AMY41,MAX(AMY42,MAX(AMY43,MAX(AMY44,MAX(AMY45,MAX(AMY46,MAX(AMY47,MAX(AMY48,MAX(AMY49,AMY50)))))))))))))); STICKLINE((AMY1=DJGORAMY2=DJGORAMY3=DJGORAMY4=DJGORAMY5=DJGORAMY6=DJGORAMY7=DJGORAMY8=DJGORAMY9=DJG ORAMY10=DJGORAMY11=DJGORAMY12=DJGORAMY13=DJGORAMY14=DJGORAMY15=DJGORAMY16=DJG)ANDISLASTBAR, IF(AMY1=DJG,B31,IF(AMY2=DJG,B32,IF(AMY3=DJG,B33,IF(AMY4=DJG,B34,IF(AMY5=DJG,B35,IF(AMY6=DJG,B36,IF(AMY7=DJG,B37,IF(AMY8=DJG,B38,IF(AMY9=DJG ,B39,IF(AMY10=DJG,B310,IF(AMY11=DJG,B311,IF(AMY12=DJG,B312,IF(AMY13=DJG,B313,IF(AMY14=DJG,B314,IF(AMY15=DJG,B315,IF(AMY16=DJG,B316,DRAWNULL) ))))))))))))))), IF(AMY1=DJG,B31,IF(AMY2=DJG,B32,IF(AMY3=DJG,B33,IF(AMY4=DJG,B34,IF(AMY5=DJG,B35,IF(AMY6=DJG,B36,IF(AMY7=DJG,B37,IF(AMY8=DJG,B38,IF(AMY9=DJG ,B39,IF(AMY10=DJG,B310,IF(AMY11=DJG,B311,IF(AMY12=DJG,B312,IF(AMY13=DJG,B313,IF(AMY14=DJG,B314,IF(AMY15=DJG,B315,IF(AMY16=DJG,B316,DRAWNULL) ))))))))))))))), DJG*100,-1),COLORYELLOW; STICKLINE((AMY17=XJGORAMY18=XJGORAMY19=XJGORAMY20=XJGORAMY21=XJGORAMY22=XJGORAMY23=XJGORAMY24=XJGORAMY25=XJG ORAMY35=XJGORAMY34=XJGORAMY33=XJGORAMY32=XJGORAMY31=XJGORAMY30=XJGORAMY29=XJGORAMY28=XJGORAMY27=XJGORAMY26=XJG )ANDISLASTBAR, IF(AMY17=XJG,B317,IF(AMY18=XJG,B318,IF(AMY19=XJG,B319,IF(AMY20=XJG,B320,IF(AMY21=XJG,B321,IF(AMY22=XJG,B322,IF(AMY23=XJG,B323,IF(AMY24=XJG,B324,IF(AMY25=XJG ,B325,IF(AMY26=XJG,B326,IF(AMY27=XJG,B327,IF(AMY28=XJG,B328,IF(AMY29=XJG,B329,IF(AMY30=XJG,B330,IF(AMY31=XJG,B331,IF(AMY32=XJG,B332, IF(AMY33=XJG,B333,IF(AMY34=XJG,B334,IF(AMY35=XJG,B335, DRAWNULL))))))))))))))))))), IF(AMY17=XJG,B317,IF(AMY18=XJG,B318,IF(AMY19=XJG,B319,IF(AMY20=XJG,B320,IF(AMY21=XJG,B321,IF(AMY22=XJG,B322,IF(AMY23=XJG,B323,IF(AMY24=XJG,B324,IF(AMY25=XJG ,B325,IF(AMY26=XJG,B326,IF(AMY27=XJG,B327,IF(AMY28=XJG,B328,IF(AMY29=XJG,B329,IF(AMY30=XJG,B330,IF(AMY31=XJG,B331,IF(AMY32=XJG,B332, IF(AMY33=XJG,B333,IF(AMY34=XJG,B334,IF(AMY35=XJG,B335, DRAWNULL))))))))))))))))))), XJG*100,-1),COLORYELLOW; STICKLINE((AMY36=SHORAMY37=SHORAMY38=SHORAMY39=SHORAMY40=SHORAMY41=SHORAMY42=SHORAMY43=SHORAMY44=SHORAMY45=SH ORAMY46=SHORAMY47=SHORAMY48=SHORAMY49=SHORAMY50=SH)ANDISLASTBAR, IF(AMY36=SH,B336,IF(AMY37=SH,B337,IF(AMY38=SH,B338,IF(AMY39=SH,B339,IF(AMY40=SH,B340,IF(AMY41=SH,B341,IF(AMY42=SH,B342,IF(AMY43=SH,B343,IF(AMY44=SH ,B344,IF(AMY45=SH,B345,IF(AMY46=SH,B346,IF(AMY47=SH,B347,IF(AMY48=SH,B348,IF(AMY49=SH,B349,IF(AMY50=SH,B350, DRAWNULL))))))))))))))), IF(AMY36=SH,B336,IF(AMY37=SH,B337,IF(AMY38=SH,B338,IF(AMY39=SH,B339,IF(AMY40=SH,B340,IF(AMY41=SH,B341,IF(AMY42=SH,B342,IF(AMY43=SH,B343,IF(AMY44=SH ,B344,IF(AMY45=SH,B345,IF(AMY46=SH,B346,IF(AMY47=SH,B347,IF(AMY48=SH,B348,IF(AMY49=SH,B349,IF(AMY50=SH,B350, DRAWNULL))))))))))))))), SH*100,-1),COLORYELLOW; DRAWNUMBER(ISLASTBAR, IF(AMY1=DJG,B31,IF(AMY2=DJG,B32,IF(AMY3=DJG,B33,IF(AMY4=DJG,B34,IF(AMY5=DJG,B35,IF(AMY6=DJG,B36,IF(AMY7=DJG,B37,IF(AMY8=DJG,B38,IF(AMY9=DJG ,B39,IF(AMY10=DJG,B310,IF(AMY11=DJG,B311,IF(AMY12=DJG,B312,IF(AMY13=DJG,B313,IF(AMY14=DJG,B314,IF(AMY15=DJG,B315,IF(AMY16=DJG,B316,DRAWNULL) ))))))))))))))), DJG*1); DRAWNUMBER(ISLASTBAR, IF(AMY17=XJG,B317,IF(AMY18=XJG,B318,IF(AMY19=XJG,B319,IF(AMY20=XJG,B320,IF(AMY21=XJG,B321,IF(AMY22=XJG,B322,IF(AMY23=XJG,B323,IF(AMY24=XJG,B324,IF(AMY25=XJG ,B325,IF(AMY26=XJG,B326,IF(AMY27=XJG,B327,IF(AMY28=XJG,B328,IF(AMY29=XJG,B329,IF(AMY30=XJG,B330,IF(AMY31=XJG,B331,IF(AMY32=XJG,B332, IF(AMY33=XJG,B333,IF(AMY34=XJG,B334,IF(AMY35=XJG,B335, DRAWNULL))))))))))))))))))), XJG*1); DRAWNUMBER(ISLASTBAR, IF(AMY36=SH,B336,IF(AMY37=SH,B337,IF(AMY38=SH,B338,IF(AMY39=SH,B339,IF(AMY40=SH,B340,IF(AMY41=SH,B341,IF(AMY42=SH,B342,IF(AMY43=SH,B343,IF(AMY44=SH ,B344,IF(AMY45=SH,B345,IF(AMY46=SH,B346,IF(AMY47=SH,B347,IF(AMY48=SH,B348,IF(AMY49=SH,B349,IF(AMY50=SH,B350, DRAWNULL))))))))))))))), SH*1); input:N(5,1,100); {DRAWGBKLAST(CLOSE 0,STRIP(RGB(95,95,95),RGB(0,0,0),0));} 主筹估算:=EMA(WINNER(c)*70,3); 散筹估算:=EMA((WINNER((c)*1.1)-WINNER((c)*0.9))*70,3); 筹码锁定:=散筹估算-主筹估算; 动态底部:=EMA(IF(L =LLV(l,60),SMA(ABS(L-REF(L,1)),60,1)/SMA(MAX(L-REF(l,1),0),99,1),0)*5,3); 涨:=CROSS(主筹估算,筹码锁定); 强:=CROSS(主筹估算,散筹估算); STICKLINE(涨,O,C,8,0),COLORYELLOW; STICKLINE(涨,O,H,0,0),COLORYELLOW; STICKLINE(涨,L,C,0,0),COLORYELLOW; STICKLINE(强,O,C,8,0),colormagenta; STICKLINE(强,O,H,0,0),colormagenta; STICKLINE(强,L,C,0,0),colormagenta; 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:=(D1ANDnot(D2ANDE1 =E2))ORbarstatus=2ORbarscount(c)=1; L1:=(D2ANDnot(D1ANDE1 E2));H2:=D1ANDnot(D2ANDE1 =E2); X1:=ref(barslast(H1),1)+1;F1:=backset(H1ANDcount(L1,X1) 0,llvbars (if(L1,l,10000),X1)); G1:=F1 ref(F1,1);I1:=backset(G1,2);LD:=I1 ref(I1,1);{过滤后低点} L2:=LDORbarstatus=2ORbarscount(c)=1; X2:=ref(barslast(L2),1)+1;F2:=backset(L2ANDcount(H2,X2) 0,hhvbars (if(H2,h,0),X2)); G2:=F2 ref(F2,1);I2:=backset(G2,2);HD:=I2 ref(I2,1);{过滤后高点} R1:=backset(barstatus=2,barslast(HD)+1);S1:=R1 ref(R1,1);{前一高} T1:=backset(barstatus=2,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);{前四高} 短期压力:drawline(S2,h,S1,h,1),Colorred; 短期支撑:drawline(U2,l,U1,l,1),Colorgreen; 中期压力:drawline(S3,h,S2,h,1),Coloryellow; 中期支撑:drawline(U3,l,U2,l,0),Colorgreen; 长期压力:drawline(S4,h,S3,h,1),COLORwhite; 长期支撑:drawline(U4,l,U3,l,0),Colorgreen; DRAWICON(S1,H*1.01,2); DRAWICON(S2,H*1.01,2); DRAWICON(S3,H*1.01,2); DRAWICON(S4,H*1.01,2); DRAWICON(U1,L*0.99,1); DRAWICON(U2,L*0.99,1); DRAWICON(U3,L*0.99,1); DRAWICON(U4,L*0.99,1); 止损价:=REF(c,1)*0.95; DRAWTEXT(c 0andBARSTATUS=2,h*1.03, 止损价: +NUMTOSTRN(止损价,2)),ALIGN0,colorffffff; HV:=HHV(V,30)=VORV/REF(V,1) =5; FT:=BARSLAST(HV); 量能平台:if(HV,C,ref(C,FT)),COLORwhite,LINETHICK2; drawtext(量能平台 ref(量能平台,1)andc ref(c,1)andnot(c ma(c,13)andc=hhv(c,20)andc/ref(c,1) 1.05),c, --------- +c),coloryellow; drawtext(量能平台 ref(量能平台,1)andc ref(c,1),c, ---------带量阴 +c),colorgreen; {drawtext(量能平台 =ref(量能平台,1)andc ref(c,1),c, ---------- +c),colorgreen;} drawtext(量能平台 ref(量能平台,1)andc ref(c,1),c, ---------缩量涨 +c),colorwhite; drawtext(量能平台 ref(量能平台,1)andc ref(c,1)andc ma(c,13)andc=hhv(c,20)andc/ref(c,1) 1.05,c, ---------带量突破 +c),colorred; ma(c,17);每日公式解答: 股票公式编写要求: MACD月线站上0轴的选股公式。 股票公式编写结果: XG:CROSS(MACD.DIF#MONTH,0);