巴菲特理念副图指标 源码 通达信
通达信副图指标公式源码大全
副图指标公式源码百万踏浪(相传为杨百万看图公式)、1N1:=9;N:=3;VAR1:=REF(CLOSE,1);标尺:SMA(MAX(CLOSE-VAR1,0),5,1)/SMA(ABS(CLOSE-VAR1),5,1)* 100;VAR2:=(CLOSE-LLV(LOW,N1))/(HHV(HIGH,N1)-LLV(LOW,N1))*10 0;VAR3:=SMA(VAR2,3,1);VAR4:=SMA(VAR3,3,1);VAR5:=SMA(VAR4,3,1);浪:VAR3,COLORBLUE;波:VAR4,COLORRED;段:VAR5,COLORYELLOW;VAR6:=CROSS(VAR3,VAR4)ANDVAR4<25;STICKLINE(VAR6,0,VAR4+15,5,0),COLORGREEN;VAR7:=CROSS(VAR4,VAR5)ANDVAR4<25;VAR8:=VAR7ANDVOL>REF(VOL,1)*2ANDVOL>REF(MA(VOL,5),1)*2; STICKLINE(VAR7,0,VAR4+55,5,0),COLORWHITE;底抄DRAWTEXT(VAR7ANDCOUNT(VAR7,10)=1,VAR4+25,''),COLORYELLOW;STICKLINE(VAR8,0,VAR4+15,5,0),COLORBLUE;DRAWTEXT(VAR8ANDCOUNT(VAR8,10)=1,VAR4-1,'量放'),COLORGREEN;VAR9:=CROSS(VAR3,VAR4)ANDVAR4>80ANDVAR4>VAR5; STICKLINE(VAR9ANDCOUNT(VAR9,5)=1,VAR4-5,100,5,0),COLORY ELLOW;VARA:=CROSS(VAR5,VAR4)ANDREF(VAR4,1)>80;STICKLINE(VARA,VAR4-15,100,15,0),COLORYELLOW;顶逃DRAWTEXT(VARAANDCOUNT(VARA,10)=1,VAR4-25,''),COLORYELLO W;VAR1A:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*1 00;VAR1B:=SMA((SMA(VAR1A,4,1)-50)*2,3,1);VAR1C:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDE XL,14))*100;VAR1D:=SMA(VAR1C,4,1);VAR1E:=SMA(VAR1D,3,1);VAR1F:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;VARE:=REF(LOW,1)*0.9;VARF:=LOW*0.9;VAR10:=(VARF*VOL+VARE*(CAPITAL-VOL))/CAPITAL;VAR11:=EMA(VAR10,30);VAR12:=CLOSE-REF(CLOSE,1);VAR13:=MAX(VAR12,0);VAR14:=ABS(VAR12);VAR15:=SMA(VAR13,7,1)/SMA(VAR14,7,1)*100;VAR16:=SMA(VAR13,13,1)/SMA(VAR14,13,1)*100;VAR17:=BARSCOUNT(CLOSE);VAR18:=SMA(MAX(VAR12,0),6,1)/SMA(ABS(VAR12),6,1)*100; VAR19:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LO W,60))+100;VAR20:=VAR18<=25ANDVAR19<-95ANDVAR1F>20ANDVAR1B<-30ANDV AR1E<30ANDVAR11-CLOSE>=-0.25ANDVAR15<22ANDVAR16<28ANDVA R17>50;STICKLINE(VAR20,0,50,10,0),LINETHICK2,COLORBLUE; DRAWTEXT(CROSS(VAR20,0.5)ANDCOUNT(VAR20=1,10)=1,60,'百万导弹?'),LINETHICK7,COLORWHITE;2、分类资金A:=IF((CLOSE>126.32),(AMOUNT)/(100000),VOL);主力:MA(A,4),LINETHICK0,COLORYELLOW;游资:MA(A,8),LINETHICK0,COLOR00FF00;大户:MA(A,16),LINETHICK0,COLORRED;:MA(A,32),LINETHICK0,COLORF0F000;散户.主比:ABS(((主力)/(主力+游资+大户+散))*(100)),LINESTICK,COLORYELLOW;户户大+散+资)/(主力+游资游游比:ABS((())*(100)),LINESTICK,COLOR00FF00;户户游资++散大户大比:ABS(((大)/(主力+))*(100)),LINESTICK,COLORRED;户散+)/(:ABS(((散户主力+游资+大户比散))*(100)),LINESTICK,COLORF0F000;户:MA(A,180),COLORFF66FF,LINETHICK1; 警戒线,3,0),COLOR009CFF; 主力STICKLINE((主力>0),0,,2.8,0),COLOR009CFF; STICKLINE((主力>0),0,主力,2.5,0),COLOR00C0FF; STICKLINE((主力主力>0),0,,1.5,0),COLOR00D1FF; >0),0,主力主力STICKLINE((,1,0),COLOR00EAFF; 主力STICKLINE((主力>0),0,,0.7,0),COLORYELLOW; STICKLINE((主力>0),0,主力,3,0),COLOR00C100; >0),0,STICKLINE((游资游资,2.8,0),COLOR00CA00; >0),0,游资游资STICKLINE((,2.5,0),COLOR00D300; STICKLINE((游资>0),0,游资,1.5,0),COLOR00DB00; >0),0,游资游资STICKLINE((,1,0),COLOR00EA00; STICKLINE((游资>0),0,游资,0.7,0),COLORGREEN; 游资>0),0,游资STICKLINE((,3,0),COLOR1020AA;大户>0),0,大户STICKLINE((STICKLINE((大户>0),0,大户,2.8,0),COLOR1020BB; STICKLINE((大户>0),0,大户,2.5,0),COLOR1020CC; STICKLINE((大户>0),0,大户,1.5,0),COLOR1020DD; STICKLINE((大户>0),0,大户,1,0),COLOR1020EE; STICKLINE((大户>0),0,大户,0.7,0),COLORRED; STICKLINE((散户>0),0,散户,3,0),COLORFF7700; STICKLINE((散户>0),0,散户,2.8,0),COLORFF8800; STICKLINE((散户>0),0,散户,2.5,0),COLORFF9900; STICKLINE((散户>0),0,散散>0),0,散,1.5,0),COLORFFAA00;STICKLINE((户户户,1,0),COLORFFBB00;STICKLINE((散户>0),0,散户,0.7,0),COLORLIBLUE;3、黑马起爆点VAR1:=(CLOSE-MA(CLOSE,21))/MA(CLOSE,21)*100;VAR2:=(CLOSE-LLV(LOW,43))/(HHV(HIGH,43)-LLV(LOW,43))*10 0;VAR3:=SMA(VAR2,2,1);天:100+(-ABS(VAR1)),COLORRED;下:SMA(VAR3,2,1);无:ABS(VAR1),COLORGREEN;敌:50,COLORFFAA00,LINETHICK3;A:80;B:20;买:STICKLINE(CROSS(下,无),3,20,2,0),COLORRED,LINETHICK1;STICKLINE(CROSS(下,无),20,25,2,0),COLORFF9900,LINETHICK1;DRAWTEXT(CROSS(下,无),30,''),COLORFFFFCC;卖:STICKLINE(CROSS(下,天),70,90,2,0),COLORRED,LINETHICK1;STICKLINE(CROSS(下,天),90,99,2,0),COLORFF9900,LINETHICK1;DRAWTEXT(CROSS(下,天),70,''),COLORFFFFCC;选股2:IF(CROSS(下,20),1,0);DRAWICON((CROSS(下,20)),20,1);DRAWICON((CROSS(下,20)),-20,25);4、宁波绝密(相传为宁波涨停敢死队的绝密指标)WOL:IF(CURRBARSCOUNT=1ANDPERIOD=5,VOL*240/FROMOPEN,DRAW NULL),NODRAW;STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,WOL,0,3,-1),COLORF FFFFF;VOLUME:VOL,VOLSTICK;V5:MA(VOLUME,5);V10:MA(VOLUME,10);V135:MA(VOLUME,135);VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));主买:IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*((H IGH-OPEN)+(CLOSE-LOW)),VOL/2)),COLORRED,POINTDOT;主卖:IF(CLOSE>OPEN,VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOS E<OPEN,VAR1*(HIGH-LOW),VOL/2)),COLOR00FF00,POINTDOT; STICKLINE(主买>0,0,主买,2,0),COLORRED;{STICKLINE(主卖>0,主买,VOL,2,1),COLOR00FF80;} STICKLINE(主买<REF(主买,1)AND主买>0,0,主,2,0),COLOR00FFFF;买:VOL/CAPITAL*100,POINTDOT; 换手,20);换手二十日换手:SUM(5、起涨点换手率%:VOL/CAPITAL*100,LINETHICK0,COLORYELLOW;量比:V/(REF(MA(V,5),1)),LINETHICK0,COLORRED;VVOL:=IF(CURRBARSCOUNT=1ANDPERIOD=5,VOL*240/FROMOPEN,DR AWNULL),NODRAW;虚拟量比:VVOL/(REF(MA(V,5),1)),LINETHICK0,COLORRED; 获利比例%:WINNER(C)*100,COLORLIBLUE;%:(C-REF(C,1))/REF(C,1)*100,LINETHICK0;涨幅.换手率%1:=换手率%>5;量比1:=量比>1.5OR虚拟量比>1.5;获利比例%1:=获利比例%>70;涨幅%1:=涨幅%>3;启动:=换手率ND量比1AND获利比例ND涨幅%1;起涨点:IF(启动,101,0)COLORRED,LINETHICK2;6、庄家建仓VAR1:=REF(LOW,1);VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),13,1) *4;VAR3:=EMA(VAR2,13);VAR4:=LLV(LOW,34);VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),3);主力进场:STICKLINE(VAR5>REF(VAR5,1),0,VAR5,7,0),COLORRED;7、出色超赢JRH:=HHV(C,2);JRL:=LLV(C,2);MA3:=MA(CLOSE,3);YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;VAR1:=(CLOSE>REF(CLOSE,1)ANDCLOSE>REF(CLOSE,2));VAR2:=(REF(VAR1,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(C.LOSE,2));VAR3:=(REF(VAR2,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(C LOSE,2));VAR4:=(REF(VAR3,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(C LOSE,2));VAR5:=(REF(VAR4,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(C LOSE,2));VAR6:=(REF(VAR5,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(C LOSE,2));VAR7:=(REF(VAR6,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(C LOSE,2));VAR8:=(REF(VAR7,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(C LOSE,2));VAR9:=(REF(VAR8,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(C LOSE,2));VARA:=(REF(VAR9,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(C LOSE,2));VARB:=(REF(VARA,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(C LOSE,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(C LOSE,2));VARF:=(REF(VARE,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(C LOSE,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(VARDORVAREORVARFORVAR10ORVAR11ORVAR12ORVAR 13ORVAR14ORVAR15ORVAR16ORVAR17ORVAR18,1))ANDVAR1); VAR1A:=((REF(VAR1ORVAR2ORVAR3ORVAR4ORVAR5ORVAR6ORVAR7OR VAR8ORVAR9ORVARAORVARBORVARC,1))ANDVARD);红色持股:VAR1ORVAR2ORVAR3ORVAR4ORVAR5ORVAR6ORVAR7ORVAR8ORVAR9 ORVARAORVARBORVARC,COLOR0000FF,NODRAW;离场:=IF(红色持股,JRL,DRAWNULL);明离场价:=离场,COLORFF99FF,NODRAW;今离场价:=REF(离场,1)COLOR0000FF,NODRAW;青色观望:VARDORVAREORVARFORVAR10ORVAR11ORVAR12ORVAR13ORVAR14O RVAR15ORVAR16ORVAR17ORVAR18,COLORFFFF00,NODRAW;进:=IF(青色观望,JRH,DRAWNULL);明进场价:=进,COLOR33AACC,NODRAW;今进场价:=REF(明进场价,1),COLORFF0000,NODRAW;黄色低买:VAR19,COLOR33AACC,NODRAW;洋红离场:VAR1A,COLORMAGENTA,NODRAW;急跌关注:(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100<-14,COLORWHITE,NODRAW;期日市上年:REF(YEAR,BARSCOUNT(CLOSE)-1),NODRAW,COLOR0000FF; 月:REF(MONTH,BARSCOUNT(CLOSE)-1),NODRAW,COLORFF00FF; 日:REF(DAY,BARSCOUNT(CLOSE)-1),NODRAW,COLOR00FFFF; STICKLINE(ISLASTBARAND(红色持股ORREF(红色持股,1)=1),今离场价,今离场价,30,1),COLOR0000FF;STICKLINE(ISLASTBARAND(青色观望ORREF(青色观望,1)=1),今进场价,今进场价,30,1),COLOR00FF00;STICKLINE(C>=O,L,H,0,0),COLOR0000CC;STICKLINE(C<O,L,H,0,0),COLOR999900;STICKLINE(1,C,O,3.5,0),COLOR858500;STICKLINE(C>=O,C,O,3.5,0),COLOR0000E5;STICKLINE(红色持股,CLOSE,O,2.8,0),COLOR000055; STICKLINE(红色持股,CLOSE,O,2,0),COLOR000088; STICKLINE(红色持股,CLOSE,O,1.5,0),COLOR0000AA; STICKLINE(红色持股,CLOSE,O,1,0),COLOR0000CC; STICKLINE(红色持股,CLOSE,O,0.5,0),COLOR0000EE; STICKLINE(青色观望,CLOSE,O,2.8,0),COLOR555500; STICKLINE(青色观望,CLOSE,O,2,0),COLOR888800; STICKLINE(青色观望,CLOSE,O,1.5,0),COLORAAAA00; STICKLINE(青色观望,CLOSE,O,1,0),COLORCCCC00;STICKLINE(青色观望,CLOSE,O,0.5,0),COLOREEEE00;CO:=(C-O);STICKLINE(急跌关注,O,C-CO/2,2.8,0),COLOR555555; STICKLINE(急跌关注,O,C-CO/2,2,0),COLOR888888; STICKLINE(急跌关注,O,C-CO/2,1.5,0),COLORAAAAAA; STICKLINE(急跌关注,O,C-CO/2,1,0),COLORCCCCCC; STICKLINE(急跌关注,O,C-CO/2,0.5,0),COLOREEEEEE; STICKLINE(黄色低买,O,O+CO/3,2.8,0),COLOR335555; STICKLINE(黄色低买,O,O+CO/3,2,0),COLOR338888; STICKLINE(黄色低买,O,O+CO/3,1.5,0),COLOR33AAAA; STICKLINE(黄色低买,O,O+CO/3,1,0),COLOR33CCCC; STICKLINE(黄色低买,O,O+CO/3,0,0),COLOR33EEEE; STICKLINE(洋红离场,O,O+CO/3,2.8,0),COLOR550055; STICKLINE(洋红离场,O,O+CO/3,2,0),COLOR880088; STICKLINE(洋红离场,O,O+CO/3,1.5,0),COLORAA00AA; STICKLINE(洋红离场,O,O+CO/3,1,0),COLORCC00CC; STICKLINE(洋红离场,O,O+CO/3,0.5,0),COLOREE00EE;压力:MA(REF(HHV(C,30),1),2),POINTDOT,COLOR9DFFFF;支撑:MA(REF(LLV(C,30),1),2),POINTDOT,COLORABFF46; PMA:MA(C,5),COLORWHITE,LINETHICK2;IF(PMA>REF(PMA,1),PMA,DRAWNULL),COLORRED,LINETHICK2; IF(PMA<REF(PMA,1),PMA,DRAWNULL),COLORGREEN,LINETHICK2;X:=(3*C+L+O+H)/6;空多线:(20*X+19*REF(X,1)+18*REF(X,2)+17*REF(X,3)+16*REF(X,4 )+15*REF(X,5)+14*REF(X,6)+13*REF(X,7)+12*REF(X,8)+11*REF(X,9)+10*REF(X,10)+9*REF (X,11)+8*REF(X,12)+7*REF(X,13)+6*REF(X,14)+5*REF(X,15)+4*REF(X,16)+3*REF( X,17)+2*REF(X,18)+REF(X,20))/210,COLORFF00FF,LINETHICK2;DD:=多空线<REF(多空线,1);IF(DD,多空线,DRAWNULL),COLOR00FFFF,LINETHICK2;A:=(PMA>多空线);IF(A,多空线,DRAWNULL),COLOR33FF33,POINTDOT,LINETHICK4; RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; K:=SMA(RSV,9,1);D:=SMA(K,9,1);J:=3*K-2*D;X2:=LLV(J,2)=LLV(J,8);Y:=IF(CROSS(J,REF(J+0.01,1))ANDX2ANDJ<20,30,0); DRAWTEXT(CROSS(J,REF(J+0.01,1))ANDX2ANDJ<20,LOW*0.98,'★'),COLORYELLOW;8、彩色成交量STICKLINE(VOL>0,VOL,0,3,0),COLOR333333;STICKLINE(VOL>0,VOL,0,2.5,0),COLOR998855;STICKLINE(VOL>0,VOL,0,1.7,0),COLORBBAA77;STICKLINE(VOL>0,VOL,0,0.9,0),COLORDDCC99;STICKLINE(VOL>0,VOL,0,0.04,0),COLORFFEEBB;换手:=VOL/CAPITAL*100,COLORRED;STICKLINE(换手>2,VOL,CAPITAL*0.02,3,0),COLOR00AAAA; STICKLINE(换手>2,VOL,CAPITAL*0.02,2.5,0),COLOR00CCCC; STICKLINE(换手>2,VOL,CAPITAL*0.02,1.7,0),COLOR00EEEE; STICKLINE(换手>2,VOL,CAPITAL*0.02,0.08,0),COLOR00FFFF; STICKLINE(换手>4,VOL,CAPITAL*0.04,3,0),COLOR009900; STICKLINE(换手>4,VOL,CAPITAL*0.04,2.5,0),COLOR00BB00; STICKLINE(换手>4,VOL,CAPITAL*0.04,1.7,0),COLOR00DD00; STICKLINE(换手>4,VOL,CAPITAL*0.04,0.8,0),COLOR00FF00; STICKLINE(换手>7,VOL,CAPITAL*0.07,3,0),COLORBROWN; STICKLINE(换手>7,VOL,CAPITAL*0.07,2.5,0),COLOR0000AA; STICKLINE(换手>7,VOL,CAPITAL*0.07,1.7,0),COLOR0000CC; STICKLINE(换手>7,VOL,CAPITAL*0.07,0.8,0),COLOR0000DD; 五天均量:MA(VOL,5),COLORRED,LINETHICK0.01;廿天均量:MA(VOL,20),COLORWHITE,LINETHICK0.01;HSS:=V/CAPITAL*100,NODRAW;{显示当日换手}五天换手率:SUM(HSS,5),NODRAW;廿天换手率:SUM(HSS,20),NODRAW;抛压:STICKLINE(CROSS(84,RSI),0,VOL,1.5,0),COLORBLUE,LINET HICK5;V24:MA(VOL,24),COLORLIBLUE;V10:MA(VOL,10),COLORRED;V3:MA(VOL,3),COLORLIGRAY;9、涨停回马枪(有主图)均价线:=AMOUNT/V/100;C2:=REF(C,1);涨停:=IF(REF(C,1)*1.1-C<0.01,1,0);STICKLINE(涨停,0,5,6,0),COLORYELLOW;DRAWTEXT(涨停,8,'涨停'),COLORYELLOW;MA13:=MA(C,13),COLORGRAY;MA21:=MA(C,21),COLORWHITE;支撑线:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24)) /4;LC:=REF(CLOSE,1);操作线:=SMA(MAX(CLOSE-LC,0),2,1)/SMA(ABS(CLOSE-LC),2,1)*100 ;趋势:=SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*1线00;震仓线:=45;震仓线2:=50;逃命线:=80;抄底线:=20;绝底线:=5;PP2:=操作线<震仓线2ANDREF(操作线,1)>震仓线2;PP:=操作线<震仓线ANDREF(操作线,1)>震仓线;PP3:=操作线<抄底线ANDREF(操作线,1)>抄底线;HH:=COUNT(涨停,13)>=1;STICKLINE(PP2ANDHH,0,5,3,0),COLORRED;STICKLINE(PPANDHH,0,5,3,0),COLORRED;STICKLINE(PP3ANDHH,0,5,3,0),COLORRED;DRAWTEXT(PP2ANDHH,8,'预警'),COLORRED;DRAWTEXT(PPANDHH,8,'预警'),COLORRED;DRAWTEXT(PP3ANDHH,8,'预警'),COLORRED;A:=SMA(L,4,3);绿色买入:IF(((AANDREF(PP,1)ANDHH)OR(AANDREF(PP3,1)ANDHH)),1,0);STICKLINE(AANDREF(PP,1)ANDHH,0,10,1,0),COLORGREEN; DRAWICON(AANDREF(PP,1)ANDHH,12,1);STICKLINE(AANDREF(PP3,1)ANDHH,0,10,1,0)COLORGREEN; DRAWICON(AANDREF(PP3,1)ANDHH,12,1);10、海风3号M1:=MA(CLOSE,1);M2:=(LOW+HIGH+CLOSE)/3;M3:=MA(M2,5);M4:=HHV(M3,10);Z:=HHV((M1<M4),10)ORHHV((M1<M4),10);S:=EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,35)-LLV(LOW,34 )),3);DRAWTEXT(FILTER(CROSS(S,60),20),L*0.98,'▲'),COLORYELLOW;'),COLORBLUE; ★{DRAWTEXT(FILTER(Z,9),H*1.028,'STICKLINE(S>60,O,C,4,0), COLORFF9BFB;}STICKLINE(S>60,O,C,2,0),COLORRED;{STICKLINE(S>60,O,C,1.5,0),COLORFD9BFB;}STICKLINE(S>60,H,L,0,0),COLORRED;{STICKLINE(S<60,O,C,4,0),COLOR01DC38;STICKLINE(S<60,O,C,2.5,0),COLOR01FE41;}STICKLINE(S<60,O,C,2,0),COLORGREEN;STICKLINE(S<60,H,L,0,0),COLORGREEN;VAR1:MA(CLOSE,5);VAR2:MA(CLOSE,10);VAR3:MA(CLOSE,20);VAR60:MA(CLOSE,60);VAR120:MA(CLOSE,120);VAR4:=OPEN<VAR1OROPEN<VAR2OROPEN<VAR3;VAR5:=CLOSE>MAX(VAR1,MAX(VAR2,MAX(VAR3,VAR60)));VAR6:=VOL/MA(VOL,30)>1.2;VAR7:=CLOSE/REF(CLOSE,1)>1.049;VAR8:=VAR4ANDVAR5ANDVAR6ANDVAR7;VAR9:=VAR8AND(REF(BARSLAST(VAR8),1)>60ORBARSSINCE(VAR8) =0);DRAWICON(VAR9,L*0.98,1);STICKLINE(VAR9,O,C,6,0),COLORYELLOW;STICKLINE(VAR9,H,L,0.6,0),COLORYELLOW;11、涨停时间窗(通达信金融终端副图)N:=13;WR大于80考虑买:100*(HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N)),LINETHICK0;均价:AMOUNT/(VOL*100),LINETHICK0,COLORYELLOW;ZT:=C/REF(C,1)>1.097;XH:=FILTER(ZT,13);BH:=BARSLAST(ZT);STICKLINE(ZT,0,L*1,3,0),COLORYELLOW;DRAWTEXT(ZT,L*1.1,'涨停'),COLORF00FF0;VARZT:=BARSLAST(C/REF(C,1)>1.097);AA:=BETWEEN(C,REF(L,BH)*1.01,REF(L,BH)*0.987); STICKLINE(AA,0,L*0.5,2,0),COLORBLUE;DRAWTEXT(AA,L*0.6,'警戒'),COLORWHITE;STICKLINE(AAANDVARZT=2,0,L*0.8,2,0),COLORRED; DRAWTEXT(AAANDVARZT=2,L*0.9,'时间窗'),COLORWHITE; STICKLINE(AAANDVARZT=4,0,L*0.8,2,0),COLORRED; DRAWTEXT(AAANDVARZT=4,L*0.9,'时间窗'),COLORWHITE; STICKLINE(AAANDVARZT=7,0,L*0.8,2,0),COLORRED; DRAWTEXT(AAANDVARZT=7,L*0.9,'时间窗'),COLORWHITE; STICKLINE(AAANDVARZT=12,0,L*0.8,2,0),COLORRED; DRAWTEXT(AAANDVARZT=12,L*0.9,'时间窗'),COLORWHITE; STICKLINE(AAANDVARZT=20,0,L*0.8,2,0),COLORRED; '),COLORWHITE;时间窗DRAWTEXT(AAANDVARZT=20,L*0.9,'。
通达信副图神笔(附源码)
通达信副图神笔(附源码)通达信副图神笔(附源码)VV:=(C+L+H)/3;DSA:=SMA(EMA(VV,2),2,1)LINETHICK2,COLORRED;Y396:=DSA;险1:=Y396*1.1,COLORLIRED;险2:=Y396*1.125,COLORLIRED;险3:=Y396*1.15,COLORLIRED;良1:=Y396*0.9,COLORLIBLUE;良2:=Y396*0.875,COLORLIBLUE;良3:=Y396*0.85,COLORLIBLUE;变色:=IF(Y396<REF(Y396,1),Y396,DRAWNULL),LINETHICK2,COLOR BLUE;{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);}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,5);WSR14:=H>险3;DRAWICON(WSR14 AND FILTER(WSR14,15),H+0.03,6);WSR15:=H<险 3 AND H>险2;DRAWICON(WSR15 AND FILTER(WSR15,5),H+0.03,4);WSR16:=(INDEXC-MA(INDEXC,3))/MA(INDEXC,3);WSR17:=(INDEXC-MA(INDEXC,8))/MA(INDEXC,8);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);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;{DRAWICON(WSR61 AND H<Y396 AND FILTER(WSR61,5),良3,7);DRAWTEXT(WSR61 AND H<Y396 AND FILTER(WSR61,5),良3,'良机');}N1:=20;N2:=10;N3:=5;STICKLINE(CLOSE>REF(CLOSE,1)*1.095 AND CLOSE=HIGH,CLOSE,OPEN,2,1),COLOR0000FF;{涨停} STICKLINE(CLOSE<REF(CLOSE,1)*0.9015 AND CLOSE=LOW,CLOSE,OPEN,2,1),COLORGREEN;{跌停};GJ:=(C+H+L+O)/4;明日阻力:=L+(GJ-L)+(C-L);明日支撑:=L+(C-GJ);今日阻力:REF(明日阻力 , 1),NODRAW;今日支撑:REF(明日支撑 , 1),NODRAW;STICKLINE(ISLASTBAR AND C>=今日阻力,今日阻力,今日阻力,10,1),COLOR0000FF;STICKLINE(ISLASTBAR AND C<今日阻力,今日阻力,今日阻力,10,1),COLOR00FF00;STICKLINE(ISLASTBAR AND C>=今日支撑,今日支撑,今日支撑,10,1),COLORFF00FF;STICKLINE(ISLASTBAR AND C<今日支撑,今日支撑,今日支撑,10,1),COLORFF8800;AA:=REF(H,N1)=HHV(H,2*N1+1);QY:=BACKSET(AA,N1+1);CC:=FILTER(QY,N1) AND H=HHV(H,N1+1);DDD:=BARSLAST(CC);GDTS:=IF(CC,CURRBARSCOUNT,0);DINGBU:=IF(DDD,REF(H,DDD),H);{顶部}DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);DINGBU1:=REF(DINGBU,DDD+1);GDCS1:=CONST(DINGBUTS);DINGBUTS1:=REF(DINGBUTS,DDD+1);GDCS2:=CONST(DINGBUTS1);DINGBU2:=REF(DINGBU1,DDD+1);MM:=IF(CURRBARSCOUNT>GDCS2,0,1);高点压力:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT= GDCS1,H,1),COLORRED;DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H, GDCS2-1),1),COLOR00FF00,POINTDOT,LINETHICK2;DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H, GDCS1-1),1),COLOR00FF00,POINTDOT,LINETHICK2;AA1:=REF(L,N1)=LLV(L,2*N1+1);QY1:=BACKSET(AA1,N1+1);CC1:=FILTER(QY1,N1) AND L=LLV(L,N1+1);DD1:=BARSLAST(CC1);DDTS:=IF(CC1,CURRBARSCOUNT,0);YDB:=IF(DD1,REF(L,DD1),L);DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);DDCS1:=CONST(DDTS1);ZDB:=REF(YDB,DD1+1);DDTS2:=REF(DDTS1,DD1+1);DDCS2:=CONST(DDTS2);低点支撑:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT= DDCS1,L,1) COLORRED;DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,REF(L,D DCS2-1),1),COLOR00FF00,POINTDOT,LINETHICK2;DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,D DCS1-1),1),COLOR00FF00,POINTDOT,LINETHICK2;LAA:=REF(H,N2)=HHV(H,2*N2+1);LQY:=BACKSET(LAA,N2+1);LCC:=FILTER(LQY,N2) AND H=HHV(H,N2+1);LDDD:=BARSLAST(LCC);LGDTS:=IF(LCC,CURRBARSCOUNT,0);LDINGBU:=IF(LDDD,REF(H,LDDD),H);{顶部}LDINGBUTS:=IF(LDDD,REF(LGDTS,LDDD),LGDTS);LDINGBU1:=REF(LDINGBU,LDDD+1);LGDCS1:=CONST(LDINGBUTS);LDINGBUTS1:=REF(LDINGBUTS,LDDD+1);LGDCS2:=CONST(LDINGBUTS1);LDINGBU2:=REF(LDINGBU1,LDDD+1);LMM:=IF(CURRBARSCOUNT>LGDCS2,0,1);压力:DRAWLINE(CURRBARSCOUNT=LGDCS2,H,CURRBARSCOUNT =LGDCS1,H,1),COLORFF0000;DRAWLINE(CURRBARSCOUNT=LGDCS2,H,ISLASTBAR,REF(H ,LGDCS2-1),1),COLOR00FF00,POINTDOT;DRAWLINE(CURRBARSCOUNT=LGDCS1,H,ISLASTBAR,REF(H ,LGDCS1-1),1),COLOR00FF00,POINTDOT;LAA1:=REF(L,N2)=LLV(L,2*N2+1);LQY1:=BACKSET(LAA1,N2+1);LCC1:=FILTER(LQY1,N2) AND L=LLV(L,N2+1);LDD1:=BARSLAST(LCC1);LDDTS:=IF(LCC1,CURRBARSCOUNT,0);LYDB:=IF(LDD1,REF(L,LDD1),L);LDDTS1:=IF(LDD1,REF(LDDTS,LDD1),LDDTS);LDDCS1:=CONST(LDDTS1);LZDB:=REF(LYDB,LDD1+1);LDDTS2:=REF(LDDTS1,DD1+1);LDDCS2:=CONST(LDDTS2);支撑:DRAWLINE(CURRBARSCOUNT=LDDCS2,L,CURRBARSCOUNT =LDDCS1,L,1),COLORFF0000;ZGSTAR:=(压力+支撑)/2;ZGEND:=CONST((压力+支撑)/2);STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR, ZGEND,1),COLORWHITE;LLAA:=REF(H,N3)=HHV(H,2*N3+1);LLQY:=BACKSET(LLAA,N3+1);LLCC:=FILTER(LLQY,N3) AND H=HHV(H,N3+1);LLDDD:=BARSLAST(LLCC);LLGDTS:=IF(LLCC,CURRBARSCOUNT,0);LLDINGBU:=IF(LLDDD,REF(H,LLDDD),H);{顶部}LLDINGBUTS:=IF(LLDDD,REF(LLGDTS,LLDDD),LLGDTS);LLDINGBU1:=REF(LLDINGBU,LLDDD+1);LLGDCS1:=CONST(LLDINGBUTS);LLDINGBUTS1:=REF(LLDINGBUTS,LLDDD+1);LLGDCS2:=CONST(LLDINGBUTS1);LLDINGBU2:=REF(LLDINGBU1,LLDDD+1);LLMM:=IF(CURRBARSCOUNT>LGDCS2,0,1);L压力:DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,CURRBARSCOUN T=LLGDCS1,H,1) COLORFF0000;DRAWLINE(CURRBARSCOUNT=LLGDCS2,H,ISLASTBAR,REF( H,LLGDCS2-1),1),COLOR00FF00,POINTDOT;DRAWLINE(CURRBARSCOUNT=LLGDCS1,H,ISLASTBAR,REF( H,LLGDCS1-1),1),COLOR00FF00,POINTDOT;LLAA1:=REF(L,N3)=LLV(L,2*N3+1);LLQY1:=BACKSET(LLAA1,N3+1);LLCC1:=FILTER(LLQY1,N3) AND L=LLV(L,N3+1);LLDD1:=BARSLAST(LCC1);LLDDTS:=IF(LLCC1,CURRBARSCOUNT,0);LLYDB:=IF(LLDD1,REF(L,LLDD1),L);LLDDTS1:=IF(LLDD1,REF(LLDDTS,LLDD1),LDDTS);LLDDCS1:=CONST(LLDDTS1);LLZDB:=REF(LLYDB,LLDD1+1);LLDDTS2:=REF(LLDDTS1,DD1+1);LLDDCS2:=CONST(LLDDTS2);L支撑:DRAWLINE(CURRBARSCOUNT=LLDDCS2,L,CURRBARSCOUNT =LLDDCS1,L,1) COLORYELLOW;LZGSTAR:=(L压力+L支撑)/2;LZGEND:=CONST((L压力+L支撑)/2);LSTARDAY:=IF(LLDDCS2<LLGDCS2,LLDDCS2,LLGDCS2);L中轨:DRAWLINE(CURRBARSCOUNT=LSTARDAY,LZGSTAR,ISLASTBA R,LZGEND,1),COLORYELLOW;{A:=DRAWLINE(LOW<=LLV(LOW,120),LOW,HHV(H,6)<=HH V(H,10),LLV(LOW,6),1),COLORBLUE ,LINETHICK2;}A:=(3*C+L+O+H)/6;TY:=C;成本:=(MA(CLOSE,60)+MA(CLOSE,70)+MA(CLOSE,90)+MA(CLOSE, 108))/4,COLORRED,LINETHICK2;MA0:MA(C,0)COLORYELLOW ,LINETHICK2;K:=(C+H+L)/3;D:=MA(K,4);阻力:=HHV(D,55),COLORYELLOW,LINETHICK2;顶部:=HHV(H*0.98,55)COLORFFFFFF,LINETHICK2;DRAWICON(REF(C,1)<D AND C>D AND D<REF(D,1),L*0.98,1),COLORYELLOW,LINETHICK2 ;{均线}TYP:= (HIGH + LOW +2* C)/4;均线:=EMA(TYP,3),LINETHICK2,COLORWHITE;均线上轨:=HHV(均线,14),LINETHICK2,COLORYELLOW;均线下轨:=LLV(均线,14),LINETHICK2,COLORGREEN;角度:=ATAN((均线/REF(均线,1)-1)*100)*180/3.1416;{K线优化}STICKLINE(CLOSE>=OPEN,HIGH,LOW,0,1 ),COLOR5B5BFF;STICKLINE(CLOSE>=OPEN,OPEN,CLOSE,2.7,0 ),COLOR0000C C;STICKLINE(CLOSE>=OPEN,OPEN,CLOSE,2,0 ),COLOR0E0EFF;STICKLINE(CLOSE>=OPEN,OPEN,CLOSE,1.2,0 ),COLOR4848F F;STICKLINE(CLOSE>=OPEN,OPEN,CLOSE,0.6,0 ),COLOR7878F F;STICKLINE(CLOSE>=OPEN,OPEN,CLOSE,0.1,0 ),COLORA1A1 FF;STICKLINE(CLOSE>=OPEN,OPEN,CLOSE,0,0 ),COLORCACAFF ;STICKLINE(CLOSE< OPEN,HIGH,LOW,0,1 ),COLORCYAN;STICKLINE(CLOSE<OPEN,OPEN,CLOSE,2.7,0 ),COLOR990000;STICKLINE(CLOSE<OPEN,OPEN,CLOSE,2,0 ),COLORCC0000;STICKLINE(CLOSE<OPEN,OPEN,CLOSE,1.2,0 ),COLORFF4400;STICKLINE(CLOSE<OPEN,OPEN,CLOSE,0.6,0 ),COLORFF8800;STICKLINE(CLOSE<OPEN,OPEN,CLOSE,0.1,0 ),COLORFFCC00;STICKLINE(CLOSE< OPEN,OPEN,CLOSE,0,0 ),COLORCYAN;X:=(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*RE F(A,17)+2*REF(A,18)+REF(A,20))/210;MTM:=C-REF(C,1);DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);CB:=EMA(X,13);买:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);DRAWICON(FILTER(买=1,5),L*0.97,1);{DT1:=C>REF(C,N);DT2:=C>REF(C,M);STICKLINE(DT2,H,L,0,0),COLORRED;STICKLINE(DT2=0,H,L,0,0),COLORBLUE;STICKLINE(DT1,H,MAX(O,C),0,0),COLORRED;STICKLINE(DT1=0,L,MIN(O,C),0,0),COLORBLUE;STICKLINE(DT2,O,C,2.5,0),COLORRED;STICKLINE(DT2=0,O,C,2.5,0),COLORLUE;STICKLINE(DT1,(O+C)/2,O,2.5,0),COLORRED;STICKLINE(DT1=0,(O+C)/2,C,2.5,0),COLORBLUE;};。
最牛通达信量化副图指标公式源码
最牛通达信量化副图指标公式源码
通达信量化副图指标公式源码有很多,以下是其中一些常用的指标公式源码:
1.MACD指标源码:
```
EMA(CLOSE,12)-EMA(CLOSE,26);
```
2.RSI指标源码:
```
SMA(MAX(CLOSE-LAST(CLOSE),0),N,1)/SMA(ABS(CLOSE-
LAST(CLOSE)),N,1)*100;
```
3.KDJ指标源码:
```
RSV:=100*(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N));
K:SMA(RSV,M1,1);
D:SMA(K,M2,1);
J:3*K-2*D;
```
4.BOLL指标源码:
```
BOLL:MA(CLOSE,N);
UB:BOLL+2*STD(BOLL,N);
LB:BOLL-2*STD(BOLL,N);
```
5.WR指标源码:
```
WR(N):100*(HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N));
```
6.OBV指标源码:
```
SUM(IF(CLOSE>REF(CLOSE,1),VOLUME,IF(CLOSE<REF(CLOSE,1),-VOLUME,0)),N);
```
以上是一些常见的通达信量化副图指标的源码,通过这些源码可以实现对应的指标计算。
需要注意的是,不同的量化策略会使用不同的指标,源码可能会有一定差异。
此外,这些源码只是指标的计算公式,并不包含完整的通达信指标的绘图等功能代码。
通达信量能趋势副图指标源码
通达信量能趋势副图指标源码RV:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;RG:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100;J0:=(HIGH+LOW)/2;QJ:=EMA(J0,3);J1:=IF(CLOSE>QJ,VOL,0);J2:=IF(CLOSE<QJ,VOL,0);量能:IF(CAPITAL<1,MA(VOL,74),MA(SUM(J1-J2,22),3)),COLOR00DDDD,NODRAW;趋势:IF(CAPITAL<1,EMA(量能,360),EMA(量能,21)),COLOR008800,NODRAW;VAR3:=(量能-趋势);VAR44:=SMA(RV,3,1);VAR55:=SMA(VAR44,3,1);STICKLINE(VAR3>0,20,10,5,1),COLOR0000FF;STICKLINE(VAR3<0,100,90,10,1),COLOR00FF00;DRAWICON(CROSS(VAR44,VAR55) AND VAR55<30,2,1);DRAWICON(CROSS(VAR55,VAR44) AND VAR55>30,97,2);DRAWBAND(VAR55,RGB(0,22,224),VAR44,RGB(255,50,50));遵:IF(VAR55>=VAR44,VAR55,DRAWNULL),COLORRED;守:IF(VAR44>=VAR55,VAR44,DRAWNULL),COLORFF9900;纪:IF(VAR55>=VAR44,VAR44,DRAWNULL),COLOR00FFFF;律:IF(VAR44>=VAR55,VAR55,DRAWNULL),COLOR00FF00;KK:=EMA(SMA(RG,3,1),2),LINETHICK0;DD:=SMA(KK,3,1),LINETHICK0;DRAWBAND(KK,RGB(155,50,50),DD,RGB(0,100,50));持:IF(KK>=DD,KK,DRAWNULL),COLORRED;观:IF(DD>=KK,DD,DRAWNULL),COLORFF9900;股:IF(KK>=DD,DD,DRAWNULL),COLOR00FFFF;望:IF(DD>=KK,KK,DRAWNULL),COLOR00FF00;DRAWICON(CROSS(KK,DD),KK,23);DRAWTEXT(CROSS(VAR44,VAR55) AND CROSS(KK,DD),10,'共振'),COLOR00FFFF;共振点:=(CROSS(VAR44,VAR55) AND CROSS(KK,DD));STICKLINE(共振点>0,0,30,2,0),COLOR008888;STICKLINE(共振点>0,0,30,1.5,0),COLOR00AAAA;STICKLINE(共振点>0,0,30,0.8,0),COLOR00DDDD;STICKLINE(共振点>0,0,30,0.3,0),COLOR00FFFF;VAR1:=1;VAR2:=((((2*CLOSE)+HIGH)+LOW) / 4);低金叉进:20,COLORFF00FF,LINETHICK2;高死叉出:90,COLORBLUE,LINETHICK2;VAR4:=LLV(LOW,5);VAR5:=HHV(HIGH,4);C1:=(EMA((((VAR2-VAR4)/(VAR5-VAR4))*100),4)*VAR1),COLORFF00FF,LINETHICK2;C2:=(EMA(((0.667*REF(C1,1))+(0.333*C1)),2)*VAR1),COLORF FFFFF,LINETHICK2;条件:=CROSS(C1,C2) AND C1<40;条件0:=CROSS(C2,C1) AND C1>90;TJ1:=CROSS(C1,C2);TJ2:=CROSS(C2,C1);TJ3:=CROSS(C1,C2) AND REF(C1,1)<20;TJ4:=CROSS(C2,C1) AND REF(C1,1)>80;DRAWTEXT(FILTER((REF(条件,1) AND (REF(LOW,1)>LOW OR TJ2))OR (REF(条件,2) AND (REF(LOW,2)>LLV(LOW,3) OR TJ2))OR (REF(条件,3) AND (REF(LOW,3)>LLV(LOW,4) OR TJ2)),4),70,'止'),COLORRED;{DRAWTEXT(FILTER((REF(条件,1) AND (REF(LOW,1)>LOW OR TJ2))OR (REF(条件,2) AND (REF(LOW,2)>LLV(LOW,3) OR TJ2))OR (REF(条件,3) AND (REF(LOW,3)>LLV(LOW,4) OR TJ2)),4),60,'跌'),COLORRED;}DRAWTEXT(FILTER((REF(条件,1) AND (REF(LOW,1)>LOW OR TJ2)) OR(REF(条件,2) AND (REF(LOW,2)>LLV(LOW,3) OR TJ2))OR (REF(条件,3) AND (REF(LOW,3)>LLV(LOW,4) OR TJ2)),4),65,'买'),COLORRED;DRAWTEXT(条件,20,'买'),COLORRED;STICKLINE(条件,0,20,2,0),COLORRED;DRAWTEXT(条件0,85,'卖'),COLORBLUE;DRAWTEXT(CROSS(C1,75),70,'险区'),COLORGREEN;DRAWTEXT(TJ3,65,'安'),COLORRED;DRAWTEXT(TJ3,60,'买'),COLORRED;DRAWTEXT(TJ4,85,'逃顶'),COLORBLUE;STICKLINE(TJ4,100,80,2,0),COLORGREEN;VAR200:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;VAR300:=SMA(SMA(VAR200,3,1),3,1)/28.57;VAR400:=EMA(VAR300,5);操盘:=3*VAR300-2*VAR400;A1:=CROSS(操盘,VAR300) AND VAR300<2.1 AND C>O;STICKLINE(A1,20,0,4,0),COLOR770077;STICKLINE(A1,20,0,3,0),COLOR990099;STICKLINE(A1,20,0,2,0),COLORBB00BB;STICKLINE(A1,20,0,1,0),COLORDD00DD;STICKLINE(A1,20,0,0.3,0),COLORFF00FF;DRAWTEXT(A1,30,'财'),COLORFF00FF;★遵守纪律★:100,COLORRED,NODRAW;★交易之魂★:100,COLORRED,NODRAW;。
通达信全仓买副图源码指标公式
STICKLINE(C>0,-100,150,100,0),COLOR334400;RSV:=(((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 100);短期底部:=LLV(OPEN,30);K:SMA(RSV,3,1),COLORFFFFFF;D:SMA(K,3,1),COLOR00FFFF;J:3*K-2*D,COLOR33FF33;AA10:=MA(CLOSE,10);AA12:=MA(CLOSE,12);BB10:=((ATAN((AA10 - REF(AA10,1))) * 3.1416) * 10);BB12:=((ATAN((AA12 - REF(AA12,1))) * 3.1416) * 10);MA13:=MA(CLOSE,13);80,POINTDOT,COLOR00FF00,LINETHICK4;VAR2:=(((CLOSE - MA(CLOSE,6)) / MA(CLOSE,6)) * 100);VAR3:=(((CLOSE - MA(CLOSE,12)) / MA(CLOSE,12)) * 100);VAR4:=(((CLOSE - MA(CLOSE,24)) / MA(CLOSE,24)) * 100);VAR5:=(((VAR2 + (2 * VAR3)) + (3 * VAR4)) / 6);VAR6:=MA(VAR5,3);底部1:IF(VAR6 ,20,0),POINTDOT,COLORFFFF00,LINETHICK4;STICKLINE((CROSS(J,K) AND (底部1 >= 20)),100,0,2,0),COLORFFFFFF; DRAWICON((CROSS(J,K) AND (底部1 >= 20)),100,1);DRAWTEXT((CROSS(J,K) AND (底部1 >= 20)),98,'--全仓');DRAWTEXT((VAR6 <= (0 - 15)),80,'买'),COLORFFFFFF;IF((K>D),K,DRAWNULL),COLORFF00FF;IF((J>D),J,DRAWNULL),LINETHICK2,COLOR0000FF;VAR7:=DMA(EMA(CLOSE,12),((SUM(VOL,5) / 3) / CAPITAL));VAR8:=(((CLOSE - VAR7) / VAR7) * 100);VAR9:=((((REF(VAR8,1) < (0 - 40)) AND (VAR8 > REF(VAR8,1))) AND (REF(VAR8,1) <REF(VAR8,2))) AND ((VAR8 - REF(VAR8,1)) > 2.5));VARA:=(((CLOSE - MA(CLOSE,6)) / MA(CLOSE,6)) * 100);VARB:=(((CLOSE - MA(CLOSE,12)) / MA(CLOSE,12)) * 100);VARC:=(((CLOSE - MA(CLOSE,24)) / MA(CLOSE,24)) * 100);VARD:=REF(CLOSE,1);VARE:=((SMA(MAX((CLOSE - VARD),0),5,1) / SMA(ABS((CLOSE - VARD)),5,1)) * 100); VARF:=(((HIGH + LOW) + CLOSE) / 3);VAR10:=((VARF - MA(VARF,14)) / (0.015 * AVEDEV(VARF,14)));VAR11:=(((((MA(AMOUNT,5) / MA(VOL,5)) / 100) - ((MA(AMOUNT,110) / MA(VOL,110)) / 100)) / ((MA(AMOUNT,5) / MA(VOL,5)) / 100)) < (0 - 0.273));VAR12:=(((CLOSE - MA(CLOSE,30)) / MA(CLOSE,30)) < (0 - 0.125));VAR13:=(VAR11 AND VAR12);VAR14:=((((VARA >= (0 - 45)) AND (VARA <= (0 - 10))) AND (VARB <= (0 - 15))) AND (VARC <= (0 - 20)));VAR15:=(COUNT(VAR14,1) >= 1);VAR16:=(VAR13 AND VAR15);VAR17:=1;VAR18:=(CLOSE * VOL);VAR19:=EMA((((((MA(VAR18,4) / MA(VOL,4)) + (MA(VAR18,6) / MA(VOL,6))) + (MA(VAR18,13) / MA(VOL,13))) + (MA(VAR18,24) / MA(VOL,24))) / 4),1);VAR1A:=(1 * VAR19);VAR1B:=(VAR19 * 0.92);VAR1C:=EMA(CLOSE,34);VAR1D:=MA((VAR1C * 1.12),5);VAR1E:=MA((VAR1C * 0.82),5);VAR1F:=(CLOSE < VAR1E);VAR20:=((((((MA(AMOUNT,5) * VAR17) / MA(VOL,5)) / 100) - ((MA(AMOUNT,125) / MA(VOL,125)) / 100)) / ((MA(AMOUNT,5) / MA(VOL,5)) / 100)) < ((0 - 0.4) * VAR17)); VAR21:=HHV(HIGH,500);VAR22:=LLV(LOW,500);VAR23:=HHV(HIGH,250);VAR24:=LLV(LOW,250);VAR25:=HHV(HIGH,125);VAR26:=LLV(LOW,125);VAR27:=MA(((((((VAR21 * 0.45) + (VAR23 * 0.5)) + VAR22) + VAR24) + VAR26) / 5),35); VAR28:=MA((((VAR23 * 0.62) + VAR26) / 2),35);VAR29:=MA((((VAR23 * 0.75) + VAR26) / 2),18);VAR2A:=MA((((((VAR23 * 0.93) + (VAR27 * 2)) + (VAR28 * 1.8)) + (VAR29 * 1.5)) / 4),18);VAR2B:=MA(((((VAR21 * 0.95) + (VAR27 * 3)) + (VAR28 * 2)) / 3),35);VAR2C:=VAR27;VAR2D:=VAR28;VAR2E:=VAR29;VAR2F:=VAR2A;VAR30:=VAR2B;VAR31:=((CLOSE - REF(MA(CLOSE,20),11)) < (0 - 2));VAR32:=(INDEXA / 100000000);VAR33:=INDEXADV;VAR34:=INDEXDEC;VAR35:=((VAR18 / (VAR18 + VAR19)) * VAR17);VAR36:=((VAR19 / (VAR18 + VAR19)) * VAR17);VAR37:=EMA(VAR35,10);VAR38:=EMA(VAR36,10);VAR39:=EMA(VAR37,10);VAR3A:=EMA(VAR38,20);VAR3B:=EMA(VAR37,3);VAR3C:=EMA(VAR39,6);VAR3D:=EMA(VAR3A,2);VAR3E:=(VAR3C - VAR3D);VAR3F:=(((VAR3C - REF(VAR3C,1)) > 0) AND ((REF(VAR3C,1) - REF(VAR3C,2)) < 0)); VAR40:=IF((CROSS(VAR3B,VAR3C) AND (VAR3C <= 20)),30,0);VAR41:=VAR40;VAR42:=(SMA(((AMOUNT / VOL) / 100),13,1) * 1.15);VAR43:=(SMA(((AMOUNT / VOL) / 100),13,1) * 0.85);VAR44:=(CLOSE - REF(MA(CLOSE,20),11));VAR45:=(((((((((((((CLOSE < VAR1E) AND VAR20) AND (CLOSE < VAR43)) OR (((CLOSE < VAR1E) AND VAR31) AND VAR20)) OR ((CLOSE < VAR1E) AND (CLOSE < VAR43))) OR (((CLOSE < VAR1E) AND VAR20) AND (CLOSE < VAR43))) OR (VAR20 AND (CLOSE < VAR2C))) OR ((VAR20 AND VAR31) AND (VAR44 < (0 - 1.5)))) OR (VAR20 AND (CLOSE < VAR1E))) OR (VAR20 AND (VAR44 < (0 - 1.5)))) OR (VAR31 AND (CLOSE < VAR43))) OR ((CLOSE < VAR2C) AND (VAR44 < (0 - 1.5)))) OR ((CLOSE < VAR1E) AND VAR31)); VAR46:=(((CLOSE - MA(CLOSE,6)) / MA(CLOSE,6)) * 100);VAR47:=(((CLOSE - MA(CLOSE,12)) / MA(CLOSE,12)) * 100);VAR48:=(((CLOSE - MA(CLOSE,24)) / MA(CLOSE,24)) * 100);VAR49:=REF(CLOSE,1);VAR4A:=((SMA(MAX((CLOSE - VAR49),0),5,1) / SMA(ABS((CLOSE - VAR49)),5,1)) * 100); VAR4B:=(((HIGH + LOW) + CLOSE) / 3);VAR4C:=((VAR4B - MA(VAR4B,14)) / (0.015 * AVEDEV(VAR4B,14)));VAR4D:=(((((MA(AMOUNT,5) / MA(VOL,5)) / 100) - ((MA(AMOUNT,110) / MA(VOL,110)) / 100)) / ((MA(AMOUNT,5) / MA(VOL,5)) / 100)) < (0 - 0.273));VAR4E:=(((CLOSE - MA(CLOSE,30)) / MA(CLOSE,30)) < (0 - 0.125));VAR4F:=(VAR11 AND VAR12);VAR50:=((((VAR2 >= (0 - 45)) AND (VAR2 <= (0 - 7))) AND (VAR3 <= (0 - 11))) AND (VAR4 <= (0 - 14)));VAR51:=(COUNT(VAR50,1) >= 1);VAR52:=(VAR4F AND VAR51);VAR53:=(((((VAR20 AND (CLOSE < VAR1E)) AND VAR31) AND (CLOSE < VAR2C)) AND VAR45) AND VAR52);VAR54:=(((CLOSE - MA(CLOSE,6)) / MA(CLOSE,6)) * 100);VAR55:=(((CLOSE - MA(CLOSE,12)) / MA(CLOSE,12)) * 100);VAR56:=(((CLOSE - MA(CLOSE,24)) / MA(CLOSE,24)) * 100);VAR57:=REF(CLOSE,1);VAR58:=((SMA(MAX((CLOSE - VAR57),0),5,1) / SMA(ABS((CLOSE - VAR57)),5,1)) * 100); VAR59:=(((HIGH + LOW) + CLOSE) / 3);VAR5A:=((VAR59 - MA(VAR59,14)) / (0.015 * AVEDEV(VAR59,14)));VAR5B:=((((((VAR54 >= (0 - 15.8)) AND (VAR54 <= (0 - 12.2))) AND (VAR55 <= (0 - 20.8))) AND (VAR56 <= (0 - 27.5))) AND (VAR58 <= 11.7)) AND (VAR5A <= (0 - 145))); VAR5C:=9.999999884842+026;VAR5D:=(COST(10) * 0);VAR5E:=((((MA(AMOUNT,5) / MA(VOL,5)) / 100) - ((MA(AMOUNT,125) / MA(VOL,125)) / 100)) / ((MA(AMOUNT,5) / MA(VOL,5)) / 100));VAR5F:=MA((((LLV(LOW,45) - CLOSE) / (HHV(HIGH,45) - LLV(LOW,45))) * 100),5);VAR60:=((CROSS((0 - 5),VAR5F) AND (VAR5E < (0 - 0.4))) AND (((CLOSE - MA(CLOSE,30)) / MA(CLOSE,30)) < (0 - 0.19)));VAR61:=MA(CLOSE,3);VAR62:=(REF(CLOSE,2) * 0.865);VAR63:=(REF(CLOSE,13) * 0.772);VAR64:=MIN(VAR62,VAR63);VAR65:=((100 * VOL) / CAPITAL);VAR66:=MA(CLOSE,13);VAR67:=IF(((((CLOSE - VAR64) / CLOSE) < 0.03) AND ((SUM(VAR65,5) / 5) < 1.8)),1,0); 胡涂出击:IF(((((VAR9 OR VAR16) OR VAR53) OR VAR5B) OR ((((CLOSE - VAR64) / CLOSE) < 0.03) AND ((SUM(VAR65,5) / 5) < 1.8))),120,0),LINETHICK2,COLOR0000FF;VAR68:=0;MACD:(VAR6 * 5),COLORSTICK,LINETHICK2;STICKLINE((CROSS(K,D) AND (BB10 > 1)),70,0,2,0),COLORCC99FF;DRAWTEXT((CROSS(K,D) AND (BB10 > 1)),64,'--短买'),COLOR00FF00;。
通达信指标公式源码主力动向副图(主买主卖副图) 傻买傻卖公式
DRAWRECTREL(0,0,400,988,IF(120,RGB(10,0,0),0));超B:=L2_AMO(0,2)/10000.0;大B:=L2_AMO(1,2)/10000.0;中B:=L2_AMO(2,2)/10000.0;小B:=L2_AMO(3,2)/10000.0;超S:=L2_AMO(0,3)/10000.0;大S:=L2_AMO(1,3)/10000.0;中S:=L2_AMO(2,3)/10000.0;小S:=L2_AMO(3,3)/10000.0;主买A:=ACTINVOL,COLORRED,NODRAW;主卖A:=ACTOUTVOL,COLORGREEN,NODRAW;主买:=主买A*100/(主买A+主卖A),NODRAW,COLORRED;主卖:=主卖A*100/(主买A+主卖A),NODRAW,COLORGREEN;SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));【量能饱和】:IF(SAT>1,1,SAT)*100,COLORYELLOW,NODRAW;主力净买量:=(LARGEINTRDVOL-LARGEOUTTRDVOL),COLORYELLOW,NODRAW;大宗净流入:=(超B+大B)-(超S+大S),COLORRED,NODRAW;主动买卖差:=(ACTINVOL-ACTOUTVOL),COLORMAGENTA,NODRAW;主力资金差:=((L2_AMO(0,0)+L2_AMO(1,0)-L2_AMO(0,1)-L2_AMO(1,1)))/10000,COLORCYAN,NO DRAW;DRAWRECTREL(100,0,90+CONST(主买*300/100),40,RGB(230,65,0)); DRAWRECTREL(100,60,90+CONST(主卖*300/100),100,RGB(0,104,0));DRAWRECTREL(100,120,390,160,RGB(0,0,100));DRAWRECTREL(100,120,90+CONST(【量能饱和】*300/100),160,RGB(250,104,0));大单动向:=(LARGEINTRDVOL-LARGEOUTTRDVOL)*10000/FINANCE(7),NODRAW;T1:=IF (大单动向>0 AND REF(大单动向,1)<0,1,0);T2:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)<0,2,T1);T3:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)<0,3,T2);T4:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)<0,4,T3);T5:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)<0,5,T4);T6:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)>0 AND REF(大单动向,6)<0,6,T5); T7:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)>0 AND REF(大单动向,6)>0 AND REF(大单动向,7)<0,7,T6);T8:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)>0 AND REF(大单动向,6)>0 AND REF(大单动向,7)>0 AND REF(大单动向,8)<0,8,T7);T9:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)>0 AND REF(大单动向,6)>0 AND REF(大单动向,7)>0 AND REF(大单动向,8)>0 AND REF(大单动向,9)<0,9,T8);T:=IF (大单动向>0 AND REF(大单动向,1)>0 AND REF(大单动向,2)>0 AND REF(大单动向,3)>0 AND REF(大单动向,4)>0 AND REF(大单动向,5)>0 AND REF(大单动向,6)>0 AND REF(大单动向,7)>0 AND REF(大单动向,8)>0 AND REF(大单动向,9)>0,10,T9);D:=COUNT(大单动向>0,10),NODRAW;DRAWTEXT_FIX(1,0.005,0.01,0,STRCAT(STRCAT('【主买比】: ',CON2STR(主买,1)),' %')),COLORYELLOW;DRAWTEXT_FIX(1,0.005,0.07,0,STRCAT(STRCAT('【主卖比】: ',CON2STR(主卖,1)),' %')),COLORGREEN;DRAWTEXT_FIX(1,0.005,0.13,0,STRCAT(STRCAT('【量能饱和】: ',CON2STR(【量能饱和】,1)),' %')),COLORYELLOW;DRAWTEXT_FIX(1,0.005,0.19,0,STRCAT(STRCAT('【主力资金差】: ',CON2STR(主力资金差,1)),' 万元')),COLORYELLOW;DRAWTEXT_FIX(1,0.2,0.19,0,STRCAT(STRCAT('【大宗净流入】: ',CON2STR(大宗净流入,1)),' 万元')),COLORYELLOW;DRAWTEXT_FIX(1,0.005,0.25,0,STRCAT(STRCAT('【主力净买量】: ',CON2STR(主力净买量,1)),' 手')),COLORYELLOW;DRAWTEXT_FIX(1,0.2,0.25,0,STRCAT(STRCAT('【主动买卖差】: ',CON2STR(主动买卖差,1)),' 手')),COLORYELLOW;DRAWTEXT_FIX(1,0.005,0.31,0,STRCAT(STRCAT('【DDX 连红天数】: ',CON2STR(T,0)),' 天')),COLORYELLOW;DRAWTEXT_FIX(1,0.2,0.31,0,STRCAT(STRCAT('【DDX两周红天数】: ',CON2STR(D,0)),' 天')),COLORYELLOW;PJJ:=DMA((((HIGH + LOW) + (CLOSE * 2)) / 4),0.9);JJ:=REF(EMA(PJJ,3),1);QJJ:=(VOL / (((HIGH - LOW) * 2) - ABS((CLOSE - OPEN))));XVL:=(IF((CLOSE > OPEN),(QJJ * (HIGH - LOW)),IF((CLOSE < OPEN),(QJJ * ((HIGH - OPEN) + (CLOSE - LOW))),(VOL / 2))) + IF((CLOSE > OPEN),(0 - (QJJ * ((HIGH - CLOSE) + (OPEN - LOW)))),IF((CLOSE < OPEN),(0 - (QJJ * (HIGH - LOW))),(0 - (VOL / 2))))); ZLL:=(VOL / CAPITAL);HSL1:=IF((ZLL > 10),10,ZLL);HSL:=((XVL / 20) / 1.15);攻击流量:=(((HSL * 0.55) + (REF(HSL,1) * 0.33)) + (REF(HSL,2) * 0.22));GJJ:=EMA(攻击流量,8);LLJX:=EMA(攻击流量,3);STICKLINE(((HSL * 0.4) >= 0),((HSL * 0.4) +LLJX),0,3,0),COLOR00FFFF; STICKLINE(((HSL * 0.4) < 0),((HSL * 0.4) +LLJX),0,3,0),COLOR00FF00;资金流入:=IF((HSL*0.4+LLJX)>0,(HSL*0.4+LLJX),DRAWNULL),COLORRED;资金流出:=IF((HSL*0.4+LLJX)<0,(HSL*0.4+LLJX),DRAWNULL),COLOR00FF00;资金进出:=(HSL*0.4+LLJX),LINETHICK0;万元:=AMOUNT/10000{0000},VOLSTICK,COLORFF00FF;资金净进出:IF((HSL*0.4+LLJX)>0,资金流入,资金流出),COLORWHITE,POINTDOT;进出比例%:IF((HSL*0.4+LLJX)>0,资金流入/万元*100,资金流出/万元*100),COLORYELLOW;连红天1:=BARSLASTCOUNT(资金净进出>0),,COLORA20FFD,NODRAW;连红天2:=IF(连红天1=0,REF(连红天1,1),连红天1),,COLORA20FFD,NODRAW;连红天3:=IF(连红天2=0,REF(连红天1,2),连红天2),,COLORA20FFD,NODRAW;连红天4:=IF(连红天3=0,REF(连红天1,3),连红天3),,COLORA20FFD,NODRAW;近期连红天:IF(连红天4=0,REF(连红天1,4),连红天4),,COLORYELLOW,NODRAW;最多连红天1:=MAX(REF(近期连红天,1),近期连红天),COLORYELLOW,NODRAW;最多连红天2:=MAX(最多连红天1,REF(近期连红天,2)),COLORYELLOW,NODRAW;最多连红天3:=MAX(最多连红天2,REF(近期连红天,3)),COLORYELLOW,NODRAW;最多连红天4:=MAX(最多连红天3,REF(近期连红天,4)),COLORYELLOW,NODRAW;最多连红天5:=MAX(最多连红天4,REF(近期连红天,5)),COLORYELLOW,NODRAW;最多连红天:MAX(最多连红天5,REF(近期连红天,6)),COLORYELLOW,NODRAW;三日资金:SUM(资金进出,3),COLORWHITE,NODRAW;五日资金:SUM(资金进出,5),COLORFF00FF,NODRAW;十日资金:SUM(资金进出,10),COLOR0000FF,NODRAW;资金流量:=LLJX,LINETHICK0,COLOR0000FF;STICKLINE((资金流量> 0),资金流量,0,3,0),COLOR0000FF;STICKLINE((资金流量< 0),资金流量,0,3,0),COLORFF3300;黄柱初出蓝:=REF(资金流出,1)<0 AND 资金流入>30 AND C>O AND C>REF(C,1) AND C>MA(C,3);X:=(3*C+2*L+O+H)/7;多空线:=(20*X+19*REF(X,1)+18*REF(X,2)+17*REF(X,3)+16*REF(X,4)+15*REF(X,5)+14*REF(X,6)+13*REF(X,7)+12*REF(X,8)+11*REF(X,9)+10*REF(X,10)+9*REF(X,11)+8*REF(X,12)+7*REF(X,13)+6*REF(X,14)+5*REF(X,15)+4*REF(X,16)+3*REF(X,17)+2*REF(X,18)+ REF(X,20))/210;长黄柱:= 资金流入>300 AND CROSS(C,多空线);DRAWTEXT(黄柱初出蓝,-30,'★'),COLORFF00FF;DRAWTEXT(长黄柱,((HSL * 0.4) * 1.5)*1.4 ,'★'),COLORRED;ARE4:=MA(C,20); ARE5:=(C>MA(C,5)); ARE6:=(MA(C,5)>MA(C,10)); ARE7:=(C>MA(C,10));ARE8:=(MA(C,5)>MA(C,20)); ARE9:=(C>MA(C,20)); ARE10:=REF(ARE4,1); ARE11:=(ARE4>ARE10);AVX:=(((((IF(ARE5,10,(0-10))+IF(ARE6,10,(0-10)))+IF(ARE7,10,(0-10)))+IF(ARE8,10,(0 -10)))+IF(ARE9,10,(0-10)))+IF(ARE11,10,(0-10)));DSLX:=(C/INDEXC); DSLX1:=MA(DSLX,5); DSLX2:=MA(DSLX,10); VRE1:=MA(V,5); VRE2:=MA(V,10);阻力位:=IF((C>200),(C*1.01),(C*1.07)); 阻力位1:=IF((C<10),(C*1.05),阻力位);止损位:=IF((C>200),(C*0.99),(C*0.93)); 止损位1:=IF((C<10),(C*0.95),止损位); TJTS1:=ISLASTBAR AND C<500; TJTS2:=ISLASTBAR AND C>500;KDAT:=REFDATE(HHV(H,45)/0.097,DATE);{解盘位置}解盘1:=CONST(IF(TJTS1 AND ((CROSS(AVX,1) AND (VRE1 >= VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘2:=CONST(IF(TJTS1 AND ((CROSS(AVX,1) AND (VRE1 < VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘3:=CONST(IF(TJTS1 AND ((CROSS(AVX,1) AND (VRE1 > VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘4:=CONST(IF(TJTS1 AND ((CROSS(AVX,1) AND (VRE1 <= VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘5:=CONST(IF(TJTS1 AND ((CROSS(1,AVX) AND (VRE1 >= VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘6:=CONST(IF(TJTS1 AND ((CROSS(1,AVX) AND (VRE1 < VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘7:=CONST(IF(TJTS1 AND ((CROSS(1,AVX) AND (VRE1 >= VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘8:=CONST(IF(TJTS1 AND ((CROSS(1,AVX) AND (VRE1 < VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘9:=CONST(IF(TJTS1 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 >= VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘10:=CONST(IF(TJTS1 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 < VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘11:=CONST(IF(TJTS1 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 >= VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘12:=CONST(IF(TJTS1 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 < VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘13:=CONST(IF(TJTS1 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 >=VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘14:=CONST(IF(TJTS1 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 < VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘15:=CONST(IF(TJTS1 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 >= VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘16:=CONST(IF(TJTS1 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 < VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘17:=CONST(IF(TJTS2 AND (CROSS(AVX,1) AND (VRE1 >= VRE2)) ,1,0));解盘18:=CONST(IF(TJTS2 AND (CROSS(AVX,1) AND (VRE1 >= VRE2)) ,1,0));解盘19:=CONST(IF(TJTS2 AND (CROSS(AVX,1) AND (VRE1 < VRE2)) ,1,0));解盘20:=CONST(IF(TJTS2 AND (CROSS(AVX,1) AND (VRE1 < VRE2)) ,1,0));解盘21:=CONST(IF(TJTS2 AND (CROSS(1,AVX) AND (VRE1 >= VRE2)) ,1,0));解盘22:=CONST(IF(TJTS2 AND (CROSS(1,AVX) AND (VRE1 < VRE2)) ,1,0));解盘23:=CONST(IF(TJTS2 AND (((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 >= VRE2)) ,1,0));解盘24:=CONST(IF(TJTS2 AND (((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 < VRE2)) ,1,0));解盘25:=CONST(IF(TJTS2 AND (((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 >= VRE2)) ,1,0));解盘26:=CONST(IF(TJTS2 AND (((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 < VRE2)) ,1,0));解盘文字1:=IF(解盘1=1,'该股的量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3左右',IF(解盘2=1,'该股虽然走势趋强,但量能还显不足,可以考虑短线进场,仓位在1/2左右', IF(解盘3=1,'该股量价配合良好,但相对其它股票并没有明显走强,可以考虑短线进场,仓位1/2左右',IF(解盘4=1,'该股形态尚可,但量能不足,股票也未完全走强,可以短线参与,仓位1/3左右',IF(解盘5=1,'该股形态变坏,但走势相对其它股票尚可,重仓者减持大半,清仓者可以观望',IF(解盘6=1,'该股随大盘一起下跌,程明显缩量走势,考虑到大盘风险,减持或清仓',IF(解盘7=1,'该股放量下跌,走势明显偏弱,离场观望',IF(解盘8=1,'该股缩量下跌,走势偏弱,离场观望',IF(解盘9=1,'该股形态良好,强势明显,量能充足,可以继续持有',IF(解盘10=1,'该股上行趋势不变,强势依然,但量能开始转弱,注意风险',IF(解盘11=1,'该股仍然具备上涨潜力,但股性偏弱,可考虑减仓',IF(解盘12=1,'该股走势趋弱,量能不足,减持大部分筹码',IF(解盘13=1,'该股形态不佳,注意成交量的变化,但目前不适合参与',IF(解盘14=1,'该股趋势不明,股价偏弱,注意量能变化,目前不宜参与',IF(解盘15=1,'该股有走强迹象,但量能不足,趋势不明,不适合操作',IF(解盘17=1,'大盘量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3左右',IF(解盘19=1,'大盘虽然走势趋强,但量能还显不足,如果前期经过一轮下跌',IF(解盘21=1,'大盘形态走坏,重仓者可以减去大部分仓位',IF(解盘22=1,'大盘缩量调整,注意风险,短线清仓观望',IF(解盘23=1,'大盘走势良好,量能理想,可以继续持有强势股',IF(解盘24=1,'大盘形态良好,但量能稍显不足,随时准备减仓',IF(解盘25=1,'大盘趋势不明,注意成交量变化,目前不适宜进场',IF(解盘26=1,'大盘趋势向下,量能萎缩,不适合进场',DRAWNULL)))))))))))))))))))))));解盘文字2:=IF(解盘16=1,'该股走势太弱,没有参与价值',IF(解盘18=1,' 如前期经过一轮下跌,此时为最佳买点,但如果前期有过一段涨幅则介入需谨慎',IF(解盘20=1,' 可以考虑短线进场,仓位在1/2左右,一旦量能放大可以加仓买入',DRAWNULL)));DRAWTEXT(CURRBARSCOUNT=70{位置} AND (解盘1=1 OR 解盘2=1 OR 解盘3=1 OR 解盘4=1 OR 解盘5=1 OR 解盘6=1 OR 解盘7=1 OR解盘8=1 OR 解盘9=1 OR 解盘10=1 OR 解盘11=1 OR 解盘12=1 OR 解盘13=1 OR 解盘14=1 OR 解盘15=1 OR 解盘17=1 OR解盘19=1 OR 解盘21=1 OR 解盘22=1 OR 解盘23=1 OR 解盘24=1 OR 解盘25=1 OR 解盘26=1),(KDAT*0.99),解盘文字1),COLOR00FFFF;DRAWTEXT(CURRBARSCOUNT=70{位置} AND (解盘16=1 OR 解盘18=1 OR 解盘20=1),IF(解盘18=1 OR 解盘20=1,KDAT*0.98,KDAT*0.96),解盘文字2),COLOR00FFFF; TT:=240/FROMOPEN;比:=TT;促进指数MFL:=(HIGH-LOW)*1000000/(VOL*比),COLORRED;AY2:=EMA(CLOSE,12)-EMA(CLOSE,26);AZ2:=EMA(AY2,9);LT2:=(AY2-AZ2);L211:=IF(LT2,LLV(L,21),DRAWNULL),COLOR217158,CIRCLEDOT;ZGD:=HHV(H,80)*0.99;ZGD2:=CONST(ZGD);ZDD:=LLV(L211,80);ZDD2:=CONST(ZDD);YYA4:=MA(CLOSE,20);YYA5:=(CLOSE > MA(CLOSE,5));YYA6:=(MA(CLOSE,5) > MA(CLOSE,10));YYA7:=(CLOSE > MA(CLOSE,10));YYA8:=(MA(CLOSE,5) > MA(CLOSE,20));YYA9:=(CLOSE > MA(CLOSE,20));YYA10:=REF(YYA4,1);YYA11:=(YYA4 > YYA10);YYAVX:=(((((IF(YYA5,10,(0 - 10)) + IF(YYA6,10,(0 - 10))) + IF(YYA7,10,(0 - 10))) + IF(YYA8,10,(0 - 10))) + IF(YYA9,10,(0 - 10))) + IF(YYA11,10,(0 - 10)));YYV1:=MA(VOL,5);YYV2:=MA(VOL,10);J1:=CONST(IF( YYAVX > 0,200,100));J2:=CONST(IF( YYAVX > 0,00,100));J3:=CONST(IF( YYAVX > 0,100,100));WJ:=(H+L+C)/3;VV1:=IF(H=L,1,H-MAX(O,C));VV2:=IF(H=L,1,MAX(C,O)-WJ);VV3:=IF(H=L,1,MIN(O,C)-L);V4:=IF(H=L,1,WJ-MIN(C,O));VV5:=VOL/IF(H=L,4,H-L);V6:=(VV1*VV5);V7:=(VV2*VV5);V8:=(VV3*VV5);V9:=(V4*VV5);买盘1:=DYNAINFO(23)*比;卖盘1:=DYNAINFO(22)*比;买盘2:=IF(ISLASTBAR AND C>300,(V9+V8)*TT,(V9+V8));卖盘2:=IF(ISLASTBAR AND C>300,(V6+V7)*TT,(V6+V7));买盘:=IF(ISLASTBAR AND PERIOD=5 AND C<300,买盘1,买盘2);卖盘:=IF(ISLASTBAR AND PERIOD=5 AND C<300,卖盘1,卖盘2);{买卖差:=买盘-卖盘;}MFI:=(HIGH-LOW)*1000000/(VOL*比);绿灯:=MFI>=REF(MFI,1)AND VOL*比>=REF(VOL,1);M1:=CONST(绿灯);衰退:=MFI<REF(MFI,1)AND VOL*比<REF(VOL,1);M2:=CONST(衰退);伪装:=MFI>=REF(MFI,1)AND VOL*比<REF(VOL,1);M3:=CONST(伪装);蛰伏:=MFI<REF(MFI,1)AND VOL*比>=REF(VOL,1);M4:=CONST(蛰伏);量大:=(卖盘+买盘)/REF(VOL,1)>2;M5:=CONST(量大);量缩:=REF(VOL,1)/(卖盘+买盘)>1.5;M6:=CONST(量缩);卖量大:=(卖盘-买盘)/买盘>0.4;M7:=CONST(卖量大);买量大:=(买盘-卖盘)/卖盘>0.4;M8:=CONST(买量大);TS1:=IF(M1=1,1.99+4.99,0.91);TS2:=IF(M2=1,TS1+4.99,TS1);TS3:=IF(M3=1,TS2+4.99,TS2);TS4:=IF(M4=1,TS3+4.99,TS3);TS5:=IF(M5=1,TS4+4.99,TS4);TS6:=IF(M6=1,TS5+4.99,TS5);TS7:=IF(M7=1,TS6+4.99,TS6);TS8:=IF(M8=1,TS7+4.99,TS7);DRAWTEXT(M1 AND CURRBARSCOUNT=50,ZGD2-(ZGD2*TS1),'[绿灯]实计交易量增加。
通达信财务副图指标公式源码
通达信财务副图指标公式源码DRAWTEXT_FIX( CONST(INDEXC)DRAWTEXT_FIX(1,0.87,0.85,1,'公式共同交流————理想论坛(偷不到就抢)'),COLORYELLOW;DRAWTEXT_FIX( CONST(INDEXC)DRAWTEXT_FIX( CONST(INDEXC)>SAR(4,2,20),0.95,0.11,1,'∧∧∧∧'),COLORRED;DRAWTEXT_FIX( CONST(INDEXC)>SAR(4,2,20),0.95,0.16,1,'∧∧∧∧'),COLORRED;DRAWTEXT_FIX(1,0.96,0.01,1,':'),COLORRED;DRAWRECTREL(970,670,580+CONST(获利筹码*(970-580)/100),740,RGB(0,100,0));DRAWRECTREL(970,470,580+CONST(活跃度比*(970-580)/100),540,RGB(0,100,0));DRAWRECTREL(970,340,580+CONST(量能饱和*(970-580)/100),270,RGB(0,100,0));DRAWRECTREL(970,670,580,740,RGB(150,10,250));DRAWRECTREL(970,470,580,540,RGB(150,10,250));DRAWRECTREL(970,340,580,270,RGB(150,10,250));DRAWTEXT_FIX(1,0.74,0.55,1,STRCAT(STRCAT('获利筹码:',CON2STR(获利筹码,2)),'%')),COLORYELLOW;DRAWTEXT_FIX(1,0.74,0.35,1,STRCAT(STRCAT('活跃度比:',CON2STR(活跃度比,2)),'%')),COLORYELLOW;DRAWTEXT_FIX(1,0.74,0.15,1,STRCAT(STRCAT('量能饱和:',CON2STR(量能饱和,2)),'%')),COLORYELLOW;活跃度比:=IF(活跃>=0,(活跃+100)/2,100-ABS((活跃-100)/2));活跃:=(WRSI-WR10);WR10:=(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3))*100;饱和:=(IF(SAT>1,1,SAT)*100);SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));获利:=CONST(WINNER(C)*100);W:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;LC:=REF(CLOSE,1);DRAWTEXT_FIX(Z值>2.6,0.838,0.11,1,' ◎无警◎'),COLORLIGREEN;DRAWTEXT_FIX( BETWEEN(Z值,1.2,2.6),0.838,0.11,1,' ○轻警○'),COLOR0099FF;DRAWTEXT_FIX(Z值<1.2,0.838,0.11,1,' ●重警●'),COLORLIRED;DRAWTEXT_FIX(1,0.85,0.01,1,'财务:'),COLORRED;Z值:=X1+X2+X3+X4+X5;X5:=FINANCE(20)/FINANCE(15)*0.999;X4:=FINANCE(19)/FINANCE(15)*0.6;{缺长期负债或负债总额} X3:=FINANCE(23)/FINANCE(10)*3.3;X2:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;{盈余公积用资本公积金代替}X1:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;{风险系数}DRAWNUMBER_FIX(1,0.57,0.75,1,每股公积金),COLORWHITE;DRAWNUMBER_FIX(1,0.57,0.65,1,每股未分配),COLORWHITE;DRAWNUMBER_FIX(1,0.57,0.55,1,每股现金流),COLORWHITE;DRAWNUMBER_FIX(1,0.57,0.45,1,每股收益年),COLORWHITE;DRAWNUMBER_FIX(1,0.57,0.35,1,每股收益季),COLORWHITE;DRAWNUMBER_FIX(1,0.57,0.25,1,市销率),COLORWHITE;DRAWNUMBER_FIX(1,0.57,0.15,1,市净率),COLORWHITE;DRAWTEXT_FIX(1,0.51,0.75,1,'每股公积金:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.65,1,'每股未分配:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.55,1,'每股现金流:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.45,1,'每股收益年:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.35,1,'每股收益季:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.25,1,'市销率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.51,0.15,1,'市净率:'),COLORYELLOW;每股公积金:=CONST(FINANCE(18));每股未分配:=CONST(FINANCE(32));每股现金流:=CONST((FINANCE(25)/FINANCE(1)));每股收益年:=CONST(FINANCE(33));每股收益季:=CONST(FINANCE(33)/(5-FINANCE(37)));市销率:=CONST(FINANCE(1)*DYNAINFO(7)/FINANCE(20));市净率:=CONST(DYNAINFO(7) / FINANCE(34));DRAWTEXT_FIX(1,0.498,0.01,1,'财务指标:'),COLORRED;DRAWNUMBER_FIX(1,0.4,0.75,1,净利同增率),COLORWHITE;DRAWNUMBER_FIX(1,0.4,0.65,1,现金负债比),COLORWHITE;DRAWNUMBER_FIX(1,0.4,0.55,1,优质资产率),COLORWHITE;DRAWNUMBER_FIX(1,0.4,0.45,1,主营利润率),COLORWHITE;DRAWNUMBER_FIX(1,0.4,0.35,1,净利润比率),COLORWHITE;DRAWNUMBER_FIX(1,0.4,0.25,1,销售毛利率),COLORWHITE;DRAWNUMBER_FIX(1,0.4,0.15,1,净资收益率),COLORWHITE;DRAWTEXT_FIX(1,0.34,0.75,1,'净利同增率:'),COLORYELLOW DRAWTEXT_FIX(1,0.34,0.65,1,'现金负债比:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.55,1,'优质资产率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.45,1,'主营利润率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.35,1,'净利润率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.25,1,'销售毛利率:'),COLORYELLOW;DRAWTEXT_FIX(1,0.34,0.15,1,'净资收益率:'),COLORYELLOW;净利同增率:=FINANCE(43);现金负债比:=(FINANCE(25)/FINANCE(15));{缺长期负债或负债总额,编辑:股旁网,优质资产率:=((FINANCE(19)-FINANCE(22)-FINANCE(27))/FINANCE(19));{理论上越大越好但不同行业有不同标准};主营利润率:=(FINANCE(23)/FINANCE(20)*100);净利润比率:=(FINANCE(30)/FINANCE(20)*100);销售毛利率:=((FINANCE(20)-FINANCE(21))/FINANCE(20)*100);净资收益率:=(FINANCE(33)/FINANCE(34)*100);DRAWTEXT_FIX(1,0.326,0.01,1,'业绩指标:'),COLORRED;DRAWTEXT_FIX(1,0.23,0.75,1,'股'),COLORCYAN;DRAWTEXT_FIX(1,0.23,0.65,1,'人'),COLORCYAN;DRAWTEXT_FIX(1,0.23,0.55,1,'亿元'),COLORCYAN;DRAWTEXT_FIX(1,0.23,0.45,1,'亿元'),COLORCYAN;DRAWTEXT_FIX(1,0.23,0.35,1,'天'),COLORCYAN;DRAWTEXT_FIX(品种类型=3,0.23,0.15,1,' 创业板'),COLORMAGENTA;DRAWTEXT_FIX(品种类型=2,0.23,0.15,1,' 中小板'),COLORMAGENTA;DRAWTEXT_FIX(品种类型=1,0.23,0.15,1,'沪深 A 股'),COLORMAGENTA;DRAWNUMBER_FIX(1,0.2,0.75,1,人均持股),COLORWHITE;DRAWNUMBER_FIX(1,0.2,0.65,1,股东人数),COLORWHITE;DRAWNUMBER_FIX(1,0.19,0.55,1,流通市值),COLORWHITE;DRAWNUMBER_FIX(1,0.19,0.45,1,股总市值),COLORWHITE;DRAWNUMBER_FIX(1,0.2,0.35,1,上市天数),COLORWHITE;DRAWTEXT_FIX(1,0.23,0.25,1,HYBLOCK),COLORLIGREEN;DRAWTEXT_FIX(1,0.14,0.75,1,'人均持股:'),COLORYELLOW;DRAWTEXT_FIX(1,0.14,0.65,1,'股东人数:'),COLORYELLOW;DRAWTEXT_FIX(1,0.14,0.55,1,'流通市值:'),COLORYELLOW;DRAWTEXT_FIX(1,0.14,0.45,1,'股总市值:'),COLORYELLOW;DRAWTEXT_FIX(1,0.14,0.35,1,'上市天数:'),COLORYELLOW; DRAWTEXT_FIX(1,0.14,0.25,1,'所属板块:'),COLORYELLOW; DRAWTEXT_FIX(1,0.14,0.15,1,'品种类型:'),COLORYELLOW; 人均:=ROUND(FINANCE(7)/FINANCE(8));股东人数:=FINANCE(8);流通市值:=ROUND(FINANCE(40)/);股总市值:=ROUND(FINANCE(41)/);上市天数:=FINANCE(42);所属:=HYBLOCK;品种类型:=FINANCE(3);DRAWTEXT_FIX(1,0.14,0.01,1,'股份:'),COLORRED; DRAWRECTREL(0,0,990,990,RGB(20,18,12));。
通达信副图看盘指标(附源码)
通达信副图看盘指标(附源码)通达信副图看盘指标(附源码)VAR1:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;VAR2:=2*ABS(VAR1);VAR3:=100-(100-3*SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,20,1),15,1));VAR4:=100-(100-3*SMA((OPEN-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,20,1),15,1));VAR5:=(HIGH+LOW+CLOSE)/3;VAR6:=(VAR5-MA(VAR5,10))/(0.015*AVEDEV(VAR5,10));VAR7:=(VAR5-MA(VAR5,30))/(0.015*AVEDEV(VAR5,30));VAR8:=IF(VAR6>=150 AND VAR6<200 AND VAR7>=150 AND VAR7<200,10,0);VAR9:=IF(VAR6<=-150 AND VAR6>-200 AND VAR7<=-150 AND VAR7>-200,-10,VAR8);VARA:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;VARB:=100-ABS(VARA);VARC:=3*SMA((INDEXC-LLV(INDEXL,55))/(HHV(INDEXH,55)-LLV(INDEXL,55))*100,20,1)-2*SMA(SMA((INDEXC-LLV(INDEXL,55))/(HHV(INDEXH,55)-LLV(INDEXL,55))*100,20,1),15,1);VARD:=3*SMA((INDEXO-LLV(INDEXL,55))/(HHV(INDEXH,55)-LLV(INDEXL,55))*100,20,1)-2*SMA(SMA((INDEXO-LLV(INDEXL,55))/(HHV(INDEXH,55)-LLV(INDEXL,55))*100,20,1),15,1);VARE:=REF(LOW,1)*0.9;VARF:=LOW*0.9;VAR10:=(VARF*VOL+VARE*(CAPITAL-VOL))/CAPITAL;VAR11:=EMA(VAR10,30);VAR12:=VAR11-CLOSE;VAR13:=REF(CLOSE,1);VAR14:=SMA(MAX(CLOSE-VAR13,0),7,1)/SMA(ABS(CLOSE-VAR13),7,1)*100;VAR15:=SMA(MAX(CLOSE-VAR13,0),13,1)/SMA(ABS(CLOSE-VAR13),13,1)*100;VAR16:=BARSCOUNT(CLOSE);VAR17:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100;VAR18:=((-100)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+50)*2;VAR19:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;VAR1A:=(SMA(VAR19,4,1)-50)*2;VAR1B:=SMA(VAR1A,3,1);VAR1C:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100;VAR1D:=SMA(VAR1C,4,1);VAR1E:=SMA(VAR1D,3,1);VAR1F:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;VAR20:=IF(VAR17<=25 AND VAR18<-95 AND VAR1F>20 AND VAR1B<-30 AND VAR1E<30 AND VAR12>=-0.25 AND VAR14<22 AND VAR15<28 AND VAR16>50,80,0);大趋势: VAR3;顶线: IF(VARB<90,VARB,100);多方: IF(VAR1>0,VAR1,0), LINESTICK;空方: 0-IF(VAR1<0,VAR2,0), LINESTICK;抄底: VAR20 AND PWINNER(5,CLOSE)<1.1, COLORRED;预警系统: IF(VAR7>=200 AND VAR6>=150 OR CROSS(65,多方),15,IF(VAR7<=-200 AND VAR6<=-150,-15,VAR9))+65,COLORCYAN;STICKLINE(VAR3<=REF(VAR4,1),VAR3,VAR4,8,0), COLORWHITE;STICKLINE(VAR3>REF(VAR4,1),VAR3,VAR4,8,0), COLORRED;VAR21:=CLOSE>MA(CLOSE,20) AND MA(CLOSE,20)>=REF(MA(CLOSE,20),1);VAR22:=CLOSE<MA(CLOSE,20) AND MA(CLOSE,20)<REF(MA(CLOSE,20),1);VAR23:=多方>60 AND 预警系统>65 AND 顶线=100;VAR24:=多方>48 AND 预警系统>65 AND 顶线<100;VAR25:=空方<-38 AND 预警系统<65;VAR26:=抄底>50 AND 顶线<90;VAR27:=VAR3>REF(VAR4,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);VAR28:=VAR3<=REF(VAR4,1) AND CLOSE<REF(CLOSE,1) AND 预警系统=65 AND 抄底=0 AND 空方>=REF(空方,1) AND VARC<REF(VARD,1);DRAWTEXT(VAR21 AND COUNT(VAR21,30)=1,10,'上升通道!'), COLORYELLOW;VAR29:=DRAWTEXT(VAR22 AND COUNT(VAR22,30)=1,55,'下降通道!');VAR2A:=DRAWTEXT(VAR23 AND COUNT(VAR23,30)=1,55,'上涨过急!');VAR2B:=DRAWTEXT(VAR24 AND COUNT(VAR24,30)=1,75,'庄家出货!');VAR2C:=DRAWTEXT(VAR25 AND OUNT(VAR25,30)=1,50,'有小反弹!');VAR2D:=DRAWTEXT(VAR26 AND COUNT(VAR26,30)=1,30,'抢反弹!');VAR2E:=DRAWTEXT(VAR27 AND COUNT(VAR27,30)=1,-10,'资金进场!');DRAWTEXT(VAR28 AND COUNT(VAR28,30)=1,90,'见顶回落!'),COLORYELLOW;。
通达信指标公式源码 精确买卖 副图源码
VAR3:=(CLOSE-MA(CLOSE,0))/MA(CLOSE,0)*100;VAR4:=(CLOSE-MA(CLOSE,0))/MA(CLOSE,0)*100;VAR5:=(CLOSE-MA(CLOSE,0))/MA(CLOSE,0)*100;VAR6:=(VAR3+VAR4+VAR5)/3;VAR7:=EMA(VAR6,5);ZHIB: EMA(EMA(VAR3,5),5)*3, COLORSTICK;VAR8:=IF(VAR6<=-20,10,0);VAR9:=HHV(VAR8,10);STICKLINE(VAR8=10,20,10,3,0),COLORRED;VARA:=IF(VAR9 && CROSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);K:EMA(VAR7,5)*2,COLORGREEN;D:EMA(K,5), COLORWHITE;J:K*3-D*2, COLORYELLOW;VARB:=BETWEEN(CLOSE,MA(CLOSE,3),MA(CLOSE,5)) && J>10;DRAWTEXT(VARA=20,15,'底部');STICKLINE((VARA=20),0,10,3,0),COLORWHITE;VARC:=(ZIG(3,5)>REF(ZIG(3,5),1)) && (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)) && (REF(ZIG(3,5),2)<=REF(ZIG(3,5),3));VARD:=(ZIG(3,5)<REF(ZIG(3,5),1)) && (REF(ZIG(3,5),1)>=REF(ZIG(3,5),2)) && (REF(ZIG(3,5),2)>=REF(ZIG(3,5),3));STICKLINE((VARC=1),(-14),0,3,0),COLORMAGENTA;DRAWTEXT((VARC=1),(-14),'买');STICKLINE((VARD=1),14,0,3,0),COLORGREEN;DRAWTEXT((VARD=1),18,'卖');VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20; VARF:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*S MA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);VAR10:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*S MA(SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);VAR11:=VARF<REF(VAR10,1) && VOL>REF(VOL,1) && CLOSE>REF(CLOSE,1); DRAWTEXT(VAR11 && COUNT(VAR11,30)=1,15,'大资金活动');STICKLINE(VAR11 && COUNT(VAR11,30)=1,1,10,3,0),COLORCYAN;VAR12:=(HIGH+LOW+CLOSE)/3;VAR13:=(VAR12-MA(VAR12,14))/(0.015*AVEDEV(VAR12,14));VAR14:=(VAR12-MA(VAR12,70))/(0.015*AVEDEV(VAR12,70));VAR15:=IF(VAR13>=150 && VAR13<200 && VAR14>=150 && VAR14<200,10,0);VAR16:=IF(VAR13<=-150 && VAR13>-200 && VAR14<=-150 && VAR14>-200,-10,VAR15);VAR17:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;VAR18:=100-ABS(VAR17);VAR19:=IF(VAR18<90,VAR18,100);VAR1A:=IF(VARE>0,VARE,0);VAR1B:=IF(VAR14>=200 && VAR13>=150,15,IF(VAR14<=-200 && VAR13<=-150,-15,VAR16))+60;VAR1C:=VAR1A>48 && VAR1B>60 && VAR19<100;DRAWTEXT(VAR1C && COUNT(VAR1C,30)=1,15,'大笔出货');STICKLINE(VAR1C && COUNT(VAR1C,30)=1,0,10,3,0),COLORYELLOW;。
通达信副图指标公式源码大全
实用标准文档副图指标公式源码1、百万踏浪(相传为杨百万看图公式)N1:=9;N:=3;VAR1:=REF(CLOSE,1);标尺 : SMA(MAX(CLOSE-VAR1,0),5,1)/SMA(ABS(CLOSE-VAR1),5,1)*100;VAR2:=(CLOSE-LLV(LOW,N1))/(HHV(HIGH,N1)-LLV(LOW,N1))*100;VAR3:=SMA(VAR2,3,1);VAR4:=SMA(VAR3,3,1);VAR5:=SMA(VAR4,3,1);浪: VAR3,COLORBLUE;波: VAR4, COLORRED;段: VAR5 ,COLORYELLOW;VAR6:=CROSS(VAR3,VAR4) AND VAR4<25;STICKLINE(VAR6,0,VAR4+15,5,0), COLORGREEN;VAR7:=CROSS(VAR4,VAR5) AND VAR4<25;VAR8:=VAR7 AND VOL>REF(VOL,1)*2 AND VOL>REF(MA(VOL,5),1)*2;STICKLINE(VAR7,0,VAR4+55,5,0),COLORWHITE;DRAWTEXT(VAR7 AND COUNT(VAR7,10)=1,VAR4+25,' 抄底 '),COLORYELLOW; STICKLINE(VAR8,0,VAR4+15,5,0),COLORBLUE;DRAWTEXT(VAR8 AND COUNT(VAR8,10)=1,VAR4-1,' 放量 '),COLORGREEN; VAR9:=CROSS(VAR3,VAR4) AND VAR4>80 AND VAR4>VAR5;STICKLINE(VAR9 AND COUNT(VAR9,5)=1,VAR4-5,100,5,0),COLORYELLOW;实用标准文档VARA:=CROSS(VAR5,VAR4) AND REF(VAR4,1)>80;STICKLINE(VARA,VAR4-15,100,15,0), COLORYELLOW;DRAWTEXT(VARA AND COUNT(VARA,10)=1,VAR4-25,' 逃顶'), COLORYELLOW;VAR1A:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;VAR1B:=SMA((SMA(VAR1A,4,1)-50)*2,3,1);VAR1C:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100;VAR1D:=SMA(VAR1C,4,1);VAR1E:=SMA(VAR1D,3,1);VAR1F:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;VARE:=REF(LOW,1)*0.9;VARF:=LOW*0.9;VAR10:=(VARF*VOL+VARE*(CAPITAL-VOL))/CAPITAL;VAR11:=EMA(VAR10,30);VAR12:=CLOSE-REF(CLOSE,1);VAR13:=MAX(VAR12,0);VAR14:=ABS(VAR12);VAR15:=SMA(VAR13,7,1)/SMA(VAR14,7,1)*100;VAR16:=SMA(VAR13,13,1)/SMA(VAR14,13,1)*100;VAR17:=BARSCOUNT(CLOSE);VAR18:=SMA(MAX(VAR12,0),6,1)/SMA(ABS(VAR12),6,1)*100;VAR19:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100;VAR20:=VAR18<=25 AND VAR19<-95 AND VAR1F>20 AND VAR1B<-30 ANDVAR1E<30 AND VAR11-CL0SE>=-0.25 AND VAR15<22 AND VAR16<28 ANDVAR17>50;STICKLINE(VAR20,0,50,10,0),LINETHICK2,COLORBLUE;弹?')丄 INETHICK7,C0L0RWHITE;2、分类资金A:=IF((CL0SE>126.32),(AM0UNT)/(100000),V0L);主力 :MA(A,4),LINETHICK0,C0L0RYELL0W;游资 :MA(A,8),LINETHICK0,C0L0R00FF00;大户 :MA(A,16),LINETHICK0,C0L0RRED;散户 :MA(A,32),LINETHICK0,C0L0RF0F000;警戒线 :MA(A,180),C0L0RFF66FF,LINETHICK1; 主力 > 0),0,主力 > 0),0,主力 > 0),0,主力 > 0),0,主力 > 0),0,主力 > 0),0, 主力 ,3,0),C0L0R009CFF;STICKLINE(( 主力 ,2.8,0),C0L0R009CFF; STICKLINE(( 主力 ,2.5,0),C0L0R00C0FF; STICKLINE(( 主力 ,1.5,0),C0L0R00D1FF; STICKLINE(( 主力 ,1,0),C0L0R00EAFF; STICKLINE(( 主力 ,0.7,0),C0L0RYELL0W;STICKLINE(( DRAWTEXT(CROSS(VAR20,0.5)AND C0UNT(VAR20=1,10)=1,60,' 百万导主比:ABS (((主力)/(主力 游资大户 散户 ))*(100)),LINESTICK,C0L0RYELL0W; 游比:ABS (((游资)/(主力 游资大户 散户 ))*(100)),LINESTICK,C0L0R00FF00; 大比:ABS (((大户)/(主力 游资 大户 散户 ))*(100)),LINESTICK,C0L0RRED;散比:ABS (((散户)/(主力 游资大户 散户 ))*(100)),LINESTICK,C0L0RF0F000;STICKLINE(( 游资> 0),0,游资,3,0),COLOR00C100;STICKLINE(( 游资> 0),0,游资,2.8,O),COLOROOCAOO;STICKLINE(( 游资> 0),0,游资,2.5,O),COLOROOD3OO;STICKLINE(( 游资> 0),0,游资,1.5,0),COLOROODBOO;STICKLINE(( 游资> 0),0, 游资,1 ,0),COLOR00EA00;STICKLINE(( 游资> 0),0,游资,0.7,0),COLORGREEN;STICKLINE(( 大户> 0),0, 大户 ,3,0),COLOR1020AA;STICKLINE(( 大户> 0),0, 大户 ,2.8,0),COLOR1020BB;STICKLINE(( 大户> 0),0, 大户 ,2.5,0),COLOR1020CC;STICKLINE(( 大户> 0),0, 大户 ,1.5,0),COLOR1020DD;STICKLINE(( 大户> 0),0, 大户 ,1,0),COLOR1020EE;STICKLINE(( 大户> 0),0, 大户 ,0.7,0),COLORRED;STICKLINE(( 散户> 0),0, 散户 ,3,0),COLORFF7700;STICKLINE(( 散户> 0),0, 散户 ,2.8,0),COLORFF8800;STICKLINE(( 散户> 0),0, 散户 ,2.5,0),COLORFF9900;STICKLINE(( 散户 > 0),0, 散户 ,1.5,0),COLORFFAA00; STICKLINE(( 散户 > 0),0, 散户,1,0),COLORFFBBOO;STICKLINE(( 散户 > 0),0, 散户 ,0.7,0),COLORLIBLUE;3、黑马起爆点VAR1:=(CLOSE-MA(CLOSE,21))/MA(CLOSE,21)*100;VAR2:=(CLOSE-LLV(LOW,43))/(HHV(HIGH,43)-LLV(LOW,43))*100;VAR3:=SMA(VAR2,2,1);天:100+(-ABS(VAR1)),COLORRED;下:SMA(VAR3,2,1);无:ABS(VAR1),C0L0RGREEN;敌:50,COLORFFAA00 ,L INETHICK3;A:80;B:20;买:STICKLINE(CROSS(下,无),3,2O,2,O),COLORRED,LINETHICK1;STICKLINE(CROSS(下,无),20,25,2,0),COLORFF9900,LINETHICK1;DRAWTEXT(CROSS( 下,无),30,' '),COLORFFFFCC;卖:STICKLINE(CROSS(下,天),7O,9O,2,O),COLORRED,LINETHICK1;STICKLINE(CROSS(下,天),9O,99,2,O),COLORFF99OO,LINETHICK1;DRAWTEXT(CROSS( 下,天),70,' '),COLORFFFFCC;选股 2:IF(CROSS( 下,20),1,0);DRAWICON((CROSS( 下,20) ),20,1);DRAWICON((CROSS( 下,20) ),-20,25);4、宁波绝密(相传为宁波涨停敢死队的绝密指标)AND WOL:IF(CURRBARSCOUNT=1PERIOD=5,VOL*240/FROMOPEN,DRAWNULL),NODRAW;STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,WOL,0,3,-1),COLORFFFFFF;VOLUME:VOL,VOLSTICK;V5:MA(VOLUME,5);V10:MA(VOLUME,10);V135:MA(VOLUME,135);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, 主买 ,VOL,2,1),COLOR00FF80;}STICKLINE(主买 <REF(主买,1)AND 主买 >0,0,主买,2,0),COLOROOFFFF;换手:VOL/CAPITAL*100,POINTDOT;二十日换手 :SUM( 换手 ,20);5、起涨点换手率 %:VOL/CAPITAL*100,LINETHICK0,COLORYELLOW;量比:V/(REF(MA(V,5),1)),LINETHICK0,COLORRED;AND VVOL:=IF(CURRBARSCOUNT=1PERIOD=5,VOL*240/FROMOPEN,DRAWNULL),NODRAW;虚拟量比 :VVOL/(REF(MA(V,5),1)),LINETHICK0,COLORRED;获利比例 %:WINNER(C)*100,COLORLIBLUE;涨幅 %:(C-REF(C,1))/REF(C,1)*100,LINETHICK0;量比 1:= 量比 >1.5 OR 虚拟量比 >1.5;换手率 %1:= 换手率 %>5;获利比例 %1:= 获利比例 %>70;涨幅 %1:= 涨幅 %>3;启动 := 换手率 %1 AND 量比 1 AND 获利比例 %1 AND 涨幅 %1 ;起涨点:IF(启动,101,0)COLORRED,LINETHICK2;6、庄家建仓VAR1:=REF(LOW,1);VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),13,1)*4;VAR3:=EMA(VAR2,13);VAR4:=LLV(LOW,34);VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),3);主力进场:STICKLINE(VAR5>REF(VAR5,1),0,VAR5,7,0 ),COLORRED;7、出色超赢JRH:=HHV(C,2);JRL:=LLV(C,2);MA3:=MA(CLOSE,3);YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;VAR1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));VAR2:=(REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR3:=(REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));VAR4:=(REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));实用标准文档VAR5:=(REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));VAR6:=(REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));VAR7:=(REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));VAR8:=(REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));VAR9:=(REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));VARA:=(REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));VARB:=(REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));VARC:=(REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));VARD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2));VARE:=(REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));VARF:=(REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));VAR10:=(REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));VAR11:=(REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));VAR12:=(REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));VAR13:=(REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));VAR14:=(REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));VAR15:=(REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));VAR16:=(REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));VAR17:=(REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));VAR18:=(REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));VAR19:=((REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15OR VAR16 OR VAR17 OR VAR18,1)) AND VAR1);VAR1A:=((REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR实用标准文档VAR8 OR VAR9 OR VARA OR VARB OR VARC,1)) AND VARD);红色持股 :VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8OR VAR9 OR VARA OR VARB OR VARC,COLOR0000FF,NODRAW;离场 :=IF( 红色持股 ,JRL,DRAWNULL);明离场价 :=离场 ,COLORFF99FF,NODRAW;今离场价:=REF(离场,1)COLOROOOOFF,NODRAW;青色观望 :VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 ORVAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,COLORFFFF00,NODRAW;进:=IF(青色观望,JRH,DRAWNULL);明进场价:=进,COLOR33AACC,NODRAW;今进场价:=REF(明进场价,1),COLORFFOOOO,NODRAW;黄色低买 :VAR19,COLOR33AACC,NODRAW;洋红离场 :VAR1A,COLORMAGENTA,NODRAW;急跌关注 :(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100<-14,COLORWHITE,NODRAW;上市日期年 :REF(YEAR,BARSCOUNT(CLOSE)-1),NODRAW,COLOR0000FF;月:REF(MONTH,BARSCOUNT(CLOSE)-1),NODRAW,COLORFFOOFF;日:REF(DAY,BARSCOUNT(CLOSE)-1),NODRAW,COLOROOFFFF;STICKLINE(ISLASTBAR AND (红色持股OR REF(红色持股,1)=1),今离场价,今离场价,3O,1),COLOROOOOFF;STICKLINE(ISLASTBAR AND (青色观望OR REF(青色观望,1)=1),今进场价,今进场价,3O,1),COLOROOFFOO;实用标准文档STICKLINE(C>=O,L,H,0,0),COLOR0000CC;STICKLINE(C<O,L,H,0,0),COLOR999900;STICKLINE(1,C,O,3.5,0),COLOR858500;STICKLINE(C>=O,C,O,3.5,0),COLOR0000E5; STICKLINE( 红色持股,CLOSE,O,2.8,0),COLOR000055; STICKLINE( 红色持股,CLOSE,O,2,0),COLOR000088; STICKLINE( 红色持股,CLOSE,O,1.5,0),COLOR0000AA; STICKLINE( 红色持股,CLOSE,O,1,0),COLOR0000CC; STICKLINE( 红色持股,CLOSE,O,0.5,0),COLOR0000EE; STICKLINE( 青色观望,CLOSE,O,2.8,0),COLOR555500; STICKLINE( 青色观望,CLOSE,O,2,0),COLOR888800; STICKLINE( 青色观望,CLOSE,O,1.5,0),COLORAAAA00; STICKLINE( 青色观望,CLOSE,O,1,0),COLORCCCC00; STICKLINE( 青色观望,CLOSE,O,0.5,0),COLOREEEE00; CO:=(C-O);STICKLINE( 急跌关注 ,O,C-CO/2,2.8,0),COLOR555555; STICKLINE( 急跌关注 ,O,C-CO/2,2,0),COLOR888888; STICKLINE( 急跌关注 ,O,C-CO/2,1.5,0),COLORAAAAAA; STICKLINE( 急跌关注 ,O,C-CO/2,1,0),COLORCCCCCC; STICKLINE( 急跌关注 ,O,C-CO/2,0.5,0),COLOREEEEEE; STICKLINE( 黄色低买 ,O,O+CO/3,2.8,0),COLOR335555; STICKLINE( 黄色低买 ,O,O+CO/3,2,0),COLOR338888;实用标准文档STICKLINE( 黄色低买,O,O+CO/3,1.5,0),COLOR33AAAA;STICKLINE( 黄色低买,O,O+CO/3,1,0),COLOR33CCCC;STICKLINE( 黄色低买,O,O+CO/3,0,0),COLOR33EEEE;STICKLINE( 洋红离场,O,O+CO/3,2.8,0),COLOR550055;STICKLINE( 洋红离场,O,O+CO/3,2,0),COLOR880088;STICKLINE( 洋红离场,O,O+CO/3,1.5,0),COLORAA00AA;STICKLINE( 洋红离场,O,O+CO/3,1,0),COLORCC00CC;STICKLINE( 洋红离场,O,O+CO/3,0.5,0),COLOREE00EE;压力 :MA(REF(HHV(C,30),1),2),POINTDOT,COLOR9DFFFF;支撑 :MA(REF(LLV(C,30),1),2),POINTDOT,COLORABFF46;PMA:MA(C,5),COLORWHITE,LINETHICK2;IF(PMA>REF(PMA,1),PMA,DRAWNULL),COLORRED,LINETHICK2;IF(PMA<REF(PMA,1),PMA,DRAWNULL),COLORGREEN,LINETHICK2;X:=(3*C+L+O+H)/6;多空线 :(20*X+19*REF(X,1)+18*REF(X,2)+17*REF(X,3)+16*REF(X,4)+15*REF(X,5)+14*REF (X,6)+13*REF(X,7)+12*REF(X,8)+11*REF(X,9)+10*REF(X,10)+9*REF(X,11)+8*REF(X,12)+7*REF(X,13)+6*REF(X,14)+5*REF(X,15)+4*REF(X,16)+3*REF(X,17)+2*REF(X,18)+ REF(X,20))/210,COLORFF00FF,LINETHICK2;DD:= 多空线 <REF( 多空线 ,1);IF(DD, 多空线 ,DRAWNULL),COLOR00FFFF,LINETHICK2;实用标准文档A:=(PMA> 多空线 );IF(A,多空线,DRAWNULL),COLOR33FF33,POINTDOT,LINETHICK4;RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,9,1);D:=SMA(K,9,1);J:=3*K-2*D;X2:=LLV(J,2)=LLV(J,8);Y:=IF(CROSS(J,REF(J+0.01,1)) AND X2 AND J<20,30,0);DRAWTEXT(CROSS(J,REF(J+0.01,1)) AND X2 AND J<20,LOW*0.98,' '),COLORYELLOW;8、彩色成交量STICKLINE(VOL > 0,VOL,0,3,0),COLOR333333;STICKLINE(VOL > 0,VOL,0,2.5,0),COLOR998855;STICKLINE(VOL > 0,VOL,0,1.7,0),COLORBBAA77;STICKLINE(VOL > 0,VOL,0,0.9,0),COLORDDCC99;STICKLINE(VOL > 0,VOL,0,0.04,0),COLORFFEEBB;换手 :=VOL/CAPITAL*100,COLORRED;STICKLINE( 换手 >2 ,VOL ,CAPITAL*0.02,3,0),COLOR00AAAA;STICKLINE( 换手 >2 ,VOL ,CAPITAL*0.02,2.5,0),COLOR00CCCC;STICKLINE( 换手 >2 ,VOL ,CAPITAL*0.02,1.7,0),COLOR00EEEE;STICKLINE( 换手 >2 ,VOL ,CAPITAL*0.02,0.08,0),COLOR00FFFF;STICKLINE( 换手 >4 ,VOL ,CAPITAL*0.04,2.5,0 ),COLOR00BB00;STICKLINE( 换手 >4 ,VOL ,CAPITAL*0.04,1.7,0 ),COLOR00DD00;STICKLINE( 换手 >4 ,VOL ,CAPITAL*0.04,3,0 ),COLOR009900;实用标准文档STICKLINE( 换手 >4 ,VOL ,CAPITAL*0.04,0.8,0 ),COLOR00FF00; STICKLINE( 换手 >7 ,VOL ,CAPITAL*0.07,3,0),COLORBROWN; STICKLINE( 换手 >7 ,VOL ,CAPITAL*0.07,2.5,0),COLOR0000AA; STICKLINE( 换手 >7 ,VOL ,CAPITAL*0.07,1.7,0),COLOR0000CC; STICKLINE( 换手 >7 ,VOL ,CAPITAL*0.07,0.8,0),COLOR0000DD;五天均量 :MA(VOL,5),COLORRED,LINETHICK0.01;廿天均量 :MA(VOL,20),COLORWHITE,LINETHICK0.01;HSS:=V/CAPITAL*100,NODRAW;{ 显示当日换手 }五天换手率 :SUM(HSS,5),NODRAW;廿天换手率 :SUM(HSS,20),NODRAW;抛压 :STICKLINE(CROSS(84,RSI),0 ,VOL,1.5,0),COLORBLUE,LINETHICK5; V24:MA(VOL,24),COLORLIBLUE;V10:MA(VOL,10),COLORRED;V3:MA(VOL,3),COLORLIGRAY;9、涨停回马枪(有主图)均价线 :=AMOUNT/V/100;C2:=REF(C,1);涨停 :=IF(REF(C,1)*1.1-C<0.01 ,1,0);STICKLINE( 涨停 ,0,5,6,0),COLORYELLOW;DRAWTEXT(涨停,8,'涨停'),COLORYELLOW;实用标准文档MA13:=MA(C,13),COLORGRAY;MA21:=MA(C,21),COLORWHITE;支撑线 :=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4; LC:=REF(CLOSE,1);操作线 :=SMA(MAX(CLOSE-LC,0),2,1)/SMA(ABS(CLOSE-LC),2,1)*100; 趋势线 :=SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*100; 震仓线 :=45;震仓线 2:=50;逃命线 :=80;抄底线 :=20;绝底线 :=5;PP2:= 操作线<震仓线 2 AND REF( 操作线,1)> 震仓线 2 ;PP:=操作线 < 震仓线 AND REF(操作线,1)>震仓线;PP3:= 操作线<抄底线 AND REF( 操作线,1)> 抄底线 ;HH:=COUNT( 涨停,13)>=1;STICKLINE(PP2 AND HH,0,5,3,0),COLORRED;STICKLINE(PP AND HH,0,5,3,0),COLORRED;STICKLINE(PP3 AND HH,0,5,3,0),COLORRED;DRAWTEXT(PP2 AND HH,8,' 预警'),COLORRED;DRAWTEXT(PP AND HH,8,' 预警'),COLORRED;DRAWTEXT(PP3 AND HH,8,' 预警'),COLORRED;A:=SMA(L,4,3) ;绿色买入 :IF (((A AND REF(PP ,1) AND HH) OR (A AND REF(PP3,1) AND HH)),1,0 ); STICKLINE(A AND REF(PP ,1) AND HH ,0,10,1,0),COLORGREEN;DRAWICON(A AND REF(PP ,1) AND HH,12,1);STICKLINE(A AND REF(PP3,1) AND HH ,0,10,1,0)COLORGREEN;DRAWICON(A AND REF(PP3,1) AND HH,12,1);10 、海风 3 号M1:=MA(CLOSE,1);M2:=(LOW+HIGH+CLOSE)/3;M3:= MA(M2,5);M4:= HHV(M3,10);Z:=HHV((M1<M4),10) OR HHV((M1<M4),10);S:=EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,35)-LLV(LOW,34)),3);DRAWTEXT( FILTER(CROSS(S ,60 ),20),L*0.98,' ▲'),COLORYELLOW ;{DRAWTEXT(FILTER( Z,9),H*1.028,' ★') ,COLORBLUE;STICKLINE( S>60,O,C,4,0) ,COLORFF9BFB;}STICKLINE( S>60,O,C,2,0) ,COLORRED;{STICKLINE( S>60,O,C,1.5,0) ,COLORFD9BFB; }STICKLINE( S>60,H,L,0,0) ,COLORRED;{STICKLINE( S<60,O,C,4,0) ,COLOR01DC38;STICKLINE( S<60,O,C,2.5,0) ,COLOR01FE41;}STICKLINE( S<60,O,C,2,0) ,COLORGREEN;STICKLINE( S<60,H,L,0,0) ,COLORGREEN;VAR1:MA(CLOSE,5);VAR2:MA(CLOSE,10);VAR3:MA(CLOSE,20);VAR60:MA(CLOSE,60);VAR120:MA(CLOSE,120);VAR4:=OPEN<VAR1 OR OPEN<VAR2 OR OPEN<VAR3;VAR5:=CLOSE>MAX(VAR1,MAX(VAR2,MAX(VAR3,VAR60)));VAR6:=VOL/MA(VOL,30)>1.2;VAR7:=CLOSE/REF(CLOSE,1)>1.049;VAR8:=VAR4 AND VAR5 AND VAR6 AND VAR7;VAR9:=VAR8 AND (REF(BARSLAST(VAR8),1)>60 OR BARSSINCE(VAR8)=0); DRAWICON(VAR9 ,L*0.98,1) ;STICKLINE( VAR9,O,C,6,0) ,COLORYELLOW;STICKLINE( VAR9,H,L,0.6,0) ,COLORYELLOW;11 、涨停时间窗(通达信金融终端副图) N:=13;WR 大于 80 考虑买:100*(HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N))丄 INETHICKO; 均价:AMOUNT/(VOL*100),LINETHICK0,COLORYELLOW;ZT:=C/REF(C,1)>1.O97;XH:=FILTER(ZT,13);BH:=BARSLAST(ZT);STICKLINE(ZT,0,L*1,3,0),COLORYELLOW;DRAWTEXT(ZT,L*1.1,' 涨停 '),COLORF00FF0;VARZT:=BARSLAST(C/REF(C,1)>1.097);AA:=BETWEEN(C,REF(L,BH)*1.01,REF(L,BH)*0.987); STICKLINE(AA,0,L*0.5,2,0),COLORBLUE;DRAWTEXT(AA,L*0.6,' 警戒 '),COLORWHITE;STICKLINE(AA AND VARZT=2,0,L*0.8,2,0),COLORRED; DRAWTEXT(AA AND VARZT=2,L*0.9,' 时间窗 '),COLORWHITE; STICKLINE(AA AND VARZT=4,0,L*0.8,2,0),COLORRED; DRAWTEXT(AA AND VARZT=4,L*0.9,' 时间窗 '),COLORWHITE; STICKLINE(AA AND VARZT=7,0,L*0.8,2,0),COLORRED; DRAWTEXT(AA AND VARZT=7,L*0.9,' 时间窗 '),COLORWHITE; STICKLINE(AA AND VARZT=12,0,L*0.8,2,0),COLORRED; DRAWTEXT(AA AND VARZT=12,L*0.9,' 时间窗 '),COLORWHITE; STICKLINE(AA AND VARZT=20,0,L*0.8,2,0),COLORRED; DRAWTEXT(AA AND VARZT=20,L*0.9,' 时间窗 '),COLORWHITE;。
(1)主图巴菲特操盘线及副图主力爆发、力挽狂澜、四色能量指标源码
(1)主图巴菲特操盘线及副图主力爆发、力挽狂澜、四色能量指标源码主图巴菲特操盘线指标源码生命线:MA(CLOSE,26),COLORRED,LINETHICK2;STICKLINE(C>=生命线 ANDC>=O,H,L,0,1),COLORRED;STICKLINE(C>=生命线 ANDC>=O,C,O,2.5,0),COLORRED;DP:=IF(C=INDEXC,0,1);GJ:=AMOUNT/V/100;多头线:EMA(C,1.5),COLOR0000CC;空头线:EMA(C,5),COLORMAGENTA;均衡线:EMA(空头线,5),COLORGREEN;VARF1:=COUNT(CROSS(多头线,均衡线),2)=1;VARF2:=COUNT(CROSS(空头线,均衡线),2)=1;ZAI:=FILTER(VARF1 AND VARF2,2);DRAWTEXT(ZAI,均衡线*0.98,'↖主力拉升'),COLOR00FF00;MTM:=CLOSE-REF(CLOSE,1);DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);DY:=HHV(DX,2)=HHV(DX,7) ANDCOUNT(DX>50,2) AND CROSS(MA(DX,2),DX);LC:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;ZDF:=(C-REF(C,1))/REF(C,1)*100;STICKLINE(ZDF>9.8,O,C,2.5,0),COLORRED;STICKLINE(ZDF<-9.8,O,C,2.5,0),COLORBLUE;白买进:DRAWNULL,NODRAW,COLORWHITE;黄加仓:DRAWNULL,NODRAW,COLORYELLOW;蓝跌:DRAWNULL,NODRAW,COLORBLUE;绿见顶:DRAWNULL,NODRAW,COLORGREEN;红强势:DRAWNULL,NODRAW,COLORRED;红蓝调整:DRAWNULL,NODRAW,COLORGRAY;VAR1:=(100 - ((90 * (HHV(HIGH,21) - CLOSE))/ (HHV(HIGH,21) - LLV(LOW,21))));VAR2:=(100 - ((90 * (HHV(HIGH,21)- CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));VAR3:=(100 - MA(((100 *(HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));DRAWICON(CROSS(VAR2,MA(VAR3,6)),(LOW *0.998),1);DRAWICON(CROSS(MA(VAR3,6),VAR1),(HIGH *1.013),9);DRAWTEXT(CROSS(VAR2,MA(VAR3,6)),(LOW *0.984),'↖买'),COLOR4440FF;DRAWTEXT(CROSS(MA(VAR3,6),VAR1),(HIGH *1.02),'卖'),COLORFFFF34;VARE1:=EMA(C,3);VARE2:=EMA(C,5);VARE3:=EMA(C,10);VAR 4:=EMA(C,20);VAR5:=EMA(C,30);VAR6:=(VAR2+VAR3+VAR4+VA R5)/4;VAR7:=(VAR6-REF(VAR6,15))/REF(VAR6,15)*100;VAR8:=(VAR6-REF(VAR6,15))/REF(VAR6,15)*100;VAR9:=EMA(VAR7,8);STICKLINE(VAR7<1*REF(VAR7,1),H,L,0,1),COLORBLUE;STICKLINE(VAR7<1*REF(VAR7,1),O,C,2.5,1),COLORBLUE;STICKLINE(VAR7<1*REF(VAR7,1) AND CSTICKLINE(VAR7<1*REF(VAR7,1) AND CSTICKLINE(VAR7>1*REF(VAR7,1),H,L,0,1),COLORRED;STICKLINE(VAR7>1*REF(VAR7,1),O,C,2.5,1),COLORRED;STICKLINE(VAR7>1*REF(VAR7,1) AND CSTICKLINE(VAR7<1*REF(VAR7,1)ANDVAR9>1*REF(VAR9,1),H,L,0,1),COLORGREEN;STICKLINE(VAR7<1*REF(VAR7,1)ANDVAR9>1*REF(VAR9,1),O,C,2.5,1),COLORGREEN;STICKLINE(VAR7<1*REF(VAR7,1) ANDVAR9>1*REF(VAR9,1) AND C买进价:=((C-REF(MA(C,6),1))/6+MA(C,6))*1.004;买进条件:=CROSS(C,买进价) AND买进价>REF(买进价,1);STICKLINE(买进条件,H,L,0,1),COLORWHITE,LINETHICK1;STICKLINE(买进条件,O,C,2.5,0),COLORWHITE,LINETHICK2;加码价:=((C-REF(MA(C,18),1))/18+MA(C,18))*1.004;加码条件:=CROSS(C,加码价) AND加码价>REF(加码价,1);STICKLINE(加码条件,H,L,0,1),COLORYELLOW,LINETHICK2;STICKLINE(加码条件,O,C,2.5,0),COLORYELLOW,LINETHICK2;{ 原文链接:/GUPIAOGONGSHI/43164.HTML};主力爆发指标源码VAR0:=DYNAINFO(5);VAR1:=BARSCOUNT(HIGH);VAR2:=(SMA((HIGH / HHV(CLOSE,120)),3,1) *100);低位金叉跟进:=IF((VAR1 > 20),VAR2,0);VAR11:=IF((HIGH < VAR0),0,IF((LOW >VAR0),1,(((VAR0 - HIGH) + 0.009) / ((LOW - HIGH) + 0.009))));AAA:=(DMA(VAR11,(VOL /SUM(VOL,90))) *60);BBB:=(DMA(VAR11,(VOL / CAPITAL)) *60);VAR12:=IF(C>1000,AAA,BBB);VAR3:=IF((((VAR12 > 0) AND (VAR12 >REF(VAR12,1))) AND (低位金叉跟进 >= 88)),VAR2,0);VAR4:=((3 * SMA((((CLOSE - HHV(HIGH,27)) /(LLV(LOW,27) - HHV(HIGH,27))) * 100),5,1)) - (2 * SMA(SMA((((HIGH -HHV(HIGH,27)) / (LLV(LOW,27) - HHV(HIGH,27))) *100),5,1),3,1)));VAR5:=EMA(VAR4,8);VAR6:=((3 * SMA((((HIGH - HHV(HIGH,55)) /(LLV(LOW,55) - HHV(HIGH,55))) * 100),5,1)) - (2 * SMA(SMA((((HIGH -HHV(HIGH,55)) / (LLV(LOW,55) - HHV(HIGH,55))) *100),5,1),3,1)));VAR7:=(EMA(VAR6,3) - 10);A:=1.1*C;B:=0.9*C;B1:=100*(WINNER(A)-WINNER(B));C1:=MA(C,13)D1:=IF(C>1000,CROSS(VAR3,22),CROSS(VAR3,24));锁定筹码:=100-B1,COLOR0084FF;锁定区:STICKLINE(锁定筹码>70 ANDC1,0,锁定筹码-65,8,0),COLOR0000FF;主力资金:EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3),COLORRED,LINETHICK2;即将爆发线: 65,COLOR00FF00;爆发线:80,COLORWHITE,LINETHICK1;DRAWTEXT(CROSS(主力资金,爆发线),主力资金,'★爆发!'),COLORYELLOW;爆发警戒线: 50,COLOR00FF00;抄底线:20,COLORWHITE,LINETHICK2;DRAWTEXT(CROSS(主力资金,抄底线),主力资金,'★抄底'),COLORWHITE;DRAWTEXT(CROSS(主力资金,爆发警戒线),主力资金,'★加仓'),COLORWHITE;DRAWTEXT(CROSS(主力资金,即将爆发线),主力资金,'★加仓'),COLORWHITE;DRAWTEXT(CROSS(爆发线,主力资金),爆发线,'★空仓'),COLORWHITE;LC:= REF(C,1);F1:=ZIG(3,15);方向:IF((F1>REF(F1,1)),5,105),COLOR00FF00,LINETHICK2;DRAWTEXT(CROSS(抄底线,方向),抄底线,'★逢低进场!'),COLORRED;DRAWTEXT(CROSS(方向,爆发线),爆发线+20,'★逢高出场!'),COLORWHITE;力挽狂澜指标源码MSD:EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3),COLORWHITE;风险区:80,COLORFF85FF;安全区:20,COLORYELLOW;天线:100,COLORFFFF00,LINETHICK2;地线:=0,LINETHICK2,COLOR6699FF;强弱线:50,COLORGREEN,POINTDOT;VAR1:=HHV(HIGH,9)-LLV(LOW,9);VAR2:=HHV(HIGH,9)-CLOSE;VAR3:=CLOSE-LLV(LOW,9);VAR4:=VAR2/VAR1*100-70;VAR5:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60));VAR6:=(2*CLOSE+HIGH+LOW)/4;VAR7:=SMA(VAR3/VAR1*100,3,1);VAR8:=LLV(LOW,34);VAR9:=SMA(VAR7,3,1)-SMA(VAR4,9,1);VAR10:=IF(VAR9>100,VAR9-100,0);VAR11:=HHV(HIGH,34);VAR12:=EMA((VAR6-VAR8)/(VAR11-VAR8)*100,13);VAR13:=EMA(0.667*REF(VAR12,1)+0.333*VAR12,2);趋势:VAR13,COLORRED;STICKLINE(VAR12-VAR13>0,VAR12,VAR13,8,0),COLORRED;STICKLINE(VAR12-VAR13<0,VAR12,VAR13,8,0),COLOR00FF0F;VARK1:=EMA(HHV(HIGH,500),21);VARK2:=EMA(HHV(HIGH,250),21);VARK3:=EMA(HHV(HIGH,90),21);VARK4:=EMA(LLV(LOW,500),21);VARK5:=EMA(LLV(LOW,250),21);VARK:=EMA(LLV(LOW,90),21);VARK7:=EMA((VARK4*0.96+VARK5*0.96+VARK*0.96+VARK 1*0.558+VARK2*0.558+VARK3*0.558)/6,21);VARK8:=EMA((VARK4*1.25+VARK5*1.23+VARK*1.2+VARK1* 0.55+VARK2*0.55+VARK3*0.65)/6,21);VARK9:=EMA((VARK4*1.3+VARK5*1.3+VARK*1.3+VARK1*0. 68+VARK2*0.68+VARK3*0.68)/6,21);VARKA:=EMA((VARK7*3+VARK8*2+VARK9)/6*1.738,21);VARKB:=REF(LOW,1);VARKC:=SMA(ABS(LOW-VARKB),3,1)/SMA(MAX(LOW-VARKB,0),3,1)*100;VARKD:=EMA(IF(CLOSE*1.35<=VARKA,VARKC*10,VARKC/10 ),3);VARKE:=LLV(LOW,30);VARKF:=HHV(VARKD,30);VARK10:=IF(MA(CLOSE,58),1,0);火焰山:EMA(IF(LOW<=VARKE,(VARKD+VARKF*2)/2,0),3)/618*VARK1 0;火焰: STICKLINE(火焰山>0,0,火焰山,4,1);今量: 火焰山;STICKLINE(火焰山>0,0,今量*1.2,8,0), COLOR0000FF;STICKLINE(火焰山>0,0,今量*0.8,8,0), COLOR0066FF;STICKLINE(火焰山>0,0,今量*0.6,8,0), COLOR0099FF;STICKLINE(火焰山>0,0,今量*0.4,8,0), COLOR00CCFF;STICKLINE(火焰山>0,0,今量*0.2,8,0), COLOR00FFFF;四色能量指标源码V1:=DMA((((HIGH + LOW) + (CLOSE * 2)) / 4),0.9);HY1:=REF(EMA(V1,3),1);多空趋势:=(MA((CLOSE - HY1) * 28,2))*0.1;操盘4:STICKLINE(多空趋势>=0 AND多空趋势>=REF(多空趋势,1),24,24+多空趋势,1.5,0),COLORRED;减仓4:STICKLINE(多空趋势>=0 AND 多空趋势<REF(多空趋势,1),24,24+多空趋势,1.5,0), COLORBLUE;反弹4:STICKLINE(多空趋势<0 AND多空趋势>=REF(多空趋势,1),24,22+多空趋势,1.5,0),COLORCYAN;寻底4:STICKLINE(多空趋势<0 AND 多空趋势<REF(多空趋势,1),24,24+多空趋势,1.5,0),COLORGREEN;DRAWTEXT(ISLASTBAR=1,IF(多空趋势>=0,22,22.3),'多空'),COLORWHITE;换手:=V*100/CAPITAL;主力:=MA(换手,4);大户:=MA(换手,9);中户:=MA(换手,17);散户:=MA(换手,34);均量:=(主力+大户+中户+散户)/4;成交量:V,COLORWHITE,NODRAW;主力能量:(主力-均量)COLORMAGENTA,NODRAW;大户能量:(大户-均量)COLORYELLOW,NODRAW;中户能量:(中户-均量)COLORLIBLUE,NODRAW;散户能量:(散户-均量)COLORBLUE,NODRAW;操盘:STICKLINE(主力能量>=0 AND主力能量>=REF(主力能量,1),14.4,14.4+主力能量,1.5,0),COLORRED;减仓:STICKLINE(主力能量>=0 AND 主力能量<REF(主力能量,1),14.4,14.4+主力能量,1.5,0),COLORYELLOW;反弹:STICKLINE(主力能量<0 AND主力能量>=REF(主力能量,1),14.4,14.4+主力能量,1.5,0),COLORGREEN;寻底:STICKLINE(主力能量<0 AND 主力能量<REF(主力能量,1),14.4,14.4+主力能量,1.5,0),COLORGREEN;DRAWTEXT(ISLASTBAR=1,IF(主力能量>=0,14.4,14.6),'机构'),COLORMAGENTA;{ 股旁网_通达信股票指标公式}操盘1:STICKLINE(大户能量>=0 AND大户能量>=REF(大户能量,1),9.6,9.6+大户能量,1.5,0),COLORRED;减仓1:STICKLINE(大户能量>=0 AND 大户能量<REF(大户能量,1),9.6,9.6+大户能量,1.5,0),COLORYELLOW;反弹1:STICKLINE(大户能量<0 AND大户能量>=REF(大户能量,1),9.6,9.6+大户能量,1.5,0),COLORGREEN;寻底1:STICKLINE(大户能量<0 AND 大户能量<REF(大户能量,1),9.6,9.6+大户能量,1.5,0),COLORGREEN;DRAWTEXT(ISLASTBAR=1,IF(大户能量>=0,9.6,9.8),'大户'),COLORYELLOW;操盘2:STICKLINE(中户能量>=0 AND中户能量>=REF(中户能量,1),4.8,4.8+中户能量,1.5,0),COLORRED;减仓2:STICKLINE(中户能量>=0 AND 中户能量<REF(中户能量,1),4.8,4.8+中户能量,1.5,0),COLORRED;反弹2:STICKLINE(中户能量<0 AND中户能量>=REF(中户能量,1),4.8,4.8+中户能量,1.5,0),COLORGREEN;寻底2:STICKLINE(中户能量<0 AND 中户能量<REF(中户能量,1),4.8,4.8+中户能量,1.5,0),COLORGREEN;DRAWTEXT(ISLASTBAR=1,IF(中户能量>=0,4.8,5),'中户'),COLORLIBLUE;操盘3:STICKLINE(散户能量>=0 AND散户能量>=REF(散户能量,1),0,散户能量,1.5,0),COLORRED;减仓3:STICKLINE(散户能量>=0 AND 散户能量<REF(散户能量,1),0,散户能量,1.5,0),COLORRED;反弹3:STICKLINE(散户能量<0 AND散户能量>=REF(散户能量,1),0,散户能量,1.5,0),COLORGREEN;寻底3:STICKLINE(散户能量<0 AND 散户能量<REF(散户能量,1),0,散户能量,1.5,0),COLORGREEN;DRAWTEXT(ISLASTBAR=1,IF(散户能量>=0,-0.3,0.3),'散户'),COLORBLUE;JZ:=V/(ABS(主力能量)+ABS(大户能量)+ABS(中户能量)+ABS(散户能量));{4,9,17,34日换手偏离值均分成交量}ZLCJ:=JZ*ABS(主力能量);{4日换手偏离均量值换算当日成交量}DHCJ:=JZ*ABS(大户能量);{9日换手偏离均量值换算当日成交量} ZHCJ:=JZ*ABS(中户能量);{17日换手偏离均量值换算当日成交量} SHCJ:=JZ*ABS(散户能量);{34日换手偏离均量值换算当日成交量};换手率:VOL/CAPITAL*100,LINETHICK0;机构量:=ZLCJ,COLORMAGENTA,NODRAW;大户量:=DHCJ,COLORYELLOW,NODRAW;中户量:=ZHCJ,COLORLIBLUE,NODRAW;散户量:=SHCJ,COLORBLUE,NODRAW;。
自用的副图指标:通达信跟庄筹码副图源码 无未来
自用的副图跟庄筹码(源码、贴图、无未来函数)EMA1:=EMA(C,1);EMA5:=EMA(C,5);EMA10:=EMA(C,10);EMA20:=EMA(C,20);EMA30:=EMA(C,30);EMA60:=EMA(C,60);EMA120:=EMA(C,120);均价线:=(EMA1+EMA5+EMA10+EMA20+EMA30+EMA60+EMA120)/7;R:=(2*L+3*均价)/5;{最低价和均价的均值}R1:=(2*H+3*均价)/5;M3:=EMA((R+R1)/2,3);{指数的平均移动}M5:=EMA((R+R1)/2,5);M8:=EMA((R+R1)/2,8),COLORWHITE;M13:=EMA((R+R1)/2,13);M21:=EMA((R+R1)/2,21),COLORYELLOW;M34:=EMA((R+R1)/2,34);M55:=EMA((R+R1)/2,55);黄金线:=EMA((M3+M5+M8+M13+M21+M34+M55)/7,(3+5+8+13+21+34+55)/7);{各指数的平均移动的均值}跟庄线:=EMA(LLV((R+R1)/2,2),3),COLORWHITE,LINETHICK1;筹码:=(跟庄线-黄金线)/(COST(90)-COST(10))*100,COLOR00FFFF;筹码2:=(跟庄线-黄金线)/(COST(90)-COST(13))*100,COLOR00FFFF;周筹码:=EMA(筹码,5),LINETHICK1,COLORRED;筹码盈亏度:=2*(筹码2-周筹码);HZL:=CROSS(筹码盈亏度,0);LZH:=CROSS(0,筹码盈亏度);BC:=BARSLAST(HZL OR LZH)+1;ZGHZ:=IF(筹码盈亏度>0,HHV(筹码盈亏度,BC),0);ZGLZ:=IF(筹码盈亏度<0,LLV(筹码盈亏度,BC),0);DRAWBAND(ZGHZ,RGB(105,77,77),0,RGB(77,77,77));DRAWBAND(ZGLZ,RGB(80,0,0),0,RGB(66,88,66));STICKLINE(筹码盈亏度>0,0,筹码盈亏度,3,0),COLORLIMAGENTA;STICKLINE(筹码盈亏度<0,0,筹码盈亏度,3,0),COLORLICYAN;STICKLINE(筹码盈亏度>REF(筹码盈亏度,1),0,筹码盈亏度,1.5,0),COLORYELLOW; STICKLINE(筹码盈亏度<REF(筹码盈亏度,1),0,筹码盈亏度,1.5,0),COLORBROWN; 筹码D:(跟庄线-黄金线)/(COST(90)-COST(13))*100,COLOR00FFFF,LINETHICK2; 周筹码D:EMA(筹码,5),LINETHICK2,COLORRED;IF(筹码D>=REF(筹码D,1),筹码D,DRAWNULL),COLORLIBLUE,LINETHICK2;筹码趋势:2*EMA(筹码,55),LINETHICK2,COLORMAGENTA;IF(筹码趋势<REF(筹码趋势,1),筹码趋势,DRAWNULL),COLORLIGRAY,LINETHICK2;。
通达信指标公式源码 未来买卖点副图指标
EMA10:EMA(C,10),COLOR0000FF;A1:=REF(HIGH,3)=HHV(HIGH,2*6+1);B1:=FILTER(A1,3);C1:=BACKSET(B1,3+1);D1:=FILTER(C1,3+1);{高点}A2:=REF(LOW,3)=LLV(LOW,2*6+1);B2:=FILTER(A2,3+1);C2:=BACKSET(B2,3+1);D2:=FILTER(C2,3);{低点}E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2;E2:=(HIGH+LOW)/2;{高低点出现在同一K线上时可作取舍}H1:=(D1 AND NOT(D2 AND E1>=E2)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=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,LOW,10000),X1)); G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I1,1);{过滤后低点}L2:=LD OR BARSTATUS=2 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);{过滤后高点}DRAWLINE(LD,L,HD,H,0),COLORWHITE;DRAWLINE(HD,H,LD,L,0),COLORWHITE;J1:=BACKSET(BARSTATUS=2 ,MIN(BARSLAST(HD),BARSLAST(LD))+1);J2:=J1>REF(J1,1);DRAWLINE(J2,IF(HD,H,L),BARSTATUS=2 ,IF(BARSLAST(HD)>BARSLAST(LD), H,L),0),COLORWHITE;C点:=BARSLAST(LD);DRAWTEXT(LD AND BARSLAST(HD)<BARSLAST(REF(LD,1)) ,L*0.992,'买入'),COLORRED;DRAWTEXT(HD,H*1.005,'卖点'),COLORYELLOW;A11:=REF(L,BARSLAST(LD));B11:=REF(H,BARSLAST(HD));TA11:=BARSLAST(LD);TB11:=BARSLAST(HD);KF:=SQRT(B11/A11);ZKF:=SQRT(SQRT(B11/A11));C测低1:=B11/(KF+ZKF-1);C测高1:=B11/ZKF;C测中1:=B11/KF;选C31:=L>0.93*C测低1 AND L<1.03*C测低1 AND LLV(L,3)=LLV(L,10) AND B1>1.1*C AND B1>1.1*A1 AND L>1.1*A1 ;选C21:=L>0.93*C测中1 AND L<1.03*C测中1 AND LLV(L,3)=LLV(L,10) AND B1>1.1*C AND B1>1.1*A1 AND L>1.1*A1 ;选C11:=L>0.9*C测高1 AND L<1.05*C测高1 AND LLV(L,5)=LLV(L,10) AND B1>1.1*C AND B1>1.1*A1 AND L>A1 AND COUNT(选C21,30)>=1;选C2:=COUNT(选C21,3)>=1 AND C>1.02*C测中1 AND C>1.02*REF(C,1) AND LLV(L,3)>=0.93*C测中1;C1预选:=L>0.96*C测高1 AND L<1.04*C测高1;C2预选:=L>0.96*C测中1 AND L<1.04*C测中1;C3预选:=L>0.96*C测低1 AND L<1.04*C测低1;N:=8;HHD:=FILTER(BACKSET(FILTER(REF(H,N)=HHV(H,2*N+1),N),N+1),N); LLD:=FILTER(BACKSET(FILTER(REF(L,N)=LLV(L,2*N+1),N),N+1),N); DRAWNUMBER(HHD,1.025*HIGH,HIGH),COLORFF00FF,LINETHICK6; DRAWNUMBER(LLD,0.98*LOW,LOW),COLORGREEN,LINETHICK6; DRAWNUMBER(ISLASTBAR,C测高1,C测高1),COLOR0000FF,LINETHICK7; DRAWNUMBER(ISLASTBAR,C测中1,C测中1),COLOR0000FF,LINETHICK7; DRAWNUMBER(ISLASTBAR,C测低1,C测低1),COLOR0000FF,LINETHICK7; STICKLINE(C/REF(C,1)>=1.096 AND H=C,O,C,1,0),COLORYELLOW;上趋势线:"CYX.NOTEXT1"DOTLINE,COLOR0000FF;下趋势线:"CYX.NOTEXT2"DOTLINE,COLOR00FFFF;。
通达信指标公式源码 量价相合副图指标 源码
VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));主动买盘:=IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN, VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));主动卖盘:=IF(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)), IF(CLOSE<OPEN,0-VAR1*(HIGH-LOW),0-VOL/2));主动:=SUM(主动买盘,0)/SUM(主动卖盘,0)*-1;低主5:=LLV(主动,5);{好}动比:=主动-低主5;高动5:=6/HHV(动比,5);主动心:=高动5*动比;K1:=主动心+1-REF(主动心,1)>0;K2:=主动心+1-REF(主动心,1)<0;主动心向:=主动心*K1-主动心*K2;{下面是量价了相合}FF:=CLOSE-REF(CLOSE,1);A:=MA(VOL*FF,2);A0:=MA(VOL*FF,3);A1:=MA(VOL*FF,5);A2:=MA(VOL*FF,10);A3:=MA(VOL*FF,20);A4:=MA(VOL*FF,30);B:=A-REF(A,1);B0:=A0-REF(A0,1);B1:=A1-REF(A1,1);B2:=A2-REF(A2,1);B3:=A3-REF(A3,1);B4:=A3-REF(A4,1);量价相合:(B>0)+(B0>0)+(B1>0)+(B2>0)+(B3>0)+(B4>0);YES:(量价相合>1)*量价相合*(主动心向>1 OR 主动心>60);IF(YES>=REF(YES,1),量价相合,DRAWNULL),COLORGREEN,LINETHICK2;IF(YES>=REF(YES,1),YES,DRAWNULL),COLORRED,LINETHICK2;周期1:IF(YES,BARSLAST(CROSS(YES,0.1))+1,0),COLORFF00FF,POINTDOT,LINETHICK0; 5,COLORGREEN;。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
巴菲特理念副图指标源码通达信
右顺:(EMA(C,20)>EMA(C,60) AND EMA(C,60)>EMA(C,120) AND
EMA(C,120)>EMA(C,250))*6,COLORRED;
右线坑:(EMA(C,60)>EMA(C,20) AND EMA(C,60)>EMA(C,120) AND
EMA(C,120)>EMA(C,250))*5,COLORMAGENTA;
左顺:(EMA(C,20)>EMA(C,60) AND EMA(C,60)>EMA(C,250) AND
EMA(C,250)>EMA(C,120))*4,COLORGREEN;
左夹年:(EMA(C,20)>EMA(C,250) AND EMA(C,250)>EMA(C,120) AND EMA(C,120)>EMA(C,60))*3,COLORYELLOW;
右夹年:(EMA(C,20)>EMA(C,120) AND EMA(C,120)>EMA(C,250) AND EMA(C,250)>EMA(C,60))*2,COLORCYAN;
右夹月季:(EMA(C,120)>EMA(C,20) AND EMA(C,20)>EMA(C,60) AND
EMA(C,60)>EMA(C,250)),COLORWHITE;
DRAWTEXT(CROSS(右顺,5),5.5,'右顺:股价未大幅长期上升业绩有增长形态尚可盘不大,关注重点'),COLORRED;
DRAWTEXT(CROSS(右线坑,4),4.5,'右线坑:一般出现在右顺类股票已有升幅回档后可能形成新的基底'),COLORMAGENTA;
DRAWTEXT(CROSS(左顺,3),3.5,'左顺:刚刚突破类小心随时回档洗盘
'),COLORGREEN;
DRAWTEXT(CROSS(左夹年,2),2.5,'左夹年:一般是已成功量价筑底但短期上升较快'),COLORYELLOW;
DRAWTEXT(CROSS(右夹年,1.5),1.5,'右夹年:一般是长期箱形振荡后出现'),COLORCYAN;
DRAWTEXT(CROSS(右夹月季,0.5),0.5,'右夹月季:右派类中走势疲弱后出现'),COLORWHITE;。