通达信指标公式源码概况:指标类别: 通达信指标公式授权方式: 免费版指标评级: ★★★★★指标分类: 策略画线方法: 副图一、弘历多空资金副图指标公式 RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; K:=SMA(RSV,3,1); D:=SMA(K,3,1); DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26); DEA:=EMA(DIFF,9); MACD:=2*(DIFF-DEA); 做多:=IF(K DANDMACD 0ANDV 1,2,0),COLORRED; 做空:=IF(K DANDMACD 0ANDV 1,-2,0),COLORGREEN; 强洗:=IF(MACD 0ANDK DANDV 1,1,0),COLORBLUE; 弱升:=IF(MACD 0ANDK DANDV 1,-1,0),COLORYELLOW; STICKLINE(做多,L,H,0.5,0),COLORRED; STICKLINE(做多ANDC =O,C,O,3,1),COLORRED; STICKLINE(做多ANDC O,C,O,3,0),COLORRED; STICKLINE(做空,L,H,0.5,0),COLORGREEN; STICKLINE(做空ANDC =O,C,O,3,1),COLORGREEN; STICKLINE(做空ANDC O,C,O,3,0),COLORGREEN; STICKLINE(强洗,L,H,0.5,0),COLORBLUE; STICKLINE(强洗ANDC =O,C,O,3,1),COLORBLUE; STICKLINE(强洗ANDC O,C,O,3,0),COLORBLUE; STICKLINE(弱升,L,H,0.5,0),COLORYELLOW; STICKLINE(弱升ANDC =O,C,O,3,1),COLORYELLOW; STICKLINE(弱升ANDC O,C,O,3,0),COLORYELLOW; NN:=50;{NN=15,ATRM=2.5} ATRM:=3; MTR:=MAX(MAX((H-L),ABS(REF(C,1)-H)),ABS(REF(C,1)-L)); ATR:=MA(MTR,NN),NODRAW; ZDATR:=C-ATRM*ATR; ⽌损:HHV(ZDATR,NN)DOTLINE,COLORLICYAN; 幅图指标源码: HH:=HHV(HIGH,3); LL:=LLV(LOW,3); HH1:=BARSLAST((HH REF(HH,1))); LL1:=BARSLAST((LL REF(LL,1))); IF((HH1 LL1),LL,HH),LINETHICK2,COLORBB0066; IF((HH1 LL1),HH,LL),LINETHICK2,COLOR1B8800; STICKLINE((HH1 LL1),CLOSE,OPEN,3,0),COLORRED; STICKLINE((HH1 LL1),HIGH,LOW,0,0),COLORRED; STICKLINE((HH1 LL1),CLOSE,OPEN,3,0),COLORFF0000; STICKLINE((HH1 LL1),HIGH,LOW,0,0),COLORFF0000; DRAWTEXT(CROSS(HH1,LL1),HH, 开空 ),COLORFF00FF; DRAWTEXT(CROSS(LL1,HH1),LL, 开多 ),COLORFF00FF; HH4:=HHV(HIGH,13); LL4:=LLV(LOW,13); HH11:=BARSLAST((HH4 REF(HH4,1))); LL11:=BARSLAST((LL4 REF(LL4,1))); DRAWTEXT(CROSS(HH11,LL11),HH4, 开空 )COLORYELLOW; DRAWTEXT(CROSS(LL11,HH11),LL4, 开多 )COLORYELLOW; VAR1D:=EMA(CLOSE,2)-EMA(CLOSE,89); VAR1E:=EMA(VAR1D,30); VAR1F:=2*(VAR1D-VAR1E)*10; VAR20:=POW(VAR1F,3)*0.1+POW(VAR1F,2); VAR25:=IF(YEAR 2058ANDVAR1F 0.015,VAR20,0)/45/4; JJ:=(C*2+H+L)/4; SKK:(EMA(JJ,7)-EMA(JJ,13))*180,COLORRED; SDD:EMA(SKK,2),COLORYELLOW; 多方:(SKK-SDD)*0.000000001,COLORRED,LINETHICK0; 空方:-1*(SKK-SDD)*0.000000001,COLORGREEN,LINETHICK0; RC:=DYNAINFO(3); RC,COLORWHITE; MAV:=(2*C+H+L)/4; SK:(SLOPE(EMA(MAV,2),7)*15+MAV)*0.8*0.0001,COLORRED; SD:EMA(SK,2),COLORGREEN; SJ:2.8*SK-1.8*SD,COLORYELLOW; S2:=SMA(C,3,1); S6:=SMA(C,5,1); DK:2*(S2-S6)*15*4*1.5,COLORSTICK; STICKLINE(SK SDANDDK RCORDK=RC,RC,RC+DK,0.01,0),COLORFF00FF; STICKLINE(DK 0ANDSK SD,RC,RC+DK,0.01,0),COLOR0000FF; STICKLINE(DK 0ANDSK SD,RC,RC+DK,0.01,0),COLORFFFF00; STICKLINE(DK 0AND多方 空方,RC,RC+DK,0.01,0),COLOR00FF00; STICKLINE(CROSS(多方,空方),RC,RC+DK,2,0),COLOR00FFFF; STICKLINE(CROSS(空方,多方),RC,RC+DK,2,0),COLORFF0000; STICKLINE(DK 0AND多方 空方ANDSK SD,RC,RC+DK,0.01,0),COLOR00FF00; VAR2:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100; VAR3:=SMA(SMA(VAR2,3,1),3,1)/28.57; VAR4:=EMA(VAR3,5); 操盘:=3*VAR3-2*VAR4; A1:=CROSS(操盘,VAR3)ANDVAR3 2.1ANDC STICKLINE(A1,8,0,4,0),COLOR0000FF; AA:=(MA(C,1)+MA(C,3)+MA(C,5)+MA(C,7)+MA(C,9))/5; BB:=(MA(C,2)+MA(C,4)+MA(C,6)+MA(C,8)+MA(C,10))/5; CC:=EMA(AA,2); DD:=EMA(BB,5); TJ0:=CROSS(CC,DD); 上:=EMA(C,3); 中:=EMA(C,5); 下:=EMA(中,5); TJ1:=CROSS(上,中); TJ2:=上 REF(上,1); X1:=(C+L+H)/3; BB5:=ATAN(EMA(X1,5)-REF(EMA(X1,5),1))*3.1416*10; EMA3:=EMA(C,3); TJ3:=BB5 1ANDEMA(X1,5) REF(EMA(X1,3),1); STICKLINE(TJ1ANDTJ2ANDTJ0ANDTJ3,0,8,8,0)COLOR00FFFF; DRAWICON(TJ1ANDTJ2ANDTJ0ANDTJ3,0,15); DRAWBAND(SKK,RGB(200,50,55),SDD,RGB(50,100,10)); 持:IF(SKK =SDD,SKK,DRAWNULL),COLORRED; 观:IF(SDD =SKK,SDD,DRAWNULL),COLORFF9900; 股:IF(SKK =SDD,SDD,DRAWNULL),COLOR00FFFF; 望:IF(SDD =SKK,SKK,DRAWNULL),COLOR00FF00; FT1:=FILTER(CROSS(SKK,SDD),5)ANDSKK 0ANDSKK REF(SKK,1)AND REF(SKK,1) REF(SKK,2); DRAWICON(FT1,SKK,26); FT2:=FILTER(CROSS(SKK,0)AND多方,8); DRAWICON(FT2,0,23); DRAWICON(FILTER(CROSS(SDD,SKK)ANDSDD 10,3),SDD,19);二、弘历多空资金指标公式源码 N:=5; AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN)); 买量:=IF(CLOSE OPEN,AA*(HIGH-LOW),IF(CLOSE OPEN,AA*((HIGH-OPEN)+(CLOSE-LO W)),VOL/2)),LINETHICK0,COLORRED; 卖量:=IF(CLOSE OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE OPEN,0-AA*(HIGH -LOW),0-VOL/2)),LINETHICK0,COLORCYAN; WJ:=(H+L+C)/3; V1:=IF(H=L,1,H-MAX(O,C)); V2:=IF(H=L,1,MAX(C,O)-WJ); V3:=IF(H=L,1,MIN(O,C)-L); V4:=IF(H=L,1,WJ-MIN(C,O)); V5:=AMOUNT/IF(H=L,4,H-L)/10000; 市值:=FINANCE(40)/10000,NODRAW; V6:=(V1*V5); V7:=(V2*V5); V8:=(V3*V5); V9:=(V4*V5); 总万:=V9+V8+V6+V7,NODRAW; 流入:=(V9+V8),NODRAW; 流出:=-(V6+V7),NODRAW; 净流:流入+流出,NODRAW; 大单金额:IF(C=O,净流*0.6,(买量+卖量)/400*DYNAINFO(7)),NODRAW; 流入率:大单金额/流入,NODRAW; 率5:SUM(流入率,5),NODRAW; 率10:SUM(流入率,10),NODRAW; 散户:(净流-大单金额),NODRAW; 主力3日:SUM(大单金额,3),NODRAW; 主力5日:SUM(大单金额,N),NODRAW; 主力10日:SUM(大单金额,10),NODRAW; 主力20日:SUM(大单金额,20),NODRAW; 总比:大单金额/FINANCE(40)*100000,NODRAW; 总比3日:主力3日/FINANCE(40)*100000,NODRAW; 总比5日:主力5日/FINANCE(40)*100000,NODRAW; STICKLINE(大单金额 0,0,大单金额,3,0),COLORFF6600; STICKLINE(大单金额 0,0,大单金额,2,0),COLORFF9900; STICKLINE(大单金额 0,0,大单金额,1.5,0),COLORFFCC00; STICKLINE(大单金额 0,0,大单金额,0.5,0),COLORCYAN; STICKLINE(大单金额 0,0,大单金额,3,0),COLOR000099; STICKLINE(大单金额 0,0,大单金额,2,0),COLOR0000CC; STICKLINE(大单金额 0,0,大单金额,1.5,0),COLOR0000FF; STICKLINE(大单金额 0,0,大单金额,0.5,0),COLORCC66FF; VAR1:=(CLOSE+HIGH+LOW+OPEN)/4; VAR2:=SUMBARS(VOL,CAPITAL); VAR3:=HHV(VAR1,VAR2); VAR4:=LLV(VAR1,VAR2); VAR5:=(2*VAR1-VAR4-REF(VAR4,1))/(VAR3-VAR4); VAR6:=(VAR1-VAR4)/(VAR3-VAR4); VAR7:=IF(VAR1 =VAR4,VAR5*60,VAR6*60); VAR8:=600*(EMA(CLOSE,3)-EMA(LOW,30))/EMA(LOW,30); VAR9:=EMA(VAR8,7); VARA:=(WINNER(120*CLOSE/100)-WINNER(100*CLOSE/100))*100; VARB:=(-100)*(WINNER(120*CLOSE/100)-WINNER(100*CLOSE/100))+5; 波段买入:IF(VARA+VARB 7ANDCROSS(VAR8,VAR9)ANDVAR9 -18AND VAR9 VARB,60,50),COLORYELLOW,; DRAWICON(波段买入=60,70,1),COLORRED; VARC:=HHV(HIGH,9)-LLV(LOW,9); VARD:=HHV(HIGH,9)-CLOSE; VARE:=CLOSE-LLV(LOW,9); VARF:=VARD/VARC*100-70; VAR10:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100; VAR11:=(2*CLOSE+HIGH+LOW)/4; VAR12:=SMA(VARE/VARC*100,3,1); VAR13:=LLV(LOW,34); VAR14:=SMA(VAR12,3,1)-SMA(VARF,9,1); VAR15:=IF(VAR14 100,VAR14-100,0); VAR16:=HHV(HIGH,34); VAR17:EMA((VAR11-VAR13)/(VAR16-VAR13)*100,8); 巫修全制:VAR17,COLORYELLOW; VAR18:=EMA(VAR17,5); STICKLINE(VAR17 0ANDVAR17-VAR18 =0,79,80,6,0),COLORRED; STICKLINE(VAR17 0ANDVAR17-VAR18 0,79,80,6,1),COLOR00FF00; STICKLINE(VAR17 0ANDVAR17-VAR18 =0,19,20,6,0),COLORRED,; STICKLINE(VAR17 0ANDVAR17-VAR18 0,19,20,6,1),COLOR00FF00; STICKLINE(VAR17-VAR18 0,VAR17,VAR18,8,1),COLORRED; STICKLINE(VAR17-VAR18 0,VAR17,VAR18,8,1),COLOR00FF00;[源码注释]通达信公式动态公式解读LC赋值:1日前的收盘价RSI1赋值:收盘价-LC和0的较大值的2日[1日权重]移动平均/收盘价-LC的绝对值的2日[1日权重]移动平均*100,画红色,线宽为2RSI1C赋值:如果RSI1上穿3ORCROSS(RSI1,6)ORCROSS(RSI1,15)ORCROSS(RSI1,20)ORCROSS(RSI1,25)ORCROSS(RSI1,28)ORCROSS(RSI1,32)ORCROSS(RSI1,35)ORCROSS(RSI1,40)ORCROSS(RSI1,45)ORC,返回OSS(RSI1,50)ORCROSS(RSI1,55)ORCROSS(RSI1,60)ORCROSS(RSI1,65),否则返回85RSI1Z赋值:如果0日前的RSI1-1日前的RSI1 5ANDRSI1 20,返回65,否则返回0WR1赋值:100*(10日内最高价的最高值-收盘价)/(10日内最高价的最高值-10日内最低价的最低值)WR2赋值:100*(6日内最高价的最高值-收盘价)/(6日内最高价的最高值-6日内最低价的最低值)画绿色输出XG:RSI1 95.5 AND RSI1Z=65 AND WR2=0推荐阅读:弘历多空王指标公式 {六彩神龙} {input:变量00(5,1,30),变量01(30,1,100);} A02:=(WINNER((CLOSE*1.100))*100.000); A03:=(WINNER((CLOSE*0.9))*100.000); A04:=MA(A03,变量00); STICKLINE(1.000,0,A04,1.000,0),colorred; 获利:MA(A03,变量00),colorred; A06:=(100.000-MA(A02,变量00)); STICKLINE(1.000,100.000,MA(A02,变量00),1.000,0),colorgr een; 套牢:(100.000-MA(A02,变量00)),colorgreen; A08:=(MA(A02,变量00)-MA(A03,变量00)); STICKLINE(1.000,A04,MA(A02,变量00),1.000,0),colorblue; 浮动:(MA(A02,变量00)-MA(A03,变量00)),coloryellow; A0A:=(((((HHV(A04,15.000)-A03)/A03)*100.000) 变量 01)and(HHV(A04,15.000) 50.000)); STICKLINE(A0A,(0-2.000),2.000,10.000,0); STICKLINE(NOT(A0A),(0-2.000),2.000,10.000,0),colorblue; {弘历进出} AC:=CLOSE; AH:=HIGH; AL:=LOW; AO:=OPEN; STICKLINE(AC =AO,AH,AC,1,0),colorFF8800; STICKLINE(AC =AO,AH,AC,0,0),colorFFFF33; STICKLINE(AC =AO,AO,AL,1,0),colorFF8800; STICKLINE(AC =AO,AO,AL,0,0),colorFFFF33; STICKLINE(AC =AO,AC,AO,8,0),colorFF8800; STICKLINE(AC =AO,AC,AO,7,0),colorFF9900; STICKLINE(AC =AO,AC,AO,6,0),colorFFAA11; STICKLINE(AC =AO,AC,AO,5,0),colorFFBB11; STICKLINE(AC =AO,AC,AO,4,0),colorFFCC22; STICKLINE(AC =AO,AC,AO,3,0),colorFFDD22; STICKLINE(AC =AO,AC,AO,2,0),colorFFEE33; STICKLINE(AC =AO,AC,AO,1,0),colorFFFF33; STICKLINE(AC =AO,AH,AC,1,0),colorFF; STICKLINE(AC =AO,AH,AC,0,0),colorCC; STICKLINE(AC =AO,AO,AL,1,0),colorFF; STICKLINE(AC =AO,AO,AL,0,0),colorCC; STICKLINE(AC AO,AC,AO,8,0),colorAA; STICKLINE(AC AO,AC,AO,7,0),color11BB; STICKLINE(AC AO,AC,AO,6,0),color22CC; STICKLINE(AC AO,AC,AO,5,0),color33DD; STICKLINE(AC AO,AC,AO,4,0),color44EE; STICKLINE(AC AO,AC,AO,3,0),color55FF; STICKLINE(AC AO,AC,AO,2,0),color66FF; STICKLINE(AC AO,AC,AO,1,0),color77FF; 快线:EMA((CLOSE+LOW)/2,8); 均衡:EMA(EMA((CLOSE+LOW)/2,20),8); STICKLINE(快线 均衡,快线,均衡,0.1,0),LINETHICK0,colorFF; DRAWTEXT(CROSS(快线,均衡),HIGH*1.03, 加仑 ),colorFF; STICKLINE(快线 均衡,快线,均衡,0.1,0),LINETHICK0,colorFF00; DRAWTEXT(CROSS(均衡,快线),LOW*0.98, 减仑 ),colorFF00; 强弱:EMA(EMA((LOW+CLOSE+HIGH)/3,25),25),LINETHICK2,c olor8800; 弘历彩虹 EMA(CLOSE,6),colorFF; EMA(CLOSE,12),colorFF; EMA(CLOSE,18),colorFF; EMA(CLOSE,24),colorFF00; EMA(CLOSE,30),colorFFFF; EMA(CLOSE,36),colorFFFF; EMA(CLOSE,42),colorFFFF; EMA(CLOSE,48),colorFFFF; EMA(CLOSE,100),colorFF0000; EMA(CLOSE,112),colorFF0000; EMA(CLOSE,124),colorFF0000; EMA(CLOSE,138),colorFF0000; EMA(CLOSE,204),colorFFFFFF; EMA(CLOSE,216),colorFFFFFF; EMA(CLOSE,228),colorFFFFFF; EMA(CLOSE,260),colorFFFFFF; 弘历彩虹 八大天王之背离王 AAA:=CLOSE*9.81987-14.18013*REF(CLOSE,1)-1.68013*REF (CLOSE,2)-1.3468*REF(CLOSE,3)-1.0968*REF(CLOSE,4)-0.8968*RE F(CLOSE,5)-0.73013*REF(CLOSE,6)-0.58728*REF(CLOSE,7)-0.4622 8*REF(CLOSE,8)-0.35117*REF(CLOSE,9)-0.25117*REF(CLOSE,10)- 0.16026*REF(CLOSE,11)-0.07692*REF(CLOSE,12); BBB:=CLOSE*29.88179-36.11821*REF(CLOSE,1)-2.61821*REF (CLOSE,2)-2.28488*REF(CLOSE,3)-2.03488*REF(CLOSE,4)-1.83488 *REF(CLOSE,5)-1.66821*REF(CLOSE,6)-1.52535*REF(CLOSE,7)-1.4 0035*REF(CLOSE,8)-1.28924*REF(CLOSE,9)-1.18924*REF(CLOSE,1 0)-1.09833*REF(CLOSE,11)-1.015*REF(CLOSE,12)-0.93808*REF(CL OSE,13)-0.86665*REF(CLOSE,14)-0.79998*REF(CLOSE,15)-0.7374 8*REF(CLOSE,16)-0.67866*REF(CLOSE,17)-0.6231*REF(CLOSE,18) -0.57047*REF(CLOSE,19)-0.52047*REF(CLOSE,20)-0.47285*REF(C LOSE,21)-0.4274*REF(CLOSE,22)-0.38392*REF(CLOSE,23)-0.3422 5*REF(CLOSE,24)-0.30225*REF(CLOSE,25)-0.26379*REF(CLOSE,2 6)-0.22675*REF(CLOSE,27)-0.19104*REF(CLOSE,28)-0.15656*REF (CLOSE,29)-0.12322*REF(CLOSE,30)-0.09096*REF(CLOSE,31)-0.05 971*REF(CLOSE,32)-0.02941*REF(CLOSE,33); 高:=(3-BBB/AAA)*100; 上:=HHV(高,2); 收:=MA(高,3)-STD(高,3); 开:=MA(高,5)-STD(高,4); 低:=MA(高,5)-STD(高,4); MID1:=MA(收,26); DRAWTEXT(上=高ANDMID1 REF(MID1,1)ANDISLASTBAR =1,MID1, ←变红走强↑ ),colorFFFF; DRAWTEXT(上 高ANDMID1 DRAWTEXT(MID1 REF(MID1,1)AND上 高ANDISLASTBA R=1,MID1, ←强势调整↓ ),colorFF00FF; DRAWTEXT(MID1 UPPER:=MID1+2*STD(高,26); LOWER:=MID1-2*STD(低,26); FILLRGN(CLOSE 0,UPPER,LOWER),color333311; MID:=MID1; STICKLINE(收 =开,高,低,1,0),colorFF00FF; STICKLINE(收 =开,高,低,0,0),colorFFBBFF; STICKLINE(收 =开,收,开,8,0),colorFF00FF; STICKLINE(收 =开,收,开,7,0),colorFF22FF; STICKLINE(收 =开,收,开,6,0),colorFF44FF; STICKLINE(收 =开,收,开,5,0),colorFF66FF; STICKLINE(收 =开,收,开,4,0),colorFF88FF; STICKLINE(收 =开,收,开,3,0),colorFF99FF; STICKLINE(收 =开,收,开,2,0),colorFFAAFF; STICKLINE(收 =开,收,开,1,0),colorFFBBFF; STICKLINE(收 开,高,低,1,0),color8800; STICKLINE(收 开,高,低,0,0),colorFF00; STICKLINE(收 开,收,开,8,0),color8800; STICKLINE(收 开,收,开,7,0),color9900; STICKLINE(收 开,收,开,6,0),colorAA00; STICKLINE(收 开,收,开,5,0),colorBB00; STICKLINE(收 开,收,开,4,0),colorCC00; STICKLINE(收 开,收,开,3,0),colorDD00; STICKLINE(收 开,收,开,2,0),colorEE00; STICKLINE(收 开,收,开,1,0),colorFF00; STICKLINE(上=高,高,低,1,0),colorFF; STICKLINE(上=高,高,低,0,0),colorEEFF; STICKLINE(上=高,收,开,8,0),colorFF; STICKLINE(上=高,收,开,7,0),color22FF; STICKLINE(上=高,收,开,6,0),color44FF; STICKLINE(上=高,收,开,5,0),color66FF; STICKLINE(上=高,收,开,4,0),color88FF; STICKLINE(上=高,收,开,3,0),colorAAFF; STICKLINE(上=高,收,开,2,0),colorCCFF; STICKLINE(上=高,收,开,1,0),colorEEFF; 底:=CROSS(低,LOWER); 追:=CROSS(低,MID); 赌:=CROSS(低,UPPER); DRAWICON(CROSS(低,LOWER),低+5, 10 DRAWICON(CROSS(低,MID),MID+25, 11 DRAWICON(CROSS(低,UPPER),UPPER+40, 12 0; 50; 箱体王 STICKLINE(CLOSE OPEN,CLOSE,OPEN,8,0),colorAA; STICKLINE(CLOSE STICKLINE(CLOSE OPEN,CLOSE,OPEN,5,0),colorCC; STICKLINE(CLOSE OPEN,CLOSE,OPEN,3,0),colorDD; STICKLINE(CLOSE OPEN,HIGH,LOW,0,0),colorFF; STICKLINE(CLOSE STICKLINE(CLOSE STICKLINE(CLOSE FH:=HIGH; FL:=LOW; SELL:=0*FH; BUY:=SELL; SIGNAL:=SELL; BOXH:SELL,LINETHICK0; BOXL:SELL,LINETHICK0; VARIABLE:HC=0,LC=0,BT=FH[1],BB=FH[1]; FORI=1TODATACOUNTDOBEGIN IFHC 1THENBEGIN IFLC 2ANDBT =FH[I]THENBEGIN BUY[I]:=1; FORJ=I-1DOWNTOI-HCDOBEGIN BOXH[J]:=FH[I-HC],LINETHICK0; BOXL[J]:=FL[I-LC],LINETHICK0; END; HC:=0; LC:=0; END; IFBT FH[I]THENBEGIN IFLC 2THENBEGIN IFBB =FL[I]THENBEGIN SELL[I]:=1; FORJ=I-1DOWNTOI-HCDOBEGIN BOXH[J]:=FH[I-HC],LINETHICK0; BOXL[J]:=FL[I-LC],LINETHICK0; END; HC:=-1; LC:=0; END;ELSEBEGIN BOXH[I]:=FH[I-HC],LINETHICK0; BOXL[I]:=FL[I-LC],LINETHICK0; END; END; HC:=HC+1; IFLC 1THENBEGIN IFBB LC:=LC+1; IFLC=3THENBEGIN SIGNAL[I-HC+1]:=1; FORJ=IDOWNTOI-HC+1DOBEGIN BOXH[J]:=FH[I-HC+1],LINETHICK0; BOXL[J]:=FL[I-LC+1],LINETHICK0; END; END; END;ELSE LC:=0; END;ELSE IFLC=1THENBEGIN IFBB LC:=LC+1; END;ELSE LC:=0; END; IFLC=0ANDHC 1THENBEGIN BB:=FL[I]; LC:=LC+1; END; END;ELSEBEGIN HC:=0; LC:=0; END; END;ELSE IFHC=1THENBEGIN IFBT FH[I]THEN HC:=HC+1;ELSEBEGIN HC:=0; LC:=0; END; END; IFHC=0THENBEGIN BT:=FH[I]; HC:=HC+1; END; END; PARTLINE(BOXHANDBOXH=REF(BOXH,1),BOXH),LINEDOT, colorFFFF; PARTLINE(BOXLANDBOXL=REF(BOXL,1),BOXL),LINEDOT,col orFFFF; STICKLINE((SIGNALORREFX(BUYORSELL,1))ANDBOXH,B OXH,BOXL,0.1,0),LINEDOT,colorFFFF; DRAWICON(BUY,LOW*0.98,4); DRAWICON(SELL,HIGH*1.02,5); A1:=BOXHANDBOXH=REF(BOXH,1); A2:=REFX(REF(A1=0,1)ANDA1=1,1); A3:=REFX(REF(A1=1,1)ANDA1=0,1); DRAWLINE(A2,BOXL,A3,BOXH,0),colorFF9900; DRAWLINE(A2,BOXH,A3,BOXL,0),colorFF00; PARTLINE(BOXHANDBOXH=REF(BOXH,1),(BOXH-BOXL)/2+ BOXL),colorFF9900; STICKLINE((SIGNALORREFX(BUYORSELL,1))ANDBOXH,B OXH,BOXL,0.1,0),LINEDOT,colorFFFF; ZZ:=BACKSET(REFX(BUYORSELL,1),BARSLAST(SIGNAL)/2); ZX:=REFX(REF(ZZ=0,1)ANDZZ=1,1); DRAWLINE(SIGNAL,BOXH,ZX,BOXL,0),LINEDOT,colorFF00; DRAWLINE(SIGNAL,BOXH,REFX(BUYORSELL,1),(BOXH-BOX L)/2+BOXL,0),LINEDOT,colorFF00; DRAWLINE(SIGNAL,BOXL,ZX,BOXH,0),LINEDOT,colorFF9900; DRAWLINE(SIGNAL,BOXL,REFX(BUYORSELL,1),(BOXH-BOX L)/2+BOXL,0),LINEDOT,colorFF9900; DRAWLINE(SIGNAL,BOXH,ISLASTBARANDBOXH BOXL,BO XL,0),colorFF00; DRAWLINE(SIGNAL,BOXH,ISLASTBARANDBOXH BOXL,(B OXH-BOXL)/2+BOXL,0),LINEDOT,colorFF00; DRAWLINE(SIGNAL,BOXL,ISLASTBARANDBOXH BOXL,BO XH,0),colorFF9900; DRAWLINE(SIGNAL,BOXL,ISLASTBARANDBOXH BOXL,(BO XH-BOXL)/2+BOXL,0),LINEDOT,colorFF9900; ZA:=BACKSET(ISLASTBARANDBOXH BOXL,BARSLAST(SIG NAL)/2); ZB:=REFX(REF(ZA=0,1)ANDZA=1,1); DRAWLINE(SIGNAL,BOXH,ZB,BOXL,0),LINEDOT,colorFF00; DRAWLINE(SIGNAL,BOXL,ZB,BOXH,0),LINEDOT,colorFF9900; 八大天王之波段王 多空:=OPEN; STICKLINE(CLOSE 多空,HIGH,LOW,0.5,0),colorFF; STICKLINE(CLOSE 多空ANDCLOSE OPEN,OPEN,CLOSE,8, 0),color102088; STICKLINE(CLOSE 多空ANDCLOSE OPEN,OPEN,CLOSE,7, 0),color102099; STICKLINE(CLOSE 多空ANDCLOSE OPEN,OPEN,CLOSE,6, 0),color1020AA; STICKLINE(CLOSE 多空ANDCLOSE OPEN,OPEN,CLOSE,5, 0),color1020BB; STICKLINE(CLOSE 多空ANDCLOSE OPEN,OPEN,CLOSE,4, 0),color1020CC; STICKLINE(CLOSE 多空ANDCLOSE OPEN,OPEN,CLOSE,3, 0),color1020DD; STICKLINE(CLOSE 多空ANDCLOSE OPEN,OPEN,CLOSE,2, 0),color1020EE; STICKLINE(CLOSE 多空ANDCLOSE OPEN,OPEN,CLOSE,1, 0),color1020FF; STICKLINE(CLOSE 多空ANDCLOSE STICKLINE(CLOSE 多空ANDCLOSE STICKLINE(CLOSE 多空ANDCLOSE STICKLINE(CLOSE 多空ANDCLOSE STICKLINE(CLOSE 多空ANDCLOSE STICKLINE(CLOSE 多空ANDCLOSE STICKLINE(CLOSE 多空ANDCLOSE STICKLINE(CLOSE 多空ANDCLOSE STICKLINE(CLOSE 多空,HIGH,LOW,0.5,0),colorFF8800; STICKLINE(CLOSE 多空ANDCLOSE STICKLINE(CLOSE 多空ANDCLOSE STICKLINE(CLOSE 多空ANDCLOSE STICKLINE(CLOSE 多空ANDCLOSE STICKLINE(CLOSE 多空ANDCLOSE STICKLINE(CLOSE 多空ANDCLOSE STICKLINE(CLOSE 多空ANDCLOSE STICKLINE(CLOSE 多空ANDCLOSE STICKLINE(CLOSE 多空ANDCLOSE OPEN,OPEN,OPEN,8,0), colorFF7700; STICKLINE(CLOSE 多空ANDCLOSE OPEN,OPEN,OPEN,7,0), colorFF8800; STICKLINE(CLOSE 多空ANDCLOSE OPEN,OPEN,OPEN,6,0), colorFF9900; STICKLINE(CLOSE 多空ANDCLOSE OPEN,OPEN,OPEN,5,0), colorFFAA00; STICKLINE(CLOSE 多空ANDCLOSE OPEN,OPEN,OPEN,4,0), colorFFBB00; STICKLINE(CLOSE 多空ANDCLOSE OPEN,OPEN,OPEN,3,0), colorFFCC00; STICKLINE(CLOSE 多空ANDCLOSE OPEN,OPEN,OPEN,2,0), colorFFDD00; STICKLINE(CLOSE 多空ANDCLOSE OPEN,OPEN,OPEN,1,0), colorFFEE00; STICKLINE(CLOSE=多空,OPEN,CLOSE,8,0),colorFFFF00; STICKLINE(CLOSE=多空,HIGH,LOW,0.5,0),colorFFFF00; AA:=MA(AMOUNT/VOL/100,VOL/CAPITAL); A1:=EMA((EMA(AA,N)+EMA(AA,N+1)+EMA(AA,N+2))/3,3); A2:=EMA((EMA(AA,N+1)+EMA(AA,N+2)+EMA(AA,N+3))/3, 3); A3:=EMA((EMA(AA,N+2)+EMA(AA,N+3)+EMA(AA,N+4))/3, 3); A4:=EMA((EMA(AA,N+3)+EMA(AA,N+4)+EMA(AA,N+5))/3, 3); A5:=EMA((EMA(AA,N+4)+EMA(AA,N+5)+EMA(AA,N+6))/3, 3); BB:=A1 A15:=AA-(A1-AA*0.997); A16:=AA-(A2-AA*0.997); A17:=AA-(A3-AA*0.997); A18:=AA-(A4-AA*0.997); A19:=AA-(A5-AA*0.997); PARTLINE(A1 A2ANDA1 A3,A1),colorFF00FF; PARTLINE(A1 A2ANDA1 A3,A2),POINTDOT,colorFF00FF; PARTLINE(A1 A2ANDA1 A3,A3),POINTDOT,colorFF00FF; PARTLINE(A1 A2ANDA1 A3,A4),POINTDOT,colorFF00FF; PARTLINE(A1 A2ANDA1 A3,A5),colorFF00FF; PARTLINE(BB,A1),colorFF00; PARTLINE(BB,A2),POINTDOT,colorFF00; PARTLINE(BB,A3),POINTDOT,colorFF00; PARTLINE(BB,A4),POINTDOT,colorFF00; PARTLINE(BB,A5),colorFF00; PARTLINE(1,A15),colorFF1010; PARTLINE(1,A16),colorFF2010; PARTLINE(1,A17),colorFF3010; PARTLINE(1,A18),colorFF4010; 八大天王之操盘王 趋势线:=3*SMA((CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(L OW,28))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIG H,27)-LLV(LOW,27))*100,5,1),3,1); 底部:=LLV(CLOSE,30); MA3:=MA(底部,2); X:=MA(CLOSE,26); 压力:=HHV(HIGH,30); STICKLINE(CLOSE =X,CLOSE,HIGH,1,0),colorFF; STICKLINE(CLOSE =X,OPEN,CLOSE,8,0),colorFF; STICKLINE(CLOSE =X,OPEN,LOW,1,0),colorFF; STICKLINE(CLOSE =X,OPEN,CLOSE,8,0),colorFF00; STICKLINE(CLOSE =X,OPEN,HIGH,1,0),colorFF00; STICKLINE(CLOSE =X,CLOSE,LOW,1,0),colorFF00; PARTLINE(MA3 =REF(MA3,1)ANDCLOSE =XANDCLOSE MA3,MA3),colorFFFFFF; PARTLINE(压力 =REF(压力,1)ANDCLOSE =X,压力),colorF8E E00; DRAWTEXT(FILTER(LOW =XANDCLOSE =XANDMA3 = REF(MA3,1)ANDCLOSE/OPEN 1.02ANDWINNER(CLOSE) 0.4, 20),LOW, ★买 ),colorFFFF; DRAWTEXT(FILTER(HIGH =压力ANDCLOSE1.03ANDWIN NER(CLOSE) 0.6,5),HIGH, 卖 ),colorFF00; 趋势线:=3*SMA((CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(L OW,28))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIG H,27)-LLV(LOW,27))*100,5,1),3,1); 短期乖离率:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100; DRAWTEXT(FILTER(IF(CROSS(趋势线,10)ANDCLOSE/LOW 1. 04AND短期乖离率 0.35,1,0)ANDCLOSE OPEN,5),LOW-0.07, 底★ ),ALIGN2,colorFFFF; VARA:=AMOUNT/VOL/100; VARB:=(3*HIGH+LOW+OPEN+2*CLOSE)/7; VARC:=SUM(AMOUNT,7)/VARA/100; VARD:=DMA(VARB,VOL/VARC); VARE:=(CLOSE-VARD)/VARD*100; VARF:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))* 100; VARJ:=MA(VARE,20)+STD(VARE,20); BIAS18:=(CLOSE-MA(CLOSE,18))/MA(CLOSE,18)*100; K:=SMA(VARF,3,1); 顶:=REF(BIAS18,1) =5ANDCROSS(VARJ,VARE)ANDK DRAWTEXT(FILTER(REF(BIAS18,1) =5ANDCROSS(VARJ,VA RE)ANDK 79,5),HIGH*1.02, 风险 ),colorFFFF; 八大天王之换手王 A001:=CLOSE-REF(CLOSE,6); A002:=MA(A001,6); A003:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; A004:=SMA(A003,3,1); A005:=SMA(A004,3,1); A006:=EMA(3*A004-2*A005,2); A007:=(HIGH+LOW+CLOSE)/3; A008:=(A007-MA(A007,14))/(0.015*AVEDEV(A007,14))/2; A009:=(A008+EMA((-100*(HHV(HIGH,14)-CLOSE)/(HHV(HIG H,14)-LLV(LOW,14))+100)/100,3)*200-100)/2; A010:=A009-REF(A009,14); A011:=A009-REF(A009,26); A012:=(A009+A010+A011)/3; KKM:=EMA(A012,4); A013:=HHV(HIGH,34); A014:=(2*CLOSE+HIGH+LOW)/4; A015:=LLV(LOW,34); A016:=EMA((A014-A015)/(A013-A015)*100,13); A017:=EMA(0.667*REF(A016,1)+0.333*A016,2); KKMD:=A016-A017 1ANDA016 30ANDA017 KKML:=A016-A017 0ANDA016 80ANDA017 80ANDR EF(A016-A017,1) KKMQ:=COUNT(A016-A017 0,2)=2; KKAL:=A016-A017 生命线:MA(CLOSE,20),colorFF; 取舍线:MA(CLOSE,10); EXPLAIN(1=1, 买卖指标的判断: ),LINETHICK2,colorFFFF; EXPLAIN(KKMD, 最佳买入时机 EXPLAIN(KKML, 最佳卖出时机 EXPLAIN(KKMQ, 该股处于持仓区 EXPLAIN(KKAL, 该股处于空仓区 EXPLAIN(CLOSE/REF(CLOSE,1) INDEXC/REF(INDEXC,1), 该股 强于大盘 EXPLAIN(CLOSE/REF(CLOSE,1), 该股强于大盘 EXPLAIN(CROSS(MA(CLOSE,5),MA(CLOSE,10)), 快出手 EXPLAIN(CROSS(MA(CLOSE,10),MA(CLOSE,5)), 快收手 EXPLAIN(KKM EMA(KKM,4)ANDKKM REF(KKM,1), 快速介 入! EXPLAIN(KKM EMA(KKM,4)ANDKKM EXPLAIN(KKMREF(KKM,1), 防御能力! EXPLAIN(KKM 八大天王之强弱王 LC:=REF(CLOSE,1); 品种强弱:(SMA(MAX(CLOSE-LC,0),N1,1))/(SMA(ABS(CLOSE-L C),N1,1))*100,LINETHICK2,colorFF00; CC:= 1A0001$CLOSE FF:= 399001$CLOSE LC1:=REF(IF(INBLOCK( 深圳A股 )=1,FF,CC),1); 指数强弱:(SMA(MAX(IF(INBLOCK( 深圳A股 )=1,FF,CC)-LC1,0), N1,1))/(SMA(ABS(IF(INBLOCK( 深圳A股 )=1,FF,CC)-LC1),N1,1))*1 00,LINETHICK2,colorFF00FF; 强弱度:品种强弱-指数强弱,LINETHICK0; FILLRGN(强弱度 =0,指数强弱,品种强弱),colorFF; FILLRGN(强弱度 0,指数强弱,品种强弱),colorFF00; MA(品种强弱,8); 20; 50,LINETHICK2,colorFFFF; 80; EXPLAIN(CLOSE 0, 【本指标仅供参考】 ),colorFF; EXPLAIN(CLOSE 0, ◆◆强弱研判◆◆ ),colorFFFF; EXPLAIN(强弱度 0, 该品种现阶段强于指数 ),colorFF; EXPLAIN(强弱度=0, 该品种现阶段与指数同步 ),colorFFFF; EXPLAIN(强弱度 0, 该品种现阶段弱于指数 ),colorFF00; EXPLAIN(品种强弱 =50, 该品种现阶段属于强势 ),colorFF; EXPLAIN(品种强弱 50, 该品种现阶段属于弱势 ),colorFF00; EXPLAIN(品种强弱 =MA(品种强弱,8), 指标处于多头趋势 ),colo rFF; EXPLAIN(品种强弱 EXPLAIN(CLOSE 0, ◆◆k线研判◆◆ ),colorFFFF; EXPLAIN(CLOSE REF(HIGH,1)AND品种强弱 =MA(品种强弱, 5), 多头攻击K线n做多以当日最低价为止损位 ),colorFF; EXPLAIN(CLOSE EXPLAIN(HIGH REF(HIGH,1)ANDLOWOPENAND品种强弱 =MA(品种强弱,5), 变盘k线,n多头设置当日最低点为止损位。 ),co lorFF; EXPLAIN(HIGH REF(HIGH,1)ANDLOW =OPEN, 变盘k线, n多头小心,设置当日最低点为止损位。 ),colorFF00; AA:EMA(CLOSE,8)-EMA(CLOSE,13); BB:EMA(AA,3); DRAWBAND(AA,RGB(240,0,0),BB,RGB(0,255,0)); DRAWICON(CROSS(AA,REF(AA,1)),0-0.02,1); DRAWICON(CROSS(REF(AA,1),AA),0+0.02,2); IF(AA =REF(AA,1),0,DRAWNULL),COLORFF00FF,LINETHICK6; IF(AA REF(AA,1),0,DRAWNULL),COLOR00FFFF,LINETHICK6;