叠加大盘指标 副图源码 通达信

合集下载

通达信副图指标公式源码大全

通达信副图指标公式源码大全

副图指标公式源码1、百万踏浪(相传为杨百万看图公式)N1:=9;N:=3;V AR1:=REF(CLOSE,1);标尺: SMA(MAX(CLOSE-V AR1,0),5,1)/SMA(ABS(CLOSE-V AR1),5,1)*100;V AR2:=(CLOSE-LLV(LOW,N1))/(HHV(HIGH,N1)-LLV(LOW,N1))*100;V AR3:=SMA(V AR2,3,1);V AR4:=SMA(V AR3,3,1);V AR5:=SMA(V AR4,3,1);浪: V AR3,COLORBLUE;波: V AR4, COLORRED;段: V AR5 ,COLORYELLOW;V AR6:=CROSS(V AR3,VAR4) AND V AR4<25;STICKLINE(V AR6,0,V AR4+15,5,0), COLORGREEN;V AR7:=CROSS(V AR4,VAR5) AND V AR4<25;V AR8:=V AR7 AND VOL>REF(VOL,1)*2 AND VOL>REF(MA(VOL,5),1)*2; STICKLINE(V AR7,0,V AR4+55,5,0),COLORWHITE;DRAWTEXT(V AR7 AND COUNT(V AR7,10)=1,V AR4+25,'抄底'),COLORYELLOW; STICKLINE(V AR8,0,V AR4+15,5,0),COLORBLUE;DRAWTEXT(V AR8 AND COUNT(V AR8,10)=1,V AR4-1,'放量'),COLORGREEN;V AR9:=CROSS(V AR3,VAR4) AND V AR4>80 AND V AR4>VAR5;STICKLINE(V AR9 AND COUNT(V AR9,5)=1,V AR4-5,100,5,0),COLORYELLOW;V ARA:=CROSS(V AR5,V AR4) AND REF(V AR4,1)>80;STICKLINE(V ARA,V AR4-15,100,15,0), COLORYELLOW;DRAWTEXT(V ARA AND COUNT(V ARA,10)=1,V AR4-25,'逃顶'), COLORYELLOW; V AR1A:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;V AR1B:=SMA((SMA(V AR1A,4,1)-50)*2,3,1);V AR1C:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100; V AR1D:=SMA(V AR1C,4,1);V AR1E:=SMA(V AR1D,3,1);V AR1F:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;V ARE:=REF(LOW,1)*0.9;V ARF:=LOW*0.9;V AR10:=(V ARF*VOL+V ARE*(CAPITAL-VOL))/CAPITAL;V AR11:=EMA(V AR10,30);V AR12:=CLOSE-REF(CLOSE,1);V AR13:=MAX(V AR12,0);V AR14:=ABS(V AR12);V AR15:=SMA(VAR13,7,1)/SMA(V AR14,7,1)*100;V AR16:=SMA(VAR13,13,1)/SMA(V AR14,13,1)*100;V AR17:=BARSCOUNT(CLOSE);V AR18:=SMA(MAX(V AR12,0),6,1)/SMA(ABS(V AR12),6,1)*100;V AR19:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100;V AR20:=V AR18<=25 AND V AR19<-95 AND V AR1F>20 AND V AR1B<-30 AND V AR1E<30 AND V AR11-CLOSE>=-0.25 AND V AR15<22 AND V AR16<28 AND V AR17>50; STICKLINE(V AR20,0,50,10,0),LINETHICK2,COLORBLUE;DRAWTEXT(CROSS(V AR20,0.5) AND COUNT(V AR20=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;STICKLINE((主力> 0),0,主力,3,0),COLOR009CFF;STICKLINE((主力> 0),0,主力,2.8,0),COLOR009CFF;STICKLINE((主力> 0),0,主力,2.5,0),COLOR00C0FF;STICKLINE((主力> 0),0,主力,1.5,0),COLOR00D1FF;STICKLINE((主力> 0),0,主力,1,0),COLOR00EAFF;STICKLINE((主力> 0),0,主力,0.7,0),COLORYELLOW;STICKLINE((游资> 0),0,游资,3,0),COLOR00C100;STICKLINE((游资> 0),0,游资,2.8,0),COLOR00CA00;STICKLINE((游资> 0),0,游资,2.5,0),COLOR00D300;STICKLINE((游资> 0),0,游资,1.5,0),COLOR00DB00;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),COLORFFBB00;STICKLINE((散户> 0),0,散户,0.7,0),COLORLIBLUE;3、黑马起爆点V AR1:=(CLOSE-MA(CLOSE,21))/MA(CLOSE,21)*100;V AR2:=(CLOSE-LLV(LOW,43))/(HHV(HIGH,43)-LLV(LOW,43))*100;V AR3:=SMA(V AR2,2,1);天:100+(-ABS(V AR1)),COLORRED;下:SMA(V AR3,2,1);无:ABS(V AR1),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=1 AND PERIOD=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);V AR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));主买:IF(CLOSE>OPEN,V AR1*(HIGH-LOW),IF(CLOSE<OPEN,V AR1*((HIGH-OPEN)+(CLOSE -LOW)),VOL/2)),COLORRED,POINTDOT;主卖:IF(CLOSE>OPEN,V AR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,V AR1*(HIG H-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;二十日换手:SUM(换手,20);5、起涨点换手率%:VOL/CAPITAL*100,LINETHICK0,COLORYELLOW;量比:V/(REF(MA(V,5),1)),LINETHICK0,COLORRED;VVOL:=IF(CURRBARSCOUNT=1 ANDPERIOD=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:=换手率%>5;量比1:=量比>1.5 OR 虚拟量比>1.5;获利比例%1:=获利比例%>70;涨幅%1:=涨幅%>3;启动:=换手率%1 AND 量比1 AND 获利比例%1 AND 涨幅%1 ;起涨点:IF(启动,101,0)COLORRED,LINETHICK2;6、庄家建仓V AR1:=REF(LOW,1);V AR2:=SMA(ABS(LOW-V AR1),13,1)/SMA(MAX(LOW-VAR1,0),13,1)*4;V AR3:=EMA(VAR2,13);V AR4:=LLV(LOW,34);V AR5:=EMA(IF(LOW<=V AR4,V AR3,0),3);主力进场:STICKLINE(V AR5>REF(V AR5,1),0,V AR5,7,0 ),COLORRED;7、出色超赢JRH:=HHV(C,2);JRL:=LLV(C,2);MA3:=MA(CLOSE,3);YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;V AR1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));V AR2:=(REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); V AR3:=(REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); V AR4:=(REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); V AR5:=(REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); V AR6:=(REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); V AR7:=(REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); V AR8:=(REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); V AR9:=(REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); V ARA:=(REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); V ARB:=(REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); V ARC:=(REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); V ARD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2));V ARE:=(REF(V ARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); V ARF:=(REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); V AR10:=(REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); V AR11:=(REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); V AR12:=(REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); V AR13:=(REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));V AR14:=(REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));V AR15:=(REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));V AR16:=(REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));V AR17:=(REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));V AR18:=(REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));V AR19:=((REF(VARD OR V ARE OR V ARF OR V AR10 OR V AR11 OR V AR12 OR V AR13 OR V AR14 OR V AR15 OR VAR16 OR V AR17 OR V AR18,1)) AND V AR1);V AR1A:=((REF(VAR1 OR V AR2 OR V AR3 OR V AR4 OR V AR5 OR V AR6 OR V AR7 OR V AR8 OR V AR9 OR V ARA OR V ARB OR V ARC,1)) AND V ARD);红色持股:V AR1 OR V AR2 OR V AR3 OR V AR4 OR V AR5 OR V AR6 OR V AR7 OR V AR8 OR V AR9 OR V ARA OR V ARB OR V ARC,COLOR0000FF,NODRAW;离场:=IF(红色持股,JRL,DRAWNULL);明离场价:=离场,COLORFF99FF,NODRAW;今离场价:=REF(离场,1)COLOR0000FF,NODRAW;青色观望:V ARD OR V ARE OR V ARF OR VAR10 OR V AR11 OR V AR12 OR V AR13 OR V AR14 OR V AR15 OR VAR16 OR V AR17 OR V AR18,COLORFFFF00,NODRAW;进:=IF(青色观望,JRH,DRAWNULL);明进场价:=进,COLOR33AACC,NODRAW;今进场价:=REF(明进场价,1),COLORFF0000,NODRAW;黄色低买:V AR19,COLOR33AACC,NODRAW;洋红离场:V AR1A,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(ISLASTBAR AND (红色持股OR REF(红色持股,1)=1),今离场价,今离场价,30,1),COLOR0000FF;STICKLINE(ISLASTBAR AND (青色观望OR REF(青色观望,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)) 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,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,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;V AR1:MA(CLOSE,5);V AR2:MA(CLOSE,10);V AR3:MA(CLOSE,20);V AR60:MA(CLOSE,60);V AR120:MA(CLOSE,120);V AR4:=OPEN<V AR1 OR OPEN<V AR2 OR OPEN<V AR3;V AR5:=CLOSE>MAX(V AR1,MAX(V AR2,MAX(V AR3,V AR60)));V AR6:=VOL/MA(VOL,30)>1.2;V AR7:=CLOSE/REF(CLOSE,1)>1.049;V AR8:=V AR4 AND V AR5 AND V AR6 AND V AR7;V AR9:=V AR8 AND (REF(BARSLAST(V AR8),1)>60 OR BARSSINCE(V AR8)=0); DRAWICON(V AR9 ,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;V ARZT:=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 V ARZT=2,0,L*0.8,2,0),COLORRED;DRAWTEXT(AA AND V ARZT=2,L*0.9,'时间窗'),COLORWHITE;STICKLINE(AA AND V ARZT=4,0,L*0.8,2,0),COLORRED;DRAWTEXT(AA AND V ARZT=4,L*0.9,'时间窗'),COLORWHITE;STICKLINE(AA AND V ARZT=7,0,L*0.8,2,0),COLORRED;DRAWTEXT(AA AND V ARZT=7,L*0.9,'时间窗'),COLORWHITE;STICKLINE(AA AND V ARZT=12,0,L*0.8,2,0),COLORRED;DRAWTEXT(AA AND V ARZT=12,L*0.9,'时间窗'),COLORWHITE;STICKLINE(AA AND V ARZT=20,0,L*0.8,2,0),COLORRED;DRAWTEXT(AA AND V ARZT=20,L*0.9,'时间窗'),COLORWHITE;。

通达信行业板块看盘副图指标公式源码附图

通达信行业板块看盘副图指标公式源码附图

通达信行业板块看盘副图指标公式源码附图以下是通达信行业板块看盘副图指标公式源码附图(无源码的请下载附件导入){行业板块看盘幅图}创业板:=INBLOCK('创业板');中小企业:=INBLOCK('中小板');上证A股:=INBLOCK('上证A股');深证A股:=INBLOCK('深证A股');INDEH:=IF(中小企业=1,"399005$H",IF(创业板=1,"399006$H",IF(上证A股=1,"999999$H","399001$H"))),NODRAW;INDEO:=IF(中小企业=1,"399005$O",IF(创业板=1,"399006$O",IF(上证A股=1,"999999$O","399001$O"))),NODRAW;INDEL:=IF(中小企业=1,"399005$L",IF(创业板=1,"399006$L",IF(上证A股=1,"999999$L","399001$L"))),NODRAW;INDEC:=IF(中小企业=1,"399005$C",IF(创业板=1,"399006$C",IF(上证A股=1,"999999$C","399001$C"))),NODRAW;板块:=IF(中小企业=1,'中小板指数',IF(创业板=1,'创业板指数',IF(上证A股=1,'上证指数','深证指数')));指数涨幅:=(INDEC-REF(INDEC,1))*100/REF(INDEC,1);A:=STRCAT(板块,STRCAT(':',CON2STR(INDEC,2)));B:=STRCAT(STRCAT('指数涨跌:',CON2STR(指数涨幅,2)),' %');DRAWTEXT_FIX(ISLASTBAR,0,0,0,A),COLOR0055FF;DRAWTEXT_FIX(ISLASTBAR,0.1,0,0,B),COLOR0055FF;沪A涨家数:="999999$ADVANCE",COLORRED,NODRAW;沪A跌家数:="999999$DECLINE",COLORGREEN,NODRAW;深A涨家数:="399001$ADVANCE",COLORRED,NODRAW;深A跌家数:="399001$DECLINE",COLORGREEN,NODRAW;中小涨家数:="399005$ADVANCE",COLORRED,NODRAW;中小跌家数:="399005$DECLINE",COLORGREEN,NODRAW;创业涨家数:="399006$ADVANCE",COLORRED,NODRAW;创业跌家数:="399006$DECLINE",COLORGREEN,NODRAW;上涨总家数:=沪A涨家数+深A涨家数,COLORRED,NODRAW;下跌总家数:=沪A跌家数+深A跌家数,COLORGREEN,NODRAW;BBB1:=STRCAT('沪A涨家数: ',CON2STR(沪A涨家数,0));DRAWTEXT_FIX(ISLASTBAR,0,0.06,0,BBB1),COLORRED;BBB2:=STRCAT('沪A跌家数: ',CON2STR(沪A跌家数,0));DRAWTEXT_FIX(ISLASTBAR,0,0.12,0,BBB2),COLORGREEN;BBB3:=STRCAT('深A涨家数: ',CON2STR(深A涨家数,0));DRAWTEXT_FIX(ISLASTBAR,0.1,0.06,0,BBB3),COLORRED;BBB4:=STRCAT('深A跌家数: ',CON2STR(深A跌家数,0));DRAWTEXT_FIX(ISLASTBAR,0.1,0.12,0,BBB4),COLORGREEN;BBB5:=STRCAT('中小涨家数: ',CON2STR(中小涨家数,0));DRAWTEXT_FIX(ISLASTBAR,0.2,0.06,0,BBB5),COLORRED;BBB6:=STRCAT('中小跌家数:',CON2STR(中小跌家数,0));DRAWTEXT_FIX(ISLASTBAR,0.2,0.12,0,BBB6),COLORGREEN;BBB7:=STRCAT('创业涨家数: ',CON2STR(创业涨家数,0));DRAWTEXT_FIX(ISLASTBAR,0.3,0.06,0,BBB7),COLORRED;BBB8:=STRCAT('创业跌家数: ',CON2STR(创业跌家数,0));DRAWTEXT_FIX(ISLASTBAR,0.3,0.12,0,BBB8),COLORGREEN;上涨总家数比:=上涨总家数/(上涨总家数+下跌总家数)*100,COLORRED,NODRAW;下跌总家数比:=下跌总家数/(上涨总家数+下跌总家数)*100,COLORGREEN,NODRAW;沪A上涨家数比:=沪A涨家数/(沪A涨家数+沪A跌家数)*100,COLORRED,NODRAW;沪A下跌家数比:=沪A跌家数/(沪A涨家数+沪A跌家数)*100,COLORGREEN,NODRAW;深A上涨家数比:=深A涨家数/(深A涨家数+深A跌家数)*100,COLORRED,NODRAW;深A下跌家数比:=深A跌家数/(深A涨家数+深A跌家数)*100,COLORGREEN,NODRAW;中小上涨家数比:=中小涨家数/(中小涨家数+中小跌家数)*100,COLORRED,NODRAW;中小下跌家数比:=中小跌家数/(中小涨家数+中小跌家数)*100,COLORGREEN,NODRAW;创业上涨家数比:=创业涨家数/(创业涨家数+创业跌家数)*100,COLORRED,NODRAW;创业下跌家数比:=创业跌家数/(创业涨家数+创业跌家数)*100,COLORGREEN,NODRAW;AAA1:=STRCAT(STRCAT('上涨总家数比 ',CON2STR(上涨总家数比,0)),' %');DRAWTEXT_FIX(ISLASTBAR,0.4,0.06,0,AAA1),COLORRED;AAA2:=STRCAT(STRCAT('下跌总家数比 ',CON2STR(下跌总家数比,0)),' %');DRAWTEXT_FIX(ISLASTBAR,0.4,0.12,0,AAA2),COLORGREEN;AAA3:=STRCAT(STRCAT('沪A上涨家数比 ',CON2STR(沪A上涨家数比,0)),' %');DRAWTEXT_FIX(ISLASTBAR,0.5,0.06,0,AAA3),COLORRED;AAA4:=STRCAT(STRCAT('沪A下跌家数比 ',CON2STR(沪A下跌家数比,0)),' %');DRAWTEXT_FIX(ISLASTBAR,0.5,0.12,0,AAA4),COLORGREEN;AAA5:=STRCAT(STRCAT('深A上涨家数比 ',CON2STR(深A上涨家数比,0)),' %'); DRAWTEXT_FIX(ISLASTBAR,0.6,0.06,0,AAA5),COLORRED;AAA6:=STRCAT(STRCAT('深A下跌家数比 ',CON2STR(深A下跌家数比,0)),' %'); DRAWTEXT_FIX(ISLASTBAR,0.6,0.12,0,AAA6),COLORGREEN;AAA7:=STRCAT(STRCAT('中小上涨家数比 ',CON2STR(中小上涨家数比,0)),' %'); DRAWTEXT_FIX(ISLASTBAR,0.7,0.06,0,AAA7),COLORRED;AAA8:=STRCAT(STRCAT('中小下跌家数比 ',CON2STR(中小下跌家数比,0)),' %'); DRAWTEXT_FIX(ISLASTBAR,0.7,0.12,0,AAA8),COLORGREEN;AAA9:=STRCAT(STRCAT('创业上涨家数比 ',CON2STR(创业上涨家数比,0)),' %'); DRAWTEXT_FIX(ISLASTBAR,0.8,0.06,0,AAA9),COLORRED;AAA10:=STRCAT(STRCAT('创业下跌家数比 ',CON2STR(创业下跌家数比,0)),' %'); DRAWTEXT_FIX(ISLASTBAR,0.8,0.12,0,AAA10),COLORGREEN;CCC:=HY_INDEXC;OOO:=HY_INDEXO;LLL:=HY_INDEXL;HHH:=HY_INDEXH;DRAWKLINE(HHH,OOO,LLL,CCC);MA5:MA(CCC,5);MA10:MA(CCC,10);MA20:MA(CCC,20);MA60:MA(CCC,60);上涨:=VARCAT('行业上涨:',VAR2STR(HY_INDEXADV,0));下跌:=VARCAT('行业下跌:',VAR2STR(HY_INDEXDEC,0));DRAWTEXT_FIX(ISLASTBAR,0.7,0,0,上涨),COLORMAGENTA;DRAWTEXT_FIX(ISLASTBAR,0.8,0,0,下跌),COLORYELLOW;ZF:=(C-REF(C,1))/REF(C,1)*100;行业指数:=(CCC-REF(CCC,1))*100/REF(CCC,1);DD:=STRCAT('行业指数:',CON2STR(CCC,2));E:=STRCAT(STRCAT('行业涨跌:',CON2STR(行业指数,2)),' %');DRAWTEXT_FIX(ISLASTBAR,0.2,0,0,DD),COLORYELLOW;DRAWTEXT_FIX(ISLASTBAR,0.3,0,0,E),COLORYELLOW;DRAWTEXT_FIX(ISLASTBAR,0.4,0,0,HYBLOCK),COLORYELLOW;{所属行业}DRAWTEXT_FIX(ISLASTBAR AND 指数涨幅<=行业指数,0.5,0,0,'板块强'),COLORRED; DRAWTEXT_FIX(ISLASTBAR AND 指数涨幅>行业指数,0.5,0,0,'板块弱'),COLORCYAN; DRAWTEXT_FIX(ISLASTBAR AND ZF>=行业指数,0.6,0,0,'个股强'),COLORRED; DRAWTEXT_FIX(ISLASTBAR AND ZF<行业指数,0.6,0,0,'个股弱'),COLORCYAN; DRAWTEXT_FIX(1,0.0,0.43,0,'【说明:早盘如果持有的股票:板弱、股弱。

通达信指标公式源码聚宝主力资金副图指标

通达信指标公式源码聚宝主力资金副图指标

A:=VOL*CLOSE;B:=SUM(A,1)/SUM(VOL,1);B1:=EMA(B,17);主力:=(B-B1)*500/B,COLORRED;进:STICKLINE(主力>=0 AND 0>=REF(0,1),0,主力,1,0),COLORRED; 出:STICKLINE(主力<0 AND 0>=REF(0,1),0,主力,1,0),COLORGREEN; K2:=EMA(C,5),COLORFFFF00;K3:=EMA(C,10),COLORFFFF00;K5:=EMA(C,30),COLORFFFF00;KK5:=EMA(INDEXC,30),COLORFFFF00; K6:=2*(K2-K5);K7:=2*(K2-K3);K8:=2*(K7+K6),COLORRED;RSV1:= (CLOSE-LLV(LOW,4))/(HHV(HIGH,4)-LLV(LOW,4))*100; FASTK:=SMA(RSV1,3,1);龙K:=SMA(FASTK,2,1);龙D:=SMA(龙K,5,1);VA06:=(2*CLOSE+HIGH+LOW)/4;VA07:=LLV(LOW,13);VA08:=HHV(HIGH,13);VA09:=EMA((VA06-VA07)/(VA08-VA07)*100,13);VAA1:=EMA(0.667*REF(VA09,1)+0.333*VA09,2);STICKLINE(CROSS(K8,0) AND 龙K>=龙DANDVA09>VAA1,0,1,8,0) ,COLORRED;K1:=IF(K8>REF(K8,5) AND K3<REF(K3,5) ,1,0 ),COLORYELLOW;K21:=IF(K8>REF(K8,7) AND K3<REF(K3,7) ,1,0 ),COLORYELLOW;K31:=IF(K8>REF(K8,9) AND K3<REF(K3,9) ,1,0 ),COLORYELLOW;K4:=IF(K8>REF(K8,11) AND K3<REF(K3,11) ,1,0 ),COLORYELLOW; 底部:=(K1 OR K21 OR K31 OR K4) AND K8<0 ANDK8>REF(K8,1),NODRAW ,COLORYELLOW;STICKLINE(底部AND COUNT(底部,6)=1,0.4,0,8,0) ,COLORYELLOW;VA1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);VA2:=SMA(ABS(LOW-VA1),13,1)/SMA(MAX(LOW-VA1,0),10,1);VA3:=EMA(VA2,10)/100;VA4:=LLV(LOW,33);VA5:=EMA(IF(LOW<=VA4,VA3,0),3);洗盘:=IF(VA5<REF(VA5,1),VA5,0),COLORGREEN,NODRAW;STICKLINE(VA5<REF(VA5,1) {ANDCOUNT(VA5>REF(VA5,1),10)=1},0,VA5*2,3,0 ),COLORBLUE;拉升:=IF(VA5>REF(VA5,1) {AND 平均线>=REF(平均线,1)} ,VA5,0),COLORRED,NODRAW;VA6:=IF(VA5>=100,100,VA5);STICKLINE(VA5>REF(VA5,1){AND 平均线>=REF(平均线,1) ANDCOUNT(VA5<REF(VA5,1),5)=1},0,VA6*2,3,0),COLORLIRED;XP:=REF(洗盘,1);LS:=拉升;XPLS:=(XP AND LS);VR3:=(CLOSE+HIGH+LOW)/3;VR4:=EMA(VR3,10);VR5:=REF(VR4,1);主力线:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2 *SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1 ),LINETHICK1,POINTDOT;VAR3:=MA(CLOSE,13);VAR4:=(100-ABS((CLOSE-VAR3)/VAR3*100))/100;VAR5:=LLV(LOW,75);VAR6:=HHV(HIGH,75);VAR7:=(VAR6-VAR5)/100;VAR8:=SMA((CLOSE-VAR5)/VAR7,20,1);VARA:=3*VAR8-2*SMA(VAR8,15,1);吸筹A:=(100-VARA)/100,COLOR0099FF,LINETHICK2;吸筹:=IF(吸筹A>1.09*REF(吸筹A,1),1,0),COLORRED,NODRAW; STICKLINE(吸筹,0,1,2,1 ),COLORYELLOW;大底:=EXIST(CROSS( 吸筹A,1),6),NODRAW,COLORMAGENTA;VARD:=吸筹A>VAR4;差:=吸筹A-VAR4,COLORYELLOW,NODRAW;JX:=(MA(C,10)*30+MA(C,30)*10+MA(C,60)*5+MA(C,120)*3)/(3+5+10+30); JXMA:=MA(JX,10);DRAWICON(CROSS(JX,JXMA),-0.3,1);DRAWICON(CROSS(JXMA,JX),2,2);DRAWICON(CLOSE>REF(HHV(HIGH,20),1),2,6);DRAWICON(CLOSE<REF(LLV(LOW,20),1),-0.5,1),COLORYELLOW;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,主力,主力+0.4,8,0),COLORYELLOW;STICKLINE(A1,主力,主力+0.3,4,0),COLORBB00BB;DRAWTEXT(A1 AND 主力<0 AND VR4>=VR5 ,主力-0.06,'底部'),COLORGREEN; DRAWTEXT(XPLS {AND VR4>=VR5} AND COUNT(XPLS,6)=1,1.35,'洗尾'),COLORGREEN;VARE:=REF(LOW,1)*0.9;VARF:=LOW*0.9;VAR11:=EMA(VARF,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; 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;VAR20:=VAR18<=25 AND VAR19<-95 AND VAR1F>20 AND VAR1B<-30 AND VAR1E<30 AND VAR11-CLOSE>=-0.25 AND VAR15<22 AND VAR16<28 AND VAR17>50;STICKLINE(VARD,VAR4,吸筹*3,1,0),COLORRED;STICKLINE(VAR20,0,1.20,1,0),COLORBROWN,LINETHICK2;VAR61:=(HIGH+LOW)/2;VAR81:=LLV(LOW,35);VARB1:=HHV(HIGH,35);BB:=EMA((VAR61-VAR81)/(VARB1-VAR81)*100,9);金聚宝:=EMA(0.667*REF(BB,1)+0.333*BB,2),LINETHICK0;GC3:=LLV(BB,198);GC4:=HHV(BB,188);DRAWTEXT(FILTER(GC4>REF(GC4,1),7) ,2.8,'见顶');CC0:=(BB-金聚宝<0.3)AND (BB<25)AND (HIGH+LOW)/2<MA((HIGH+LOW)/2,13)*0.98 AND (HIGH+LOW)/2>REF((HIGH+LOW)/2,1);DD:=FILTER(CC0,10);DRAWTEXT(DD ,主力+0.2,'还有一跌');{DRAWICON(DD,19,9);}GG:=(BB-金聚宝<0.6)AND (BB<30)AND (HIGH+LOW)/2<MA(C,13)*0.996 AND (HIGH+LOW)/2>REF((HIGH+LOW)/2,1);HH:=FILTER(GG,10);{DRAWTEXT(HH AND QS<20,25,'逃底点'),COLOR43D0FA;} {DRAWICON(HH,20,10);}EE:=(BB-金聚宝>0.55)AND (BB>70) AND(HIGH+LOW)/2>MA((HIGH+LOW)/2,13)*0.96 AND(HIGH+LOW)/2<REF((HIGH+LOW)/2,1);{FF:=FILTER(EE,10);DRAWTEXT(FF AND QS>80,70,'逃'),COLOR43D0FA;}DRAWTEXT(FILTER(GC3>REF(GC3,1),5)AND BB<40 AND 金聚宝>REF(金聚宝,1),主力-0.2,'将见底');DIFF1:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA1:=EMA(DIFF1,9);买:=CROSS(DIFF1,DEA1),NODRAW;DRAWTEXT(买AND COUNT(买,25)=1,主力-0.6,'☆买'),COLORMAGENTA; DFQS:=7*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1) -3*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3 ,1)-SMA(SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30, 4,1),3,1),2,1);TX:=78.89;{DRAWICON(CROSS(TX,DFQS),1.02*H,6);}STICKLINE(CROSS(TX,DFQS),1,2,5,0),COLOR00FF00;DRAWTEXT(FILTER(CROSS(TX,DFQS),10) ,2.2,'逃顶'),COLORFF6699;VAR301:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA (SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);趋势:=EMA(VAR301,3)-10,COLORFF0000;A13:=CROSS(趋势,0);OK:=REF(CLOSE,1);RSI1:=SMA(MAX(CLOSE-OK,0),7,1)/SMA(ABS(CLOSE-OK),7,1)*100,COLORW HITE;RSI2:=SMA(MAX(CLOSE-OK,0),7,1)/SMA(ABS(CLOSE-OK),7,1)*100,COLORW HITE;鱼:=SMA(MAX(CLOSE-OK,0),7,1)/SMA(ABS(CLOSE-OK),7,1)*100,COLORRED, DOTLINE;RSI4:=SMA(鱼,7,1),LINETHICK1,COLORWHITE;趋势A:=MA(((CLOSE-LLV(LOW,48))/(HHV(HIGH,48)-LLV(LOW,48))*50),17)+9,CO LORFFFFFF;趋势B:=MA(((CLOSE-LLV(LOW,53))/(HHV(HIGH,53)-LLV(LOW,53))*50),17)+9,COLOR3377DD;AZ1:=MA(趋势A,7)*1.372,COLORGREEN,LINETHICK1;AZ2:=AZ1*1.0887;AZ3:=(1.5*(趋势B+RSI4)-(AZ2+AZ1))+12,COLORGREEN,LINETHICK1,DOTLINE;鱼网:=IF((CROSS(RSI2,RSI4) OR CROSS(RSI2,AZ3) AND AZ3<38 ANDRSI1<51),18,0),COLORYELLOW,LINETHICK2;买入:=IF(EXIST(鱼网=18,8)AND 鱼>45 AND鱼>REF( 鱼,2),1,0),COLORMAGENTA,,LINETHICK3;{STICKLINE(A13,0,主力*2+3,5,0),COLORMAGENTA;}DRAWTEXT(A13 ,主力*2+2,'启动'),COLORWHITE;最小值:=LLV(LOW,25);最大值:=HHV(HIGH,25);波动线:=EMA((CLOSE-最小值)/(最大值-最小值)*100,4);平均线:=EMA(波动线,3);反转:=COUNT(MA(C,10)<REF(MA(C,10),1),3)>=2 AND CROSS(C,MA(C,20)) AND C>=MA(C,30) AND 平均线>=REF(平均线,1);DRAWTEXT(反转,主力*2+2.3,'反转'),COLORWHITE;STICKLINE(反转OR XPLS {AND VR4>=VR5} ,0,主力*2+2,5,0),COLORCYAN; 必买: DRAWICON(REF(TROUGHBARS(3,15,1),1)=0 ANDHIGH>LOW,-1.2,25),COLORRED ,LINETHICK4;必卖: DRAWICON(REF(PEAKBARS(3,15,1),1)=1,主力+2.2,27),COLORRED,LINETHICK8;DRAWTEXT(REF(PEAKBARS(3,15,1),1)=1 ,主力+3.2,' 必卖'),COLORGREEN; A7:=C-REF(C,1);A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);买1:=LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2)); DRAWTEXT(FILTER(买1=1,5) AND (平均线>=REF(平均线,1) OR VR4>=VR5) ,主力-0.45,'↖买进'),COLORYELLOW;STICKLINE(买1,主力,0,2,0),COLORYELLOW;A11:=3*EMA((C-LLV(L,30))/(HHV(H,30)-LLV(L,30))*100,5)-2*EMA((C-LLV(L,3 0))/(HHV(H,30)-LLV(L,30))*100,5);A14:=EMA(A11,5);A15:=(HHV(H,34)-C)/(HHV(H,34)-LLV(L,34))*100;DIFF := EMA(CLOSE,12) - EMA(CLOSE,26);DEA :=EMA(DIFF,9);基础:=(DIFF<-0.1 AND DIFF>DEA);中线买入:=(CROSS(A11,A14)AND (A15-A14)>40 AND 基础OR 买入)AND VR4>=VR5 ;STICKLINE(中线买入AND COUNT(中线买入,5)=1 ,0,主力+3,2,0),COLORRED; DRAWTEXT(中线买入AND COUNT(中线买入,10)=1,主力*2+3,'买入'),COLORMAGENTA;买多: ( (XPLS OR 中线买入OR 大底OR A1 OR 买入OR 买OR A13) OR VR4>=VR5),NODRAW,COLORRED;DRAWTEXT_FIX( ISLASTBAR AND 买多,0.52,0.04,0,'【买多】'),COLORRED; 买空: ( (FILTER(GC4>REF(GC4,1),10) OR DD ORFILTER(CROSS(TX,DFQS),10)) OR VR4<VR5),NODRAW,COLORCYAN; DRAWTEXT_FIX( ISLASTBAR AND 买空,0.52,0.04,0,'【买空】'),COLORCYAN; 超短线:(((主力线-LLV(主力线,21))/(HHV(主力线,21)-LLV(主力线,21)))*(4))*(0.5),COLORYELLOW,LINETHICK3;IF(超短线>=REF(超短线,1),超短线,DRAWNULL),COLORMAGENTA,LINETHICK5;IF(超短线<REF(超短线,1),超短线,DRAWNULL),COLORBLUE,LINETHICK5;震仓: IF(VR4,-0.038,DRAWNULL),COLORYELLOW,LINETHICK9;红买: IF(VR4>=VR5 ,-0.038,DRAWNULL), COLORRED,LINETHICK5;蓝卖: IF(VR4<VR5 ,-0.036,DRAWNULL),,COLORBLUE,LINETHICK5;E:=(HIGH+LOW+OPEN+2*CLOSE)/5;阻力:=(E+(HIGH-LOW)) ;支撑:=(E-(HIGH-LOW));DRAWTEXT_FIX(ISLASTBAR,0.15,0.04,0,'阻力'),COLORWHITE; DRAWNUMBER_FIX(ISLASTBAR,0.22,0.04,0,阻力),COLORWHITE; DRAWTEXT_FIX(ISLASTBAR,0.35,0.04,0,'支撑'),COLORLIRED; DRAWNUMBER_FIX(ISLASTBAR,0.42,0.04,0,支撑),COLORRED;ZLCM:=EMA(WINNER(CLOSE)*70,3);{//主力筹码估算}SHCM:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);{//小筹码估算}ZSHTL:=SHCM/(ZLCM+SHCM)*100;{//小股民套牢筹码比率}ZZLKP:=ZLCM/(ZLCM+SHCM)*100;{//主力控盘筹码比率}ZCMZL:=MA(ZLCM+SHCM,13);{//市场筹码总量}ZZNTS:=BARSLAST(ZSHTL<90 AND REF(ZSHTL,1)>90);{//走牛天数} ZSHJJ:=EMA(ZSHTL,89);{//小股民警戒}ZZLJJ:=EMA(ZZLKP,89);{//主力警戒}DKB:=IF(ZZLKP-REF(ZZLKP,1)>ZSHTL-REF(ZSHTL,1),1,0);RSVB:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;KK1:=SMA(RSVB,10,1);D1:=SMA(KK1,5,1);KK:=INTPART(KK1);DDB:=INTPART(D1);TFXXS:=KK+DDB;{//变异KD风险系数}T1:=CONST( ZCMZL>REF(ZCMZL,1) AND DKB=1);T2:=CONST( ZCMZL>REF(ZCMZL,1) AND DKB=0);T3:=CONST( ZCMZL=REF(ZCMZL,1));T4:=CONST( ZCMZL<REF(ZCMZL,1) AND DKB=1);T5:=CONST( ZCMZL<REF(ZCMZL,1) AND DKB=0);T6:=CONST(TFXXS<=50 );T7:=CONST(TFXXS>=160 );T8:=CONST(TFXXS>50 AND TFXXS<160 AND TFXXS>=REF(TFXXS,1) AND TFXXS<=100 );T9:=CONST( TFXXS>50 AND TFXXS<160 AND TFXXS>=REF(TFXXS,1) AND TFXXS>100);T10:=CONST(TFXXS>50 AND TFXXS<160 AND TFXXS<REF(TFXXS,1) AND TFXXS>100 );T11:=CONST(TFXXS>50 AND TFXXS<160 AND TFXXS<REF(TFXXS,1) AND TFXXS<=100 );T12:=CONST( ZSHTL>90 );T13:=CONST( ZZLKP>75 );T14:=CONST(CROSS(ZCMZL,ZZLJJ) AND ZZLKP>ZZLJJ AND ZZLKP>10 AND ZZLJJ>REF(ZZLJJ,1) AND ZCMZL>REF(ZCMZL,1) );T15:=CONST(CROSS(ZCMZL,ZZLKP) AND ZZLKP>ZZLJJ AND ZZLKP<ZSHTL AND ZZLKP>10 AND ZZLJJ>REF(ZZLJJ,1) AND ZCMZL>REF(ZCMZL,1) );T16:=CONST( CROSS(ZCMZL,ZSHTL) AND ZSHTL>ZZLKP ANDZCMZL>REF(ZCMZL,1));T17:=CONST( CROSS(ZCMZL,100) AND ZCMZL>REF(ZCMZL,1));T18:=CONST(REF(ZSHTL,1)>90 AND ZSHTL<90 );TS1:=IF(T1=1,0+0.03,0);TS2:=IF(T2=1,TS1+0.03,TS1);TS3:=IF(T3=1,TS2+0.03,TS2);TS4:=IF(T4=1,TS3+0.03,TS3);TS5:=IF(T5=1,TS4+0.03,TS4);TS6:=IF(T6=1,0+0.73,0);TS7:=IF(T7=1,TS6+0.03,TS6);TS8:=IF(T8=1,TS7+0.03,TS7);TS9:=IF(T9=1,TS8+0.03,TS8);TS10:=IF(T10=1,TS9+0.03,TS9);TS11:=IF(T11=1,TS10+0.03,TS10);TS12:=IF(T12,0+0.03,0);TS13:=IF(T13=1,TS12+0.03,TS12);TS14:=IF(T14=1,TS13+0.03,TS13);TS15:=IF(T15=1,TS14+0.03,TS14);TS16:=IF(T16=1,TS15+0.03,TS15);TS17:=IF(T17=1,TS16+0.03,TS16);TS18:=IF(T8=1,TS17+0.03,TS17);DRAWTEXT_FIX(T1 ,0.66,TS1,0,'★监控:主力增仓'),COLOR8080FF; DRAWTEXT_FIX(T2 ,0.66,TS2,0,'★监控:主力减仓'),COLORFFFF00; DRAWTEXT_FIX(T3 ,0.66,TS3,0,'★监控:多空平衡'),COLORGRAY; DRAWTEXT_FIX(T4 ,0.66,TS4,0,'★监控:主力回补'),COLORFF9933; DRAWTEXT_FIX(T5 ,0.66,TS5,0,'★监控:主力出逃'),COLORFFFF00; DRAWTEXT_FIX(T6 ,0.56,0.25,0,'★操作:买入风险'),COLORYELLOW; DRAWTEXT_FIX(T7 ,0.56,0.25,0,'★操作:卖出风险'),COLORFFFF00; DRAWTEXT_FIX(T8 ,0.56,0.25,0,'★操作:追涨博弈'),COLOR8080FF; DRAWTEXT_FIX(T9 ,0.56,0.25,0,'★操作:稳健持股'),COLOR8080FF;DRAWTEXT_FIX(T10 ,0.56,0.25,0,'★操作:盘跌减仓'),COLORFFFF00; DRAWTEXT_FIX(T11 ,0.56,0.25,0,'★操作:杀跌空仓'),COLORFFFF00; DRAWTEXT_FIX(T12,0.36,TS12,0,'☆特别提示:筑底散兵坑'),COLOR66FFCC; DRAWTEXT_FIX(T13,0.36,TS13,0,'☆特别提示:铸顶风险区'),COLORFFFF00; DRAWTEXT_FIX(T14,0.36,TS14,0,'☆特别提示:穿越主力'),COLOR8080FF; DRAWTEXT_FIX(T15,0.36,TS15,0,'☆特别提示:穿越主力'),COLORYELLOW; DRAWTEXT_FIX(T16,0.36,TS16,0,'☆特别提示:穿越散户'),COLORGREEN; DRAWTEXT_FIX(T17,0.36,TS17,0,'☆特别提示:全盘穿越'),COLOR3399FF; DRAWTEXT_FIX(T18,0.36,TS18,0,'☆特别提示:神秘黑洞'),COLOR9966FF; 量价:=(VOL/CLOSE)/3;{好}BB2:=SUM((IF(((量价>0.20) AND (CLOSE>(REF(CLOSE,1)))),量价,0)),0);BB3:=SUM((IF(((量价>0.20) AND (CLOSE<(REF(CLOSE,1)))),量价,0)),0);BB6:=BB2+BB3;DD1:=1;比:=BB2/BB3;BBB1:=STRCAT(STRCAT('买= ',CON2STR((100*BB2)/BB6,0)),'%');BBB2:=STRCAT(STRCAT('卖= ',CON2STR((100*BB3)/BB6,0)),'%');BBB3:=STRCAT(STRCAT('差= ',CON2STR((100*(BB2-BB3))/BB6,0)),'%'); DRAWTEXT_FIX(DD1=1 ,0,0.02,0,BBB1),COLORRED;DRAWTEXT_FIX(DD1=1 ,0,0.13,0,BBB2),COLORGREEN;DRAWTEXT_FIX(DD1=1 ,0,0.24,0,BBB3),COLOR00FFFF;。

通达信全仓买副图源码指标公式

通达信全仓买副图源码指标公式

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;。

通达信指标公式源码 漂亮实用的三合一副图指标

通达信指标公式源码 漂亮实用的三合一副图指标

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,NODRA W;趋势:IF(CAPITAL<1,EMA(量能,360),EMA(量能,21)),COLOR008800,NODRAW; VAR3:=(量能-趋势);VAR44:=SMA(RV,3,1);VAR55:=SMA(VAR44,3,1);STICKLINE(VAR3>0,100,50,4,0),COLOR990099;STICKLINE(VAR3<0,0,50,4,0),COLOR008800;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));KK:EMA(SMA(RG,3,1),2),COLORFFFFFF;DD:SMA(KK,3,1),COLOR00FFFF; DRAWTEXT(CROSS(VAR44,VAR55) AND CROSS(KK,DD),10,'共振'),COLOR00FFFF;共振点:=(CROSS(VAR44,VAR55) AND CROSS(KK,DD));STICKLINE(共振点>0,0,100,2,0),COLOR008888;STICKLINE(共振点>0,0,100,1.5,0),COLOR00AAAA;STICKLINE(共振点>0,0,100,0.8,0),COLOR00DDDD;STICKLINE(共振点>0,0,100,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,LINE THICK2;C2:=(EMA(((0.667*REF(C1,1))+(0.333*C1)),2)*VAR1),COLORFFFFFF,LINETH ICK2;条件:=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,30,0,4,0),COLOR770077;STICKLINE(A1,30,0,3,0),COLOR990099;STICKLINE(A1,30,0,2,0),COLORBB00BB;STICKLINE(A1,30,0,1,0),COLORDD00DD;STICKLINE(A1,30,0,0.3,0),COLORFF00FF;DRAWTEXT(A1,36,'财神到'),COLORRED;★遵守纪律★:100,COLORRED,NODRAW; ★交易之魂★:100,COLORRED,NODRAW;。

