最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 指标资讯

    正文概述    2024-05-04 04:23:36  

    通达信指标公式源码概况:指标类别: 通达信指标公式授权方式: 免费版指标评级: ★★★★★指标分类: 策略画线方法: 副图一、趋势买卖指标公式源码 J1:MA(C,7),COLORWHITE; J2:MA(C,21),COLORYELLOW; DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26); DEA:=EMA(DIFF,9); A1:=BARSLAST(REF(CROSS(DIFF,DEA),1)); B1:=REF(C,A1+1) CANDREF(DIFF,A1+1) DIFFANDCROSS(DIFF,DEA); A2:=BARSLAST(REF(CROSS( KDJ.K (9,3,3), KDJ.D (9,3,3)),1)); B2:=REF(C,A2+1) CANDREF( KDJ.K (9,3,3),A2+1) KDJ.K (9,3,3)ANDCROSS( KDJ.K (9,3,3), KDJ.D (9,3,3)); A3:=BARSLAST(REF(CROSS( RSI.RSI1 (6,12,24), RSI.RSI2 (6,12,24)),1)); B3:=REF(C,A3+1) CANDREF( RSI.RSI1 (6,12,24),A3+1) RSI.RSI1 (6,12,24)ANDCROSS( RSI.RSI1 (6,12,24), RSI.RSI2 (6,12,24)); DRAWICON(B1 0,L-0.20,5); DRAWTEXT(B1,L-0.30, MACD底背 ),COLORWHITE; DRAWICON(B2 0,L-0.20,4); DRAWTEXT(B2,L-0.30, KDJ底背 ),COLORFF00FF; DRAWICON(B3 0,L-0.20,3); DRAWTEXT(B3,L-0.30, RSI底背 ),COLORYELLOW; DRAWICON(CROSS(DIFF,DEA)ANDCROSS( KDJ.K (9,3,3), KDJ.D (9,3,3)),L-0.20,6); DRAWTEXT(CROSS(DIFF,DEA)ANDCROSS( KDJ.K (9,3,3), KDJ.D (9,3,3)),L-0.30, 金叉共振 ),COLOR0099FF; N1:=14;N:=8; AAQ:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN)); 买量:=IF(CLOSE OPEN,AAQ*(HIGH-LOW),IF(CLOSE OPEN,AAQ*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),LINETHICK0,COLORRED; 卖量:=IF(CLOSE OPEN,0-AAQ*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE OPEN,0-AAQ*(HIGH-LOW),0-VOL/2)),LINETHICK0,COLORCYAN; 进出量:=买量+卖量,COLOR00FFFF; N日内净流入:SUM(进出量,5),LINETHICK2,COLORFF55BB; 流入:=IF(N日内净流入 REF(N日内净流入,1),N日内净流入,DRAWNULL),COLORYELLOW,LINETHICK2; RSI1:=N日内净流入; AA:=REF(RSI1,N)=HHV(RSI1,2*N+1); BB:=BACKSET(AA,N+1); CC:=FILTER(BB,N)ANDRSI1=HHV(RSI1,N+1); A1:=BARSLAST(REF(CC,1)); 顶背离:=REF(CLOSE,A1+1) CLOSEANDREF(RSI1,A1+1) RSI1ANDCC; STICKLINE(FILTER(顶背离 0,5),100,RSI1,1,0),COLORRED; DRAWLINE(CC,RSI1,FILTER(顶背离 0,5),RSI1,0),COLORRED; AA2:=REF(RSI1,N)=LLV(RSI1,2*N+1); BB2:=BACKSET(AA2,N+1); CC2:=FILTER(BB2,N)ANDRSI1=LLV(RSI1,N+1); A2:=BARSLAST(REF(CC2,1)); 底背离:=REF(CLOSE,A2+1) CLOSEANDREF(RSI1,A2+1) RSI1ANDCC2; STICKLINE(FILTER(底背离 0,5),0,RSI1,1,0),COLORCYAN; DRAWLINE(CC2,RSI1,FILTER(底背离 0,5),RSI1,0),COLORCYAN; 0,LINETHICK2,COLORGREEN; M1:=2;M2:=60; MID1:=(3*CLOSE+LOW+OPEN+HIGH)/6; 乖离率:(SMA(MID1,M1,1)-MA(SMA(MID1,2,1),M2))/MA(SMA(MID1,2,1),M2)*100,COLOR999999; MID:=乖离率; MA1:(10*MID+9*REF(MID,1)+8*REF(MID,2)+7*REF(MID,3)+6*REF(MID,4)+5*REF(MID,5) +4*REF(MID,6)+3*REF(MID,7)+2*REF(MID,8)+1*REF(MID,9))/55,COLOR0000DD; MA2:EMA(MA1,8),COLORWHITE;{MA1取普通平均值} IF(MA1 =REF(MA1,1),MA1,DRAWNULL),COLOR22FF22; IF(MA2 =REF(MA2,1),MA2,DRAWNULL),COLOR33FF33; {长中短周期把握} N1A:=BARSLAST(CROSS(C,MA(C,13))); N2A:=BARSLAST(CROSS(MA(C,13),C)); 短线跟踪:IF(N1A N2A,N1A+1,N2A+1)*0.01,COLORYELLOW,NODRAW;{上穿或下穿13线计时}; N1B:=BARSLAST(CROSS(C,MA(C,60))); N2B:=BARSLAST(CROSS(MA(C,60),C)); 中线跟踪:IF(N1B N2B,N1B+1,N2B+1)*0.01,COLORRED,NODRAW;{上穿或下穿60线计时}; N1C:=BARSLAST(CROSS(C,MA(C,250))); N2C:=BARSLAST(CROSS(MA(C,250),C)); 长线跟踪:IF(N1C N2C,N1C+1,N2C+1)*0.01,COLORGRAY,NODRAW;{上穿或下穿250线计时}; V0:0,COLOR666666;{零轴}; Z1:=STRCAT(HYBLOCK,  Z2:=STRCAT(Z1,DYBLOCK); Z3:=STRCAT(Z2,  DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLORRED; HAN:=DATE 1141230; 当前获利筹码:=IF(WINNER(CLOSE),WINNER(CLOSE)*100,0); DRAWKLINE(H,O,L,C); 九十成本集中:=(COST(95)-COST(5))/(COST(95)+COST(5))*100; 成本价:COST(九十成本集中),LINETHICK2,COLORMAGENTA; 入1:IF(成本价 REF(成本价,1),成本价,DRAWNULL),COLORRED,LINETHICK2; 出1:IF(成本价 REF(成本价,1),成本价,DRAWNULL),COLORGREEN,LINETHICK2; STICKLINE(成本价 LOWAND成本价 HIGH,成本价,MIN(MIN(OPEN,CLOSE),成本价),3.2,0)*HAN,COLOR0077FF; STICKLINE(成本价 LOWAND成本价 HIGH,成本价,MIN(MIN(OPEN,CLOSE),成本价),2.5,0)*HAN,COLOR0099FF; STICKLINE(成本价 LOWAND成本价 HIGH,成本价,MIN(MIN(OPEN,CLOSE),成本价),1.9,0)*HAN,COLOR00BBFF; STICKLINE(成本价 LOWAND成本价 HIGH,成本价,MIN(MIN(OPEN,CLOSE),成本价),1.2,0)*HAN,COLOR00DDFF; STICKLINE(成本价 LOWAND成本价 HIGH,成本价,MIN(MIN(OPEN,CLOSE),成本价),0.3,0)*HAN,COLOR00FFFF; STICKLINE(成本价 MIN(C,O)AND成本价 MAX(C,O),成本价,MIN(OPEN,CLOSE),3.2,0)*HAN,COLOR0077FF; STICKLINE(成本价 MIN(C,O)AND成本价 MAX(C,O),成本价,MIN(OPEN,CLOSE),2.5,0)*HAN,COLOR0099FF; STICKLINE(成本价 MIN(C,O)AND成本价 MAX(C,O),成本价,MIN(OPEN,CLOSE),1.9,0)*HAN,COLOR00BBFF; STICKLINE(成本价 MIN(C,O)AND成本价 MAX(C,O),成本价,MIN(OPEN,CLOSE),1.2,0)*HAN,COLOR00DDFF; STICKLINE(成本价 MIN(C,O)AND成本价 MAX(C,O),成本价,MIN(OPEN,CLOSE),0.3,0)*HAN,COLOR00FFFF; STICKLINE(成本价 HIGH,CLOSE,OPEN,3.2,0)*HAN,COLOR0077FF; STICKLINE(成本价 HIGH,CLOSE,OPEN,2.5,0)*HAN,COLOR0099FF; STICKLINE(成本价 HIGH,CLOSE,OPEN,1.9,0)*HAN,COLOR00BBFF; STICKLINE(成本价 HIGH,CLOSE,OPEN,1.2,0)*HAN,COLOR00DDFF; STICKLINE(成本价 HIGH,CLOSE,OPEN,0.3,0)*HAN,COLOR00FFFF; STICKLINE(成本价 HIGH,HIGH,LOW,0,0),COLORGREEN; DF2:=(C-REF(C,1))/REF(C,1)*100  DF3:=(C-O)/O*100  当天涨幅:(C-O)/O*100,NODRAW; V型反转:=L 成本价ANDDF2; V型反转2:=CROSS(C,成本价)ANDDF2; V型反转3:=L 成本价ANDDF3; DRAWTEXT(V型反转,L*0.98, ↖狙击 ),COLORCYAN; DRAWTEXT(V型反转2,L*0.98, ↖狙击 ),COLORCYAN; DRAWTEXT(V型反转3,L*0.98, ↖狙击 ),COLORCYAN; STICKLINE(V型反转=1,C,O,3.2,0),COLORRED; STICKLINE(V型反转2=1,C,O,3.2,0),COLORRED; STICKLINE(V型反转3=1,C,O,3.2,0),COLORRED;二、日线买卖指标公式源码 万手:VOL/10000,LINETHICK0,NODRAW; AA:=IF(CURRBARSCOUNT=1ANDPERIOD=5,VOL*240/FROMOPEN,DRAWNULL); 预测:AA/10000; STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,AA,0,3,1),COLORYELLOW; BB:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN)); 主动买:=IF(CLOSE OPEN,BB*(HIGH-LOW),IF(CLOSE OPEN, BB*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)); 主买:主动买/10000,COLORRED,NODRAW; 主动卖:=IF(CLOSE OPEN,0-BB*((HIGH-CLOSE)+(OPEN-LOW)), IF(CLOSE OPEN,0-BB*(HIGH-LOW),0-VOL/2)); 主卖:-主动卖/10000,COLORGREEN,NODRAW; 差额:(主动买+主动卖)/10000,NODRAW; CC:=(2*C+H+L)/4; STICKLINE(CC REF(CC,1),0,VOL,2,DRAWNULL),COLORRED; STICKLINE(CC REF(CC,1),0,VOL,2,DRAWNULL),COLORCYAN; STICKLINE(CC=REF(CC,1),0,VOL,2,DRAWNULL),COLORWHITE; {STICKLINE(C -1,0,VOL,3,1),COLORRED; STICKLINE(C O,0,VOL,3,1),COLORFFFF00; STICKLINE(C=OANDC REF(C,1),0,VOL,2,1),COLORFFFF00; STICKLINE(C=OANDC REF(C,1),0,VOL,2,1),COLORRED;} STICKLINE(主动买 0,0,主动买,1,0),COLOR0000FF; STICKLINE(主动卖 0,VOL,主动买,1,0),COLOR00FF00; 持币:IF(SAR(10,2,20) =H,SAR(10,2,20),DRAWNULL),CIRCLEDOT,COLORGREEN; 持股:IF(SAR(10,2,20) =L,SAR(10,2,20),DRAWNULL),CIRCLEDOT,COLORMAGENTA; 五日:MA(V,5)COLORFFFFFFLINETHICK2; 三十四日:MA(V,34)COLORFF80FFLINETHICK2; 一百四十四日:MA(V,144)COLOR00FFFFLINETHICK1; VARIABLE:WDAY[7]= 星期六  WDAY[1]:= 星期日  WDAY[2]:= 星期一  WDAY[3]:= 星期二  WDAY[4]:= 星期三  WDAY[5]:= 星期四  WDAY[6]:= 星期五  FY:=YEAR; FM:=MONTH; FD:=DAY; WD:=WEEKDAY; P:=SYSPARAM(1); STR1:= + 今日: +NUMTOSTR(FY[P],0)+ 年 +NUMTOSTR(FM[P],0)+ 月 +NUMTOSTR(FD[P],0)+ 日 +WDAY[WD[P]+1]; DRAWTEXTEX(CLOSE,1,480,22,STR1),colorDDFF; 量5:MA(VOL,5),colorred; 量10:MA(VOL,10); VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN)); 成交:VOL,POINTDOT,COLORE4C1EE; 主动买盘:IF(CLOSE OPEN,VAR1*(HIGH-LOW),IF(CLOSE OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),COLORRED,POINTDOT; 主动卖盘:IF(CLOSE OPEN,VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE OPEN,VAR1*(HIGH-LOW),VOL/2)),COLOR00FF00,POINTDOT; PARTLINE(MA(VOL,5) =REF(MA(VOL,5),1),MA(VOL,5)),COLORRED,LINETHICK4; PARTLINE(MA(VOL,5) =REF(MA(VOL,5),1),MA(VOL,5)),COLOR00C700,LINETHICK2; 换手率:IF(CAPITAL=0,INDEXV/ESTDATA(12),VOL/FINANCE(7)),PRECISION2,LINETHICK0; 买卖比:=主动买盘/主动卖盘; WJ:=(HIGH+LOW+CLOSE)/3; VD1:=IF(HIGH=LOW,1,HIGH-MAX(OPEN,CLOSE)); VD2:=IF(HIGH=LOW,1,MAX(CLOSE,OPEN)-WJ); VD3:=IF(HIGH=LOW,1,MIN(OPEN,CLOSE)-LOW); VD4:=IF(HIGH=LOW,1,WJ-MIN(CLOSE,OPEN)); VD5:=VOL/IF(HIGH=LOW,4,HIGH-LOW); VD6:=(VD1*VD5); VD7:=(VD2*VD5); VD8:=(VD3*VD5); VD9:=(VD4*VD5); 买入量:=(VD9+VD8); 卖出量:=(VD6+VD7); 买入资金:=买入量*close/100; 卖出资金:=卖出量*close/100; 资金进出:=买入资金-卖出资金; 买卖资金比:=买入资金/卖出资金; 挂单买盘:=MA(主动买盘,3); 挂单卖盘:=(MA(主动卖盘,3)); {yyzq:=(sysparam(3)-sysparam(2)); FILL:=barscount(c) SYSPARAM(2)andbarscount(c) if(sysparam(3)-sysparam(2) 20,SYSPARAM(2)+INTPART(yyzq/2),20); pich:=refx(hhv(成交,yyzq),yyzq); picl:=refx(llv(挂单卖盘,yyzq),yyzq} {fillrgn(fill,refx(pich,yyzq),refx(picl,yyzq)),Color026C1D;} DRAWTEXTEX(c,1,2,20, ┃当日买卖总量= +NUMTOSTR(VOL,2)),ColorA6B7F3; {DRAWTEXTEX(c,1,2,200, ┃当日主动买量= +NUMTOSTR(主动买盘,2)),Color0000FF;} {DRAWTEXTEX(c,1,240,200, ┃当日主动卖量= +NUMTOSTR(主动卖盘,2)),Color00FF00;} {DRAWTEXTEX(c,1,2,320, ┃当日买卖比: +NUMTOSTR(买卖比,2)),ColorFFFFFF;} DRAWTEXTEX(c,1,2,120, ┃买入资金累计万元: +NUMTOSTR(买入资金,2)),Colorred,LINETHICK1; DRAWTEXTEX(c,1,300,120, ┃卖出资金累计万元: +NUMTOSTR(卖出资金,2)),Color00ff00,LINETHICK1; DRAWTEXTEX(c,1,600,120, ┃资金进出万元: +NUMTOSTR(资金进出,2)),Coloryellow,LINETHICK1; {DRAWTEXTEX(c,1,440,320, ┃买卖资金比: +NUMTOSTR(买卖资金比,2)),Coloryellow,LINETHICK1;} DRAWTEXTEX(c,1,2,250, ┃当日挂单买盘: +NUMTOSTR(挂单买盘,2)),Colorred,LINETHICK1; DRAWTEXTEX(c,1,260,250, ┃当日挂单卖盘: +NUMTOSTR(挂单卖盘,2)),Color00ff00,LINETHICK1; 换手:VOL/CAPITAL*100,NODRAW; 低换手小于2:换手 2,COLORFFFF00,NODRAW; 温和换手2到5:换手 2AND换手 5,COLORMAGENTA,NODRAW; 热换手5到11:换手 5AND换手 11,COLORYELLOW,NODRAW; 烫手换手11到17:换手 11AND换手 17,COLORRED,NODRAW; 高潮换手大于17:换手 17,COLORGREEN,NODRAW; 五日均换手:MA(换手,5); 十日均换手:MA(换手,10); STICKLINE(换手 2,0,换手,2.3,0),COLORFF4400; STICKLINE(换手 2,0,换手,1.8,0),COLORFF6600; STICKLINE(换手 2,0,换手,1.3,0),COLORFF9900; STICKLINE(换手 2,0,换手,0.6,0),COLORFFCC00; STICKLINE(换手 2,0,换手,0.3,0),COLORGREEN; STICKLINE(换手 2AND换手 5,0,换手,2.3,0)COLORFF0033; STICKLINE(换手 2AND换手 5,0,换手,1.8,0)COLORFF0066; STICKLINE(换手 2AND换手 5,0,换手,1.2,0)COLORFF0099; STICKLINE(换手 2AND换手 5,0,换手,0.6,0)COLORFF00CC; STICKLINE(换手 2AND换手 5,0,换手,0.3,0)COLORFF00FF; STICKLINE(换手 5AND换手 11,0,换手,2.3,0)COLOR0035FF; STICKLINE(换手 5AND换手 11,0,换手,1.8,0)COLOR0064FF; STICKLINE(换手 5AND换手 11,0,换手,1.3,0)COLOR0093FF; STICKLINE(换手 5AND换手 11,0,换手,0.8,0)COLOR00C2FF; STICKLINE(换手 5AND换手 11,0,换手,0.3,0)COLOR00FFFF; STICKLINE(换手 11AND换手 17,0,换手,2.3,0),COLOR000055; STICKLINE(换手 11AND换手 17,0,换手,2,0),COLOR000077; STICKLINE(换手 11AND换手 17,0,换手,1.8,0),COLOR000099; STICKLINE(换手 11AND换手 17,0,换手,1.5,0),COLOR0000BB; STICKLINE(换手 11AND换手 17,0,换手,0.9,0),COLOR0000DD; STICKLINE(换手 11AND换手 17,0,换手,0.3,0),COLOR0000FF; STICKLINE(换手 17,0,换手,2.3,0),COLOR006000; STICKLINE(换手 17,0,换手,2.1,0),COLOR007500; STICKLINE(换手 17,0,换手,1.8,0),COLOR009100; STICKLINE(换手 17,0,换手,1.3,0),COLOR00A600; STICKLINE(换手 17,0,换手,0.8,0),COLOR00BB00; STICKLINE(换手 17,0,换手,0.3,0),COLOR00CC00; DRAWICON(换手 25,换手,15); VVOL:=IF(CURRBARSCOUNT=1ANDPERIOD=5,VOL*240/FROMOPEN,DRAWNULL),NODRAW; STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,VVOL,0,-1,-1),COLOR00C0C0; VOLUME:VOL,VOLSTICK; 虚换手:VVOL/FINANCE(7)*10000; VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN)); 主买:IF(CLOSE OPEN,VAR1*(HIGH-LOW),IF(CLOSE OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),COLORRED,POINTDOT; 主卖:IF(CLOSE OPEN,VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE OPEN,VAR1*(HIGH-LOW),VOL/2)),COLOR00FF00,POINTDOT; STICKLINE(主买 0,0,主买,2,0),COLORRED; STICKLINE(主卖 0,0,主卖,0.5,0),COLORBLUE; 净买:(主买-主卖)/10000; 虚量:VVOL/10000; 五线:CROSS(C,MA(C,5))ANDCROSS(C,MA(C,10))ANDCROSS(C,MA(C,20))ANDCROSS(C,MA(C,30))ANDC REF(C,1),coloryellow; //C REF(C,1)ANDCROSS(C,MA(C,5))ANDCROSS(C,MA(C,10))ANDCROSS(C,MA(C,30))ANDCROSS(C,MA(C,60))ANDCROSS(C,MA(C,240)),colorred; 倍量:(VOL/REF(VOL,1) 2ANDCOUNT(CLOSE OPEN,1))OR(LOW REF(HIGH,1)ANDCOUNT(OPEN CLOSE,1)ANDVOL/REF(VOL,1) 2),STICK,colorblue,LINETHICK1; TJ:倍量ANDMA(V,REF(BARSLAST(倍量),1)-2) REF(V,REF(BARSLAST(倍量)+1,1))ANDBARSLAST(倍量)  DRAWICON(TJ,0.3,1); TT:=IF(HOUR 12,(HOUR-13)*60+MINUTE+120,(HOUR-9)*60+MINUTE-30); P:=IF(PERIOD=5,FROMOPEN,TT); TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,TOTALFZNUM,1))))); MTIME:=MOD(FROMOPEN,TOTAL); CTIME:=IF(MTIME 0.5,TOTAL,MTIME); VVOL:=IF(CURRBARSCOUNT=1,VOL*TOTAL/CTIME,VOL),NODRAW; S1:=IF(PERIOD=4,60,IF(PERIOD=3,30,IF(PERIOD=2,15,IF(PERIOD=1,5,1)))); S2:=IF(PERIOD=5,4,IF(PERIOD=4,8,IF(PERIOD=3,16,IF(PERIOD=2,48,240)))); S3:=P/S1,NODRAW; 分时量比:=SUM(VOL,S3)/S3/DYNAINFO(16)/TOTAL; 日量比:=VVOL/REF(MA(VOL,5),1); 量比:IF(PERIOD 5,分时量比,IF(PERIOD=5,日量比,0));[源码注释]通达信公式动态公式解读BIAS1赋值:(收盘价/收盘价的6日简单移动平均-1)*100BIAS2赋值:(收盘价/收盘价的12日简单移动平均-1)*100BIAS3赋值:(收盘价/收盘价的24日简单移动平均-1)*100AA1赋值:((成交额(元)的5日简单移动平均/成交量(手)的5日简单移动平均-成交额(元)的110日简单移动平均/成交量(手)的110日简单移动平均)/(成交额(元)的5日简单移动平均/成交量(手)的5日简单移动平均)) -0.273当满足条件AA1ANDBIAS1 =-7ANDBIAS2 =-11ANDBIAS3 =-14时,在1和33位置之间画柱状线,宽度为1,0不为0则画空心柱.,画红色推荐阅读:智能k线买卖指标公式源码XA_1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;XA_2:=SMA(XA_1,9,1);XA_3:=SMA(XA_2,9,1);J:3*XA_2-2*XA_3,COLORRED;MAC1:EMA(J,3),COLORGREEN;XA_4:=EMA(J,240);MAC3:EMA(J,20),COLORMAGENTA,LINETHICK2;MAC4:EMA(J,60),COLORBLUE,LINETHICK2;MACA:IF(J =10,50,0),COLORFFCC00;MACB:IF(J =HIGH+LOW+CLOSE,1,8)*10,DOTLINE,COLOR999999;VAR886:=IF((YEAR = 2050) AND (MONTH = 1),0,1);M:=5;WARN:=10;VAR1:=1090301;VAR2:=1090901;VAR3:=IF(DATE VAR1,IF(CLOSE 80,1,0),0)*VAR886;VAR4:=IF(DATE VAR2,1,VAR3)*VAR886;VAR5:=(EMA(LOW,M)+EMA(CLOSE,M*2)+EMA(CLOSE,M*6)+EMA(HIGH,M*3))/4*(1+WARN/200);VAR6:=(EMA(HIGH,M)+EMA(OPEN,M*2)+EMA(OPEN,M*6)+EMA(LOW,M*3))/4*(1-WARN/200);全仓买入:((CROSS(MA(CLOSE,5),MA(CLOSE,30))) AND CLOSE MA(CLOSE,60));上线:=SMA(C,6.5,1);下线:=SMA(C,13.5,1);上线1:=SMA(C,3,1);下线1:=SMA(C,8,1);DRAWTEXT( CROSS(上线,下线),LOW *0.98, ◎全仓买 ),COLOR00FF00;DRAWTEXT(CROSS(下线1,上线1),H*1.02, ●清仓 ),COLORYELLOW;买卖线:MA(CLOSE,5),COLORGREEN,LINETHICK2;买:IF(买卖线 REF(买卖线,1),买卖线,DRAWNULL),COLORRED,LINETHICK2;卖:IF(买卖线 REF(买卖线,1),买卖线,DRAWNULL),COLORGREEN,LINETHICK2;BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;UPR:=BBI+3*STD(BBI,13),LINETHICK2;DWN:=BBI-3*STD(BBI,13);安全:=MA(CLOSE,60),LINETHICK2;LC:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;DRAWTEXT( CROSS(82,RSI) , HIGH*1.02, ◆减仓 ) ,COLORFF9966,LINETHICK2;A77:=(2*C+H+L)/4;操作1:=MA(A77,5)*1.03,LINETHICK2;操作2:=MA(A77,5)*0.97,LINETHICK2;VAR1:LLV(A77,21);VAR2:HHV(A77,21);SK:=EMA((A77-VAR1)/(VAR2-VAR1)*100,7);SD:=EMA(0.667*REF(SK,1)+0.333*SK,5);DRAWTEXT(IF(COUNT(CLOSE REF(CLOSE,1),8)/8 6/10 AND VOL =1.5*MA(VOL,5) ANDCOUNT(SK =SD,3) AND REF(LOW,1)=LLV(LOW,120),1,0),LOW*0.98, ◇买进 ) ,COLOR0099FF;DRAWTEXT(IF(COUNT(CLOSE REF(CLOSE,1),13)/13 6/10 ANDCOUNT(SK SD,6) AND REF(LOW,5)=LLV(LOW,120) AND REF(CLOSE =OPEN,4) ANDREF(CLOSE OPEN,3) AND REF(CLOSE OPEN,2) AND REF(OPEN CLOSE,1) ANDOPEN REF(CLOSE,1),1,0),LOW*0.98, ◇买进 ) ,COLORYELLOW;D:=MA(CLOSE,80)-MA(CLOSE,10)/3;DRAWTEXT(IF(CLOSE D AND VOL/240 MA(VOL,5)/240 AND CLOSE REF(CLOSE,1)*1.08AND CLOSE MA(CLOSE,13)*1.3,1,0),LOW*0.98, ◆抄底 ),COLORYELLOW;VARE1:=EMA(C,3);VARE2:=EMA(C,5);VARE3:=EMA(C,10);VAR4:=EMA(C,20);VAR5:=EMA(C,30);买进价:=((C-REF(MA(C,6),1))/6+MA(C,6))*1.004;买进条件:=CROSS(C,买进价) AND 买进价 REF(买进价,1);STICKLINE(买进条件,H,L,0.5,1),COLORRED,LINETHICK2;STICKLINE(买进条件,O,C,6,0),COLORRED,LINETHICK2;加码价:=((C-REF(MA(C,18),1))/18+MA(C,18))*1.004;加码条件:=CROSS(C,加码价) AND 加码价 REF(加码价,1);STICKLINE(加码条件,H,L,0.5,1),COLORYELLOW,LINETHICK2;STICKLINE(加码条件,O,C,6,0),COLORYELLOW,LINETHICK2;{成本分布}HB:=COST(99.9);LB:=COST(0.1);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,HB ,HB ,A1*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B31 ,B31 ,A1*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B32 ,B32 ,A2*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B33 ,B33 ,A3*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B34 ,B34 ,A4*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B35 ,B35 ,A5*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B36 ,B36 ,A6*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B37 ,B37 ,A7*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B38 ,B38 ,A8*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B39 ,B39 ,A9*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B310 ,B310 ,A10*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B311 ,B311 ,A11*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B312 ,B312 ,A12*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B313 ,B313 ,A13*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B314 ,B314 ,A14*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B315 ,B315 ,A15*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B316 ,B316 ,A16*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B317 ,B317 ,A17*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B318 ,B318 ,A18*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B319 ,B319 ,A19*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B320 ,B320 ,A20*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B321 ,B321 ,A21*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B322 ,B322 ,A22*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B323 ,B323 ,A23*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B324 ,B324 ,A24*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B325 ,B325 ,A25*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B326 ,B326 ,A26*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B327 ,B327 ,A27*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B328 ,B328 ,A28*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B329 ,B329 ,A29*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B330 ,B330 ,A30*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B331 ,B331 ,A31*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B332 ,B332 ,A32*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B333 ,B333 ,A33*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B334 ,B334 ,A34*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B335 ,B335 ,A35*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B336 ,B336 ,A36*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B337 ,B337 ,A37*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B338 ,B338 ,A38*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B339 ,B339 ,A39*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B340 ,B340 ,A40*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B341 ,B341 ,A41*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B342 ,B342 ,A42*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B343 ,B343 ,A43*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B344 ,B344 ,A44*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B345 ,B345 ,A45*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B346 ,B346 ,A46*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B347 ,B347 ,A47*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,B348 ,B348 ,A48*50 ,0 ),COLORGRAY;STICKLINE(ISLASTBAR,LB ,LB ,A50*50 ,0 ),COLORGRAY;当前获利筹码:IF(WINNER(CLOSE),WINNER(CLOSE)*100,0),NODRAW;多空线: IF(VAR4=1,OPEN,EMA((VAR5+VAR6)/2,M)), ;高: IF(VAR4=1,CLOSE,VAR5-(VAR5-多空线)/10), ;低: IF(VAR4=1,(OPEN+CLOSE)/2,VAR6+(多空线-VAR6)/10),;顶: IF(VAR4=1,HIGH,VAR5*(1+WARN/200))*VAR886;底: IF(VAR4=1,LOW,VAR6*(1-WARN/200))*VAR886 ;换手率:VOL/CAPITAL*100,NODRAW,COLORMAGENTA;智能成本:AMOUNT/VOL/100,POINTDOT,COLORWHITE;STICKLINE(1 ,智能成本 ,智能成本 ,1 ,1 )*VAR886,COLORWHITE,;上市日期:FINANCE(42)/100, NODRAW ;流通盘:CAPITAL/1000000,NODRAW;每股收益:FINANCE(33),NODRAW;N:=9;M1:=9;M2:=9;RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;K:SMA(RSV,M1,1);D:SMA(K,M2,1);J:3*K-2*D; SAT:=IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100 100,100,(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100); DRAWTEXTREL(800,40, 量能饱和度: +NUMTOSTRN(SAT,0)),LINETHICK2,Color00FFFF; B1:= ^^^^^^^^^^^^^^^^^^^^^^^^  DRAWTEXT(vol=HHV(vol,20),C,B1),color00FFCC; 十天买卖:ema(REF(CLOSE,1),2),COLORFFCC00,LINETHICK1; PARTLINE(十天买卖,CLOSE =十天买卖,RGB(255,0,0)),LINETHICK4; 十天压力:HHV(十天买卖,13),COLOR00FF00,LINETHICK1; PARTLINE(十天压力,十天买卖=十天压力,RGB(255,255,0)),LINETHICK3; 十天支撑:LLV(十天买卖,13),Color00FFFF,LINETHICK1; PARTLINE(十天支撑,十天买卖=十天支撑,RGB(0,0,255)),LINETHICK3; RSV:=(((CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13)))*100); K:=SMA(RSV,3,1); D:=SMA(K,3,1); J:=((3*K)-(2*D)); RSV24:=(((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55)))*100); K24:=SMA(RSV24,3,1); D24:=SMA(K24,3,1); J24:=((3*K24)-(2*D24)); 压力位:IF(CROSS(J24,J),HIGH,REF(HIGH,BARSLAST(CROSS(J24,J)))),color0000FF; 支撑位:IF(CROSS(J,J24),LOW,REF(LOW,BARSLAST(CROSS(J,J24)))),colorFF0000; 价在线下:=C 十天买卖; STICKLINE(价在线下,CLOSE,OPEN,7.5,0),COLORff7700; STICKLINE(价在线下,CLOSE,OPEN,6,0),COLORff9900; STICKLINE(价在线下,CLOSE,OPEN,5,0),COLORffbb00; STICKLINE(价在线下,CLOSE,OPEN,4,0),COLORffcc00; STICKLINE(价在线下,CLOSE,OPEN,3,0),COLORffdd00; STICKLINE(价在线下,CLOSE,OPEN,2,0),COLORffee00; STICKLINE(价在线下,CLOSE,OPEN,1,0),COLORffff00; 价在线上:=C =十天买卖; STICKLINE(价在线上,CLOSE,OPEN,7.5,0),COLOR000055; STICKLINE(价在线上,CLOSE,OPEN,6,0),COLOR000066; STICKLINE(价在线上,CLOSE,OPEN,5,0),COLOR000077; STICKLINE(价在线上,CLOSE,OPEN,4,0),COLOR000099; STICKLINE(价在线上,CLOSE,OPEN,3,0),COLOR0000bb; STICKLINE(价在线上,CLOSE,OPEN,2,0),COLOR0000dd; STICKLINE(价在线上,CLOSE,OPEN,1,0),COLOR0000ff; 收小于开:=C =十天买卖andc open; stickline(收小于开,o,(o+c)/2,7.5,0),colorff11ff; stickline(收小于开,o,(o+c)/2,6,0),colorff33ff; stickline(收小于开,o,(o+c)/2,5,0),colorff55ff; stickline(收小于开,o,(o+c)/2,4,0),colorff77ff; stickline(收小于开,o,(o+c)/2,3,0),colorff99ff; stickline(收小于开,o,(o+c)/2,2,0),colorffbbff; stickline(收小于开,o,(o+c)/2,1,0),colorffddff; 收大于开:=C 十天买卖andc open; stickline(收大于开,c,(o+c)/2,7.5,0),color333333; stickline(收大于开,c,(o+c)/2,6,0),color555555; stickline(收大于开,c,(o+c)/2,5,0),color777777; stickline(收大于开,c,(o+c)/2,4,0),color999999; stickline(收大于开,c,(o+c)/2,3,0),colorbbbbbb; stickline(收大于开,c,(o+c)/2,2,0),colordddddd; stickline(收大于开,c,(o+c)/2,1,0),colorffffff; LL:=LLV(C,100); TJ:=IF((C-REF(C,1))/REF(C,1) 0.025,1,0); 平台支撑:=IF(C REF(O,BARSLAST(TJ=1)),REF(O,BARSLAST(TJ=1)),0); stickline(平台支撑,c,(o+c)/2,7.5,0),color005555; stickline(平台支撑,c,(o+c)/2,6,0),color006666; stickline(平台支撑,c,(o+c)/2,5,0),color007777; stickline(平台支撑,c,(o+c)/2,4,0),color009999; stickline(平台支撑,c,(o+c)/2,3,0),color00bbbb; stickline(平台支撑,c,(o+c)/2,2,0),color00dddd; stickline(平台支撑,c,(o+c)/2,1,0),color00ffff; 平台压力:=IF(C OPENandref(C,1) ref(OPEN,1),ref(close,1),0); stickline(平台压力,o,(o+c)/2,7.5,0),color003300; stickline(平台压力,o,(o+c)/2,6,0),color005500; stickline(平台压力,o,(o+c)/2,5,0),color007700; stickline(平台压力,o,(o+c)/2,4,0),color009900; stickline(平台压力,o,(o+c)/2,3,0),color00bb00; stickline(平台压力,o,(o+c)/2,2,0),color00dd00; stickline(平台压力,o,(o+c)/2,1,0),color00ff00; yl:=IF(C REF(O,BARSLAST(TJ=1)),REF(O,BARSLAST(TJ=1)),0); FT:=BARSLAST(yl); YLX:=REF(yl,FT); bt:=IF(C OPENandref(C,1) ref(OPEN,1),ref(C,1),0); XFT:=BARSLAST(bt); XYLX:=REF(bt,XFT); 平台调下:=CROSS(XYLX,C); 平台突破:=CROSS(C,YLX); DRAWICON(平台突破,L*0.93,7),ALIGN1,VALIGN2; DRAWICON(平台调下,H,8),ALIGN1,VALIGN2; VAR2:=REF(LOW,1); VAR3:=SMA(ABS(LOW-VAR2),13,1)/SMA(MAX(LOW-VAR2,0),13,1)*100; VAR4:=EMA(IF(CLOSE*1.2,VAR3*13,VAR3/13),13); VAR5:=LLV(LOW,34); VAR6:=HHV(VAR4,34); VAR7:=IF(LLV(LOW,56),1,0); VAR8:=EMA(IF(LOW =VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7; 主力进场:=VAR8 REF(VAR8,1); 进场:=ref(主力进场,1); DRAWTEXT(进场and平台突破,L*0.97, 进 ),ALIGN1,COLOR0000FF; DRAWTEXT(进场and平台突破,L*0.94, 场 ),ALIGN1,COLOR0000FF; DRAWICON(进场and平台突破andL=支撑位,L*0.93,1),ALIGN1,VALIGN2; 机构增仓:=EXTDATA(1); 大户增仓:=EXTDATA(2); 散户增仓:=EXTDATA(3); 增仓风向:=机构增仓+大户增仓; 增仓:=ref(cross(增仓风向,0)andc 十天买卖,1); 进:=cross(增仓风向,机构增仓)or增仓; DRAWICON(进and增仓风向 0and机构增仓 0andC 十天买卖,L*0.95,12),ALIGN1,VALIGN2; 出:=cross(机构增仓,增仓风向); DRAWICON(出andC 十天买卖,H*1,13),ALIGN1,VALIGN2; DRAWTEXTREL(800,100, 机构增仓: +NUMTOSTRN(机构增仓,0)),LINETHICK2,ColorFFFFFF; DRAWTEXTREL(800,150, 大户增仓: +NUMTOSTRN(大户增仓,0)),LINETHICK2,ColorFFFFFF; DRAWTEXTREL(800,200, 散户增仓: +NUMTOSTRN(散户增仓,0)),LINETHICK2,ColorFFFFFF; STICKLINE(V =HHV(V,62),OPEN,CLOSE,3,0),COLOR00FFFF;每日公式解答:公式编写要求:连续3年加权净资产收益率在20%的选股公式。公式编写方法:XG:BARSLASTCOUNT(FINANCE(33)/FINANCE(34)*100 20)=3;

    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 指标资讯 加入收藏