通达信副图指标公式源码大全

通达信副图指标公式源码大全

通达信副图指标公式源码大全
一、MA(X,N)
MA:(MA(C,X);N)
MA:MA.CALC(C,X)
公式描述:
MA(X,N)表示计算最近X天的移动平均线,其中N为移动平均线的天数。

二、MACD
MACD:(EMA(C,SHORT);EMA(C,LONG);SIGNAL)
MACD:MACD.CALC(C,SHORT,LONG,SIGNAL)
公式描述:
MACD表示计算MACD指标,其中SHORT代表快速移动平均线的天数,LONG代表慢速移动平均线的天数,SIGNAL代表信号线的天数。

三、KD
KD:(K;D)
KD:KD.CALC(K,D)
公式描述:
KD表示计算KD指标,其中K、D分别代表K值和D值,取值范围为9
到100。

四、BOLL
BOLL:(MID;UP;DOWN)
BOLL:BOLL.CALC(MID,UP,DOWN)
公式描述:
BOLL表示计算布林线指标,其中MID代表中轨线,UP代表上轨线,DOWN代表下轨线。

五、RSI
RSI:(RSI1;RSI2;RSI3;RSI4)
RSI:RSI.CALC(RSI1,RSI2,RSI3,RSI4)
公式描述:
RSI表示计算RSI指标,其中RSI1、RSI2、RSI3、RSI4分别代表RSI 指标的1、2、3、4参数。

通达信指标公式源码 解盘 副图源码

通达信指标公式源码 解盘 副图源码

保护价:(REF(CLOSE,1)+REF(CLOSE,2)+OPEN)/3,COLORYELLOW,LINETHICK0; 心理价:(CLOSE*14+OPEN*7+HIGH*2+LOW*2)/25,COLORRED,LINETHICK0; TYP:=(OPEN+CLOSE*2+HIGH+LOW)/5;突破:(TYP+HIGH-LOW),COLORYELLOW,LINETHICK0;阻力:TYP*2-LOW,COLORRED,LINETHICK0;支撑:TYP*2-HIGH,COLORCYAN,LINETHICK0;下降:TYP-HIGH+LOW,COLORMAGENTA,LINETHICK0;A001:=CLOSE-REF(CLOSE,6);A002:=MA(A001,6);A003:=((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9)))*100;A004:=SMA(A003,3,1);A005:=SMA(A004,3,1);A006:=EMA((3*A004-2*A005),2);A007:=(HIGH+LOW+CLOSE)/3;A008:=((A007-MA(A007,14))/(0.015*AVEDEV(A007,14)))/2;A009:=(A008+(EMA(((0-(100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(L OW,14))))+100)/100,3)*200-100))/2;A010:=A009-REF(A009,14);A011:=A009-REF(A009,26);A012:=(A009+A010+A011)/3;KKM:=EMA(A012,4);A013:=HHV(HIGH,34);A014:=(2*CLOSE+HIGH+LOW)/4;A015:=LLV(LOW,34);A016:=EMA(((A014-A015)/(A013-A015))*100,13);A017:=EMA(0.667*REF(A016,1)+0.333*A016,2);KKMD:=A016-A017>1 AND A016<30 AND A017<30;KKML:=A016-A017<0 AND A016>80 AND A017>80 AND REF(A016-A017,1)>0; KKMQ:=COUNT(A016-A017>0,2)=2;KKAL:=(A016-A017)<0;生命线:MA(CLOSE,20),COLOR0000FF;取舍线:MA(CLOSE,10);DRAWTEXT(FILTER(KKMD,30),L*1.05,'最佳买入时机'),COLOR00FFFF; DRAWTEXT(FILTER(KKML,30),H*1.05,'最佳卖出时机'),COLORFFFF00; DRAWTEXT(FILTER(KKMQ,30),C*1.05,'持仓区'),COLOR00FF00; DRAWTEXT(FILTER(KKAL,30),H,'空仓区'),COLORFF8080;DRAWTEXT(FILTER(CLOSE/REF(CLOSE,1)>INDEXC/REF(INDEXC,1),30),L*0.9 5,'该股强于大盘'),COLORFF00FF;DRAWTEXT(CROSS(MA(CLOSE,5),MA(CLOSE,10)),L*0.92,'可出手'),COLORFF00FF;DRAWTEXT(CROSS(MA(CLOSE,10),MA(CLOSE,5)),H*1.08,'收手了'),COLORFF0000;DRAWTEXT(FILTER(KKM>EMA(KKM,4) AND KKM>REF(KKM,1),30),L*0.98,'快速介入');DRAWTEXT(FILTER(KKM<EMA(KKM,4) AND KKM<REF(KKM,1),30),H*1.02,'风险较大');DRAWTEXT(FILTER(KKM>EMA(KKM,4) AND KKM<REF(KKM,1),30),H,'休息观望~'),COLORAA8800;DRAWTEXT(FILTER(KKM<EMA(KKM,4) AND KKM>REF(KKM,1),30),L,'有防御能力'),COLORAA00AA;。

通达信副图指标源码【大全】

通达信副图指标源码【大全】

庄筹散筹(幅图)庄筹估算:EMA(WINNER(C)*70,5) COLORMAGENTA LINETHICK2;散筹估算:EMA((WINNER(C*1.1)-WINNER(C*0.9))*80,5) COLORGREEN LINETHICK2; CC:=FILTER( (CROSS(5,庄筹估算) AND 散筹估算<20 )*60,10 );抄底:CC,COLORYELLOW;DRAWTEXT(CC ,11 ,'抄底' ) ,COLORYELLOW;AA:= REF(庄筹估算,30)>40 OR REF(庄筹估算,20)>40;BB:=CROSS(28,庄筹估算) AND 散筹估算>40 AND AA=1 {AND LLV(L ,60 )>LLV(L ,250 )}; 洗盘:IF(BB ,30 ,60 ) COLORCY AN;DRAWTEXT(FILTER(BB,4) ,66 ,'洗盘' ) COLORCY AN;DRAWTEXT(庄筹估算>60,58,'★'),COLORRED;STICKLINE(庄筹估算<散筹估算AND 散筹估算<60,散筹估算,55,1,0),COLORGREEN; STICKLINE(庄筹估算>散筹估算,散筹估算,50,1,0),COLORRED;STICKLINE(庄筹估算<散筹估算,庄筹估算,0,0,0),COLORYELLOW;操盘频率(幅图)V AR1:=MA(CLOSE,26);持仓线: V AR1, , ;V AR2:=V AR1-0.25;空仓线: V AR2, , ;操盘频率: EMA(CLOSE,3);操盘频率是一个趋势类的指标,它由三根线条组成,分别是:操盘趋势,持仓线,空仓线组成,通常这个指标为我们明确指出了一个中期趋势的大方向机构能量线(幅图){坐标线;20.00;50.00;80.00}V AR1:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;机构做空能量线: SMA(V AR1,3,1),LINETHICK2,COLORGREEN;V AR2:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;机构做多能量线: SMA(V AR2,5,1)-8,LINETHICK2,COLORRED;弱势区:20,POINTDOT,COLORGREEN;强弱分水岭:50,POINTDOT,COLORWHITE;强势区:80,POINTDOT,COLORF00FF0;该指标共四根线,分别为机构做空能量线(绿色粗线)、机构做多能量线(红色粗线),这两条线代表中期趋势;能量超买线(红色细线)、能量超卖线(绿色细线),这两条线代表短期趋势。

通达信副图指标公式源码大全

通达信副图指标公式源码大全

通达信副图指标公式源码大全Document serial number【KKGB-LBS98YT-BS8CB-BSUT-BST108】副图指标公式源码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)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),COLORYELLOW; VARA:=CROSS(VAR5,VAR4)ANDREF(VAR4,1)>80;STICKLINE(VARA,VAR4-15,100,15,0),COLORYELLOW;DRAWTEXT(VARAANDCOUNT(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<=25ANDVAR19<-95ANDVAR1F>20ANDVAR1B<-30ANDVAR1E<30ANDVAR11-CLOSE>=-0.25ANDVAR15<22ANDVAR16<28ANDVAR17>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;STICKLINE((主力>0),0,主力,3,0),COLOR009CFF;STICKLINE((主力>0),0,主力,2.8,0),COLOR009CFF;STICKLINE((主力>0),0,主力,2.5,0),COLOR00C0FF;STICKLINE((主力>0),0,主力,1.5,0),COLOR00D1FF;STICKLINE((主力>0),0,主力,1,0),COLOR00EAFF;STICKLINE((主力>0),0,主力,0.7,0),COLORYELLOW;STICKLINE((游资>0),0,游资,3,0),COLOR00C100;STICKLINE((游资>0),0,游资,2.8,0),COLOR00CA00;STICKLINE((游资>0),0,游资,2.5,0),COLOR00D300;STICKLINE((游资>0),0,游资,1.5,0),COLOR00DB00;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),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))*100;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,DRAWNULL),NODRAW; STICKLINE(CURRBARSCOUNT=1ANDPERIOD=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),COLOR00FFFF;换手:VOL/CAPITAL*100,POINTDOT;二十日换手:SUM(换手,20);5、起涨点换手率%:VOL/CAPITAL*100,LINETHICK0,COLORYELLOW;量比:V/(REF(MA(V,5),1)),LINETHICK0,COLORRED;VVOL:=IF(CURRBARSCOUNT=1ANDPERIOD=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:=换手率%>5;量比1:=量比>1.5OR虚拟量比>1.5;获利比例%1:=获利比例%>70;涨幅%1:=涨幅%>3;启动:=换手率%1AND量比1AND获利比例%1AND涨幅%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(CLOSE,2)); VAR3:=(REF(VAR2,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2)); VAR4:=(REF(VAR3,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLOSE,2)); VAR5:=(REF(VAR4,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2)); VAR6:=(REF(VAR5,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLOSE,2)); VAR7:=(REF(VAR6,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2)); VAR8:=(REF(VAR7,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLOSE,2)); VAR9:=(REF(VAR8,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2)); VARA:=(REF(VAR9,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLOSE,2)); VARB:=(REF(VARA,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2)); VARC:=(REF(VARB,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLOSE,2)); VARD:=(CLOSE<REF(CLOSE,1)ANDCLOSE<REF(CLOSE,2));VARE:=(REF(VARD,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2)); VARF:=(REF(VARE,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLOSE,2)); VAR10:=(REF(VARF,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2)); VAR11:=(REF(VAR10,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLOSE,2)); VAR12:=(REF(VAR11,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2)); VAR13:=(REF(VAR12,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLOSE,2)); VAR14:=(REF(VAR13,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2)); VAR15:=(REF(VAR14,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLOSE,2));VAR16:=(REF(VAR15,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2)); VAR17:=(REF(VAR16,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>=REF(CLOSE,2)); VAR18:=(REF(VAR17,1)ANDCLOSE>=REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2)); VAR19:=((REF(VARDORVAREORVARFORVAR10ORVAR11ORVAR12ORVAR13ORVAR14ORVAR 15ORVAR16ORVAR17ORVAR18,1))ANDVAR1);VAR1A:=((REF(VAR1ORVAR2ORVAR3ORVAR4ORVAR5ORVAR6ORVAR7ORVAR8ORVAR9ORVA RAORVARBORVARC,1))ANDVARD);红色持股:VAR1ORVAR2ORVAR3ORVAR4ORVAR5ORVAR6ORVAR7ORVAR8ORVAR9ORVARAORVARBOR VARC,COLOR0000FF,NODRAW;离场:=IF(红色持股,JRL,DRAWNULL);明离场价:=离场,COLORFF99FF,NODRAW;今离场价:=REF(离场,1)COLOR0000FF,NODRAW;青色观望:VARDORVAREORVARFORVAR10ORVAR11ORVAR12ORVAR13ORVAR14ORVAR15ORVAR16O RVAR17ORVAR18,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,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:=操作线<震仓线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; {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<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; DRAWTEXT(AAANDVARZT=20,L*0.9,'时间窗'),COLORWHITE;。

通达信个股叠加大盘K线公式源码

通达信个股叠加大盘K线公式源码

通达信个股叠加大盘K线公式源码{大盘个股K线-通达信版-理想论坛-超级实力}{通达信对应大盘K线-BY 超级实力}{自填参数:--【参数P】大于零时采用P的周期作为大盘个股叠加周期,P等于零时采用个股全部上市日期作为叠加周期M(50,9999,100),P1(0,300,5),P2(0,300,10),P3(0,300,60),N(0,3, 0),P(0,99999,0);}{用法:请在A股下使用,指数和其它品种不显示数据。

中小、创业、沪、深大盘分显,采取飞狐的源码取3组可调均线可调显示根数(N),默认N为0不显示可调均线}创业板:=INBLOCK('创业板'),NODRAW;中小企业:=INBLOCK('中小企业'),NODRAW;上证A股:=INBLOCK('上证A股'),NODRAW;深证A股:=INBLOCK('深证A股'),NODRAW;交易所基金:=INBLOCK('交易所基金'),NODRAW;开A:=IF(中小企业=1,"399101$O",IF(创业板=1,"399102$O",IF(上证A股=1,"999999$O",IF(深证A股=1,"399001$O",IF(交易所基金=1,"399305$O",0))))),NODRAW;高A:=IF(中小企业=1,"399101$H",IF(创业板=1,"399102$H",IF(上证A股=1,"999999$H",IF(深证A股=1,"399001$H",IF(交易所基金=1,"399305$H",0))))),NODRAW;低A:=IF(中小企业=1,"399101$L",IF(创业板=1,"399102$L",IF(上证A股=1,"999999$L",IF(深证A股=1,"399001$L",IF(交易所基金=1,"399305$L",0))))),NODRAW;收A:=IF(中小企业=1,"399101$C",IF(创业板=1,"399102$C",IF(上证A股=1,"999999$C",IF(深证A股=1,"399001$C",IF(交易所基金=1,"399305$C",0))))),NODRAW;DPJX:=(开A+高A+低A+收A)/4;{大盘均价} JX:=(O+H+L+C)/4;{个股均价}YXZQ1:=IF(中小企业=1 AND REF(DATE,BARSCOUNT(C))<=1050608,BARSLAST(DATE=105060 8),IF(创业板=1 AND REF(DATE,BARSCOUNT(C))<=1100820,BARSLAST(DATE=110082 0),IF(深证A股=1 AND REF(DATE,BARSCOUNT(C))<=910403,BARSLAST(DATE=910403), BARSCOUNT(C)))),NODRAW;YXZQ:=IF(P>0 AND P<CONST(BARSCOUNT(C)),IF(P-CURRBARSCOUNT>=0,P-CURRBARSCOUNT,0),YXZQ1),NODRAW;{大盘个股比例}{公式在线提供:}BLO:=开A/REF(DPJX,YXZQ)/(O/REF(JX,YXZQ));{大盘开盘比例} BLH:=高A/REF(DPJX,YXZQ)/(H/REF(JX,YXZQ));{大盘最高比例} BLL:=低A/REF(DPJX,YXZQ)/(L/REF(JX,YXZQ));{大盘最低比例} BLC:=收A/REF(DPJX,YXZQ)/(C/REF(JX,YXZQ));{大盘收盘比例} {模拟大盘数据}开:BLO*O,NODRAW;高:BLH*H,NODRAW;低:BLL*L,NODRAW;收:BLC*C,NODRAW;{画背景图}{调节参数N确定背景高度}DRAWBAND(CONST(HHV(MAX(高,H),M)),RGB(100,100,100), CONST(LLV(MIN(低,L),M)),RGB(50,50,50));STICKLINE(P=CURRBARSCOUNT,CONST(HHV(MAX(高,H),M) ),CONST(LLV(MIN(低,L),M)),0.01,-1),COLORBLUE;{统计周期界限} DRAWTEXT(CURRBARSCOUNT=100,CONST(LLV(MIN(低,L), M))*1.03,'理想论坛の超级实力'),COLORFFFFCC;{DRAWKLINE(高,开,低,收),COLORFF9B00;}{画大盘K线}STICKLINE(收>=开,高,低,0,0),COLORYELLOW;STICKLINE(收<开,高,低,0,0),COLORFF55BB; STICKLINE(收>=开,收,开,4,0),COLOR00AAFF; STICKLINE(收>=开,收,开,3.3,0),COLOR00BBFF; STICKLINE(收>=开,收,开,2.2,0),COLOR00CCFF; STICKLINE(收>=开,收,开,1.65,0),COLOR00DDFF; STICKLINE(收>=开,收,开,1.1,0),COLOR00EEFF; STICKLINE(收>=开,收,开,0.55,0),COLOR00FFFF; STICKLINE(收<开,收,开,4,0),COLORAA00BB; STICKLINE(收<开,收,开,3.3,0),COLORBB11BB; STICKLINE(收<开,收,开,2.2,0),COLORCC22BB; STICKLINE(收<开,收,开,1.65,0),COLORDD33BB; STICKLINE(收<开,收,开,1.1,0),COLOREE44BB; STICKLINE(收<开,收,开,0.55,0),COLORFF55BB; {画个股K线}STICKLINE(C>=O,L,H,0,0),COLORRED; STICKLINE(C<O,L,H,0,0),COLORFFFF00; STICKLINE(1,C,O,3,0),COLOR353500; STICKLINE(1,C,O,2.8,0),COLOR454500; STICKLINE(1,C,O,2,0),COLOR555500; STICKLINE(1,C,O,1.5,0),COLOR656500; STICKLINE(1,C,O,1,0),COLOR757500; STICKLINE(1,C,O,0.5,0),COLOR858500; STICKLINE(C>=O,C,O,3,0),COLOR000045; STICKLINE(C>=O,C,O,2.8,0),COLOR000065; STICKLINE(C>=O,C,O,2,0),COLOR000085; STICKLINE(C>=O,C,O,1.5,0),COLOR0000A5; STICKLINE(C>=O,C,O,1,0),COLOR0000C5; STICKLINE(C>=O,C,O,0.5,0),COLOR0000E5;个股命:MA(C,21),COLORRED,LINETHICK2;大盘命:MA(收,21),COLOR00FF80,LINETHICK2;{3组可调均线}WX:=MA(C,0);M1:MA(C,P1)*IF(N<1,WX,1); M2:MA(C,P2)*IF(N<2,WX,1); M3:MA(C,P3)*IF(N<3,WX,1); D1:MA(收,P1)*IF(N<1,WX,1); D2:MA(收,P2)*IF(N<2,WX,1); D3:MA(收,P3)*IF(N<3,WX,1);。

[通达信公式,编辑教程]主图叠加副图详细叠加方法

[通达信公式,编辑教程]主图叠加副图详细叠加方法

[通达信公式,编辑教程]主图叠加副图详细叠加方法这里要教的是方法,是主图叠加副图详细叠加方法,是研究公式的,作者乘风再次详细点写这个叠加方法,有请求请在论坛求助,本人不能满足每个人的要求,敬请谅解!========首先我们理解模板的意思,不能理解透,那么就无从入手HH:=CONST(HHV(C,120))*1;{取现价的N日最大值}LL:=CONST(LLV(C,120))*1;{取现价的N日最小值,HH与LL是整个版面的最高低点,这个好理解吧}HL:=CONST(IF(CONST((HH+LL)/2)<CONST(C),LL-(HH-LL)*0.2,HH+(HH-LL)*0.2));{取叠加副图自动转换高低值,当现价小于中间值时以LL-(HH-LL)*0.2为副图自动转换高低值,反之以HH+(HH-LL)*0.2为副图自动转换高低值,(HH-LL)*0.2就是最高低点的差值,也是所叠加副图的高低值的限制,想要叠加副图大点,那么(HH-LL)*0.4甚至0.6. CONST((HH+LL)/2)<CONST(C),这句的意思是当现价小于版面最高低点的一半时就自动转换将所叠加副图放上入下的意思,是为了保证叠加副图不太影响版面}HH1:=IF(CONST((HH+LL)/2)>CONST(C),HH,HL);{当现价小于中间值时以最大值为最高点,反之以HL为最高点}LL1:=IF(CONST((HH+LL)/2)<CONST(C),LL,HL);{当现价小于中间值时以最小值为最低点,反之以HL为最低点}HLMAX:=MAX(HH1,LL1);{设定所要叠加副图比例的最大值}HLMIN:=MIN(HH1,LL1);{设定所以叠加副图比例的最小值}HLMN1:=(HLMAX+HLMIN)/2;{取设定所要叠加副图比例的最大最小值的中间值}HLMN2:=HLMAX-HLMIN;{取设定所要叠加副图比例的最大最小值的差值}HLMN3:=(副图比例最高值-副图比例最低值)/2;HLMN4:=副图比例最高值-副图比例最低值{如果副图是KDJ来说,那么最高值就是100,最低点就是0,这个是有限制高低点副图叠加的最高低点值};所叠加副图线:(副图线形-HLMN4)*HLMN2/HLMN3+HLMN1;{按比例叠加副图线的计算方式}==========理解了以上的模板,那么叠加起来就轻松了1/先对所叠加的副图进行定义,以你想叠加的指标为例子RSV:=(CLOSE - LLV(LOW,18))/(HHV(HIGH,18) - LLV(LOW,18))*100;K:EMA(RSV,3);D:EMA(K,3);J:=(3*K-2*D);火山:IF(J<=0,20,0),LINETHICK0;STICKLINE(J<=0,90,100,8,0),COLORYELLOW;KDJ1:=REF(COUNT(J<REF(J,1),5)>=3,1) AND REF(J,1)<20;KDJ2:=J>REF(J,1);反转:IF(FILTER(KDJ1 AND KDJ2,3),50,0),COLORRED;VAR22:=REF(LOW,1);VAR33:=SMA(ABS(LOW-VAR22),3,1)/SMA(MAX(LOW-VAR22,0),3,1)*100;VAR44:=EMA(IF(CLOSE*1.3,VAR33*10,VAR33/10),3);VAR55:=LLV(LOW,13);VAR66:=HHV(VAR44,13);VAR77:=IF(MA(CLOSE,34),1,0);VAR888:=EMA(IF(LOW<=VAR55,(VAR44+VAR66*2)/2,0),3)/6 18*VAR77;VAR999:=IF(VAR888>100,100,VAR888);吸筹:VAR999,LINETHICK1,COLORCD7F32 ;STICKLINE(VAR999>-120,0,VAR999,2,10),COLORFF00FF;这个是你想叠加的副图那么我们就先定义,上面红色字体是要写输出条件,在主图是不能写的,主图只能写赋值,就是AA:=...........加等号的赋值,那么就先将副图指标原码粘贴过来,然后将有等号的输出条件加上等号,将画柱子等输出条件删除。

通达信指标公式源码 庄密码副图指标

通达信指标公式源码 庄密码副图指标

趋势顶底:(C-MA(C,30))/MA(C,30)*500;赢利技术:=BARSLAST(CROSS(C,MA(C,30)));股票指标公式:=BARSLAST(CROSS(MA(C,30),C));山坡线:IF(赢利技术<股票指标公式,赢利技术+1,0);压力线:HHV(趋势顶底,山坡线);绿龙线:(C-REF(C,山坡线))/REF(C,山坡线)*500;VVVDD4:=BARSLAST(CROSS(C,MA(C,20)));VVVDD5:=BARSLAST(CROSS(MA(C,20),C));VVVDD6:IF(VVVDD4<VVVDD5,VVVDD4+1,0);青龙线:(C-REF(C,VVVDD6))/REF(C,VVVDD6)*500;VVVDD8:VOL/CAPITAL*100 LINETHICK0;VVVDD9:SUM(VVVDD8,100) LINETHICK0;VVVDD0:SUM(VVVDD8,0)-REF(SUM(VVVDD8,0),VVVDD6),COLORFF937F LINETHICK0;VVVDD01:VVVDD0/青龙线,COLOR00FF00 LINETHICK0;{ M} DRAWTEXT(CROSS(青龙线,压力线) AND REF(青龙线,1)<REF(压力线,1),青龙线,'升');DRAWTEXT(CROSS(压力线,青龙线) AND REF(青龙线,1)>REF(压力线,1),压力线,'降');DRAWTEXT(CROSS(趋势顶底,山坡线) AND REF(趋势顶底,1)<REF(山坡线,1),山坡线-1,'上');DRAWTEXT(CROSS(趋势顶底,山坡线) AND REF(趋势顶底,1)<REF(山坡线,1),山坡线-18,'坡');DRAWTEXT(CROSS(山坡线,趋势顶底) AND REF(趋势顶底,1)>REF(山坡线,1),山坡线-1,'下');DRAWTEXT(CROSS(山坡线,趋势顶底) AND REF(趋势顶底,1)>REF(山坡线,1),山坡线-18,'坡');DRAWTEXT(CROSS(0,趋势顶底) AND REF(趋势顶底,1)>0,-1,'必'); DRAWTEXT(CROSS(0,趋势顶底) AND REF(趋势顶底,1)>0,-18,'跌'); DRAWTEXT(CROSS(绿龙线,压力线) AND REF(绿龙线,1)<REF(压力线,1),绿龙线,'升');DRAWTEXT(CROSS(压力线,绿龙线) AND REF(绿龙线,1)>REF(压力线,1),压力线,'降');DRAWTEXT(REF(趋势顶底,1)=REF(压力线,1) AND 趋势顶底<压力线,压力线-5,'下');DRAWTEXT(REF(趋势顶底,1)=REF(压力线,1) AND 趋势顶底<压力线,趋势顶底-10,'调');。

通达信指标公式源码 量价相合副图指标 源码

通达信指标公式源码 量价相合副图指标 源码

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;。

通达信指标公式源码 大小底结合副图+选股 公布源码 通达信指标

通达信指标公式源码 大小底结合副图+选股 公布源码 通达信指标

大小底结合: 副图X_1:=6;X_2:=80;X_3:=REF(CLOSE,1);X_4:=SMA(MAX(CLOSE-X_3,0),18,1)/SMA(ABS(CLOSE-X_3),13,1)*100; X_5:=SMA(MAX(CLOSE-X_3,0),24,1)/SMA(ABS(CLOSE-X_3),20,1)*100; X_6:=BARSLAST(X_5<48)<=3 AND CROSS(X_4,X_5);X_7:=(CLOSE-MA(CLOSE,48))/MA(CLOSE,20)*100<(-12.5);X_8:=LLV(LOW,5);X_9:=HHV(HIGH,10);X_10:=EMA((CLOSE-X_8)/(X_9-X_8)*100,4);X_11:=EMA(0.667*REF(X_10,1)+0.333*X_10,2);X_12:=1011131;X_13:=IF(DATE<=X_12,X_7,0) OR IF(DATE<=X_12,X_2,0);X_15:=SMA(MAX(CLOSE-X_14,0),7,1)/SMA(ABS(CLOSE-X_14),7,1)*100;X_16:=SMA(MAX(CLOSE-X_14,0),13,1)/SMA(ABS(CLOSE-X_14),13,1)*100; X_17:=BARSLAST(X_16<43)<=3 AND CROSS(X_15,X_16);X_18:=(CLOSE-MA(CLOSE,43))/MA(CLOSE,20)*100<(-12.5);X_19:=LLV(LOW,5);X_20:=HHV(HIGH,10);X_21:=EMA((CLOSE-X_19)/(X_20-X_19)*100,4);X_22:=EMA(0.667*REF(X_21,1)+0.333*X_21,2);X_23:=1011131;X_24:=IF(DATE<=X_23,X_18,0) OR IF(DATE<=X_23,X_2,0);X_25:=0-(-1)*X_17 AND X_18 AND CROSS(X_21,X_22) AND X_21<=25;X_26:=REF(CLOSE,1);X_27:=SMA(MAX(CLOSE-X_26,0),7,1)/SMA(ABS(CLOSE-X_26),7,1)*100;X_28:=SMA(MAX(CLOSE-X_26,0),13,1)/SMA(ABS(CLOSE-X_26),13,1)*100; X_29:=BARSLAST(X_28<33)<=3 AND CROSS(X_27,X_28);X_30:=(CLOSE-MA(CLOSE,33))/MA(CLOSE,20)*100<(-12.5);X_31:=LLV(LOW,5);X_32:=HHV(HIGH,10);X_33:=EMA((CLOSE-X_31)/(X_32-X_31)*100,4);X_34:=EMA(0.667*REF(X_33,1)+0.333*X_33,2);X_35:=1011131;X_36:=IF(DATE<=X_35,X_30,0) OR IF(DATE<=X_35,X_2,0);小底小仓位:0-(-1)*X_29 AND X_30 AND CROSS(X_33,X_34) ANDX_33<=25,COLOR80FF00;DRAWICON(小底小仓位>0,0.8,23);X_37:=REF(CLOSE,1);X_38:=SMA(MAX(CLOSE-X_37,0),7,1)/SMA(ABS(CLOSE-X_37),7,1)*100;X_39:=SMA(MAX(CLOSE-X_37,0),13,1)/SMA(ABS(CLOSE-X_37),13,1)*100; X_40:=BARSLAST(X_39<23)<=3 AND CROSS(X_38,X_39);X_41:=(CLOSE-MA(CLOSE,23))/MA(CLOSE,20)*100<(-12.5);X_42:=LLV(LOW,5);X_43:=HHV(HIGH,10);X_44:=EMA((CLOSE-X_42)/(X_43-X_42)*100,4);X_45:=EMA(0.667*REF(X_44,1)+0.333*X_44,2);X_46:=1011131;X_47:=IF(DATE<=X_46,X_41,0) OR IF(DATE<=X_46,X_2,0);大底大仓位:0-(-1)*X_40 AND X_41 AND CROSS(X_44,X_45) ANDX_44<=25,COLORRED;DRAWTEXT_FIX(C>O,0.01,0.9,0,'室'),COLORyellow; DRAWICON(大底大仓位>0,0.8,24);大小底结合: 条件选股X_1:=6;X_2:=80;X_4:=SMA(MAX(CLOSE-X_3,0),18,1)/SMA(ABS(CLOSE-X_3),13,1)*100;X_5:=SMA(MAX(CLOSE-X_3,0),24,1)/SMA(ABS(CLOSE-X_3),20,1)*100;X_6:=BARSLAST(X_5<48)<=3 AND CROSS(X_4,X_5);X_7:=(CLOSE-MA(CLOSE,48))/MA(CLOSE,20)*100<(-12.5);X_8:=LLV(LOW,5);X_9:=HHV(HIGH,10);X_10:=EMA((CLOSE-X_8)/(X_9-X_8)*100,4);X_11:=EMA(0.667*REF(X_10,1)+0.333*X_10,2);X_12:=1011131;X_13:=IF(DATE<=X_12,X_7,0) OR IF(DATE<=X_12,X_2,0);X_14:=REF(CLOSE,1);X_15:=SMA(MAX(CLOSE-X_14,0),7,1)/SMA(ABS(CLOSE-X_14),7,1)*100;X_16:=SMA(MAX(CLOSE-X_14,0),13,1)/SMA(ABS(CLOSE-X_14),13,1)*100; X_17:=BARSLAST(X_16<43)<=3 AND CROSS(X_15,X_16);X_18:=(CLOSE-MA(CLOSE,43))/MA(CLOSE,20)*100<(-12.5);X_19:=LLV(LOW,5);X_20:=HHV(HIGH,10);X_21:=EMA((CLOSE-X_19)/(X_20-X_19)*100,4);X_22:=EMA(0.667*REF(X_21,1)+0.333*X_21,2);X_23:=1011131;X_24:=IF(DATE<=X_23,X_18,0) OR IF(DATE<=X_23,X_2,0);X_25:=0-(-1)*X_17 AND X_18 AND CROSS(X_21,X_22) AND X_21<=25;X_26:=REF(CLOSE,1);X_27:=SMA(MAX(CLOSE-X_26,0),7,1)/SMA(ABS(CLOSE-X_26),7,1)*100;X_28:=SMA(MAX(CLOSE-X_26,0),13,1)/SMA(ABS(CLOSE-X_26),13,1)*100; X_29:=BARSLAST(X_28<33)<=3 AND CROSS(X_27,X_28);X_30:=(CLOSE-MA(CLOSE,33))/MA(CLOSE,20)*100<(-12.5);X_31:=LLV(LOW,5);X_32:=HHV(HIGH,10);X_33:=EMA((CLOSE-X_31)/(X_32-X_31)*100,4);X_34:=EMA(0.667*REF(X_33,1)+0.333*X_33,2);X_35:=1011131;X_36:=IF(1<=X_35,X_30,0) OR IF(1<=X_35,X_2,0);X_37:=0-(-1)*X_29 AND X_30 AND CROSS(X_33,X_34) AND X_33<=25;X_38:=REF(CLOSE,1);X_39:=SMA(MAX(CLOSE-X_38,0),7,1)/SMA(ABS(CLOSE-X_38),7,1)*100;X_40:=SMA(MAX(CLOSE-X_38,0),13,1)/SMA(ABS(CLOSE-X_38),13,1)*100; X_41:=BARSLAST(X_40<23)<=3 AND CROSS(X_39,X_40);X_42:=(CLOSE-MA(CLOSE,23))/MA(CLOSE,20)*100<(-12.5);X_43:=LLV(LOW,5);X_44:=HHV(HIGH,10);X_45:=EMA((CLOSE-X_43)/(X_44-X_43)*100,4);X_46:=EMA(0.667*REF(X_45,1)+0.333*X_45,2);X_47:=1011131;X_48:=IF(1<=X_47,X_42,0) OR IF(1<=X_47,X_2,0);X_49:=0-(-1)*X_41 AND X_42 AND CROSS(X_45,X_46) AND X_45<=25; XG:X_37 OR X_49;。

通达信副图同步(附源码)

通达信副图同步(附源码)

通达信副图同步(附源码)通达信副图同步(附源码)MID := MA(CLOSE,7);HH:=MID + 2*AVEDEV(CLOSE,10);LL:=MID - 2*AVEDEV(CLOSE,10);RSV:= (CLOSE-MID)/AVEDEV(CLOSE,20)*7;K:=SMA(RSV,3,1),COLORWHITE;D:=SMA(K,3,1),COLORYELLOW;J:=3*K-2*D;VAR77:=HHV(HIGH,5);VAR88:=LLV(LOW,5);趋势:=EMA((CLOSE-VAR88)/(VAR77-VAR88)*7,5);VAR99:=EMA(CLOSE,6)-EMA(CLOSE,12);VAR100:=5*EMA(VAR99,9);VAR110:=1*(VAR99-VAR100);VAR120:=IF(VAR110 > 0,6*VAR110,0);买:=FILTER(趋势 < VAR120 AND 趋势 < REF(趋势,3) AND 趋势 > REF(趋势,1) AND 趋势 < 3,1);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) ANDCLOSE <=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 VAR15 OR 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;STICKLINE(K > D,K,D,2,1),COLORYELLOW;STICKLINE(K < D,K,D,2,0),COLORBLUE;DRAWICON(买 > 0,K,1);STICKLINE(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,CLOSE,REF(CLOSE,1),2,1),COLORRED;STICKLINE(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,CLOSE,REF(CLOSE,1),2,0),COLORFFCC66;STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),3,1),COLORYE LLOW;STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR00 FFFF;STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR00 C8FF;STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),1,0),COLOR10 ECFF;STICKLINE(VAR1A,REF(CLOSE,1),RECLOSE,2),3,0),COLOR00D 900;STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR93 FFD1;STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),1,0),COLOR93 FF22;STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),1,0),COLOR24 FF22;。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
相关文档
最新文档