趋势看盘 通达信指标公式源码

合集下载

趋势看盘 通达信指标公式源码

趋势看盘 通达信指标公式源码

A:=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);ZDZK1:=EMA(A,6);ZDZK2:=REF(ZDZK1,1);超短线: ((A-LLV(A,21))/(HHV(A,21)-LLV(A,21))*(4))*(25),COLORWHITE,LINETHICK1;趋势线:IF(ZDZK1>=ZDZK2,ZDZK1+10,ZDZK2),COLORRED;调和线:IF(ZDZK2-ZDZK1,ZDZK2,ZDZK1),COLORGREEN;月量价:=SUM((CLOSE-OPEN)/(HIGH-LOW)*VOL,20)/10000;周均量:=EMA(月量价,5);趋势买点:(趋势线>调和线AND REF(趋势线,1)=REF(调和线,1) AND (趋势线<(MA(REF(HHV(趋势线,30),1),2)+MA(REF(LLV(趋势线,30),1),2))/2) AND 月量价>周均量AND (ZIG(3,12)>MA(ZIG(3,12),2)))*20,STICK,COLORRED;DRAWICON(趋势买点>0,趋势买点,1);STICKLINE(REF(趋势线,1)<趋势线,趋势线,REF(趋势线,1),8,1),COLORF00FF0; STICKLINE((趋势线>调和线AND REF(趋势线,1)=REF(调和线,1)),趋势线,REF(趋势线,1),2,1),COLORRED;STICKLINE(趋势线<REF(趋势线,1) OR (AMOUNT/REF(AMOUNT,1)<0.97),趋势线,REF(趋势线,1),8,0),COLORWHITE;STICKLINE(REF(调和线,1)>调和线,调和线,REF(调和线,1),8,1),COLOR00FF00;离场:(趋势线=调和线AND REF(趋势线,1)>REF(调和线,1) AND 调和线>50 AND (MA(ZIG(3,12),2)> ZIG(3,12))),STICK;出5:STICKLINE(离场,100,80,2,0),STICK,COLORGREEN,LINETHICK2;顶:90,COLOR9DFFFF;强弱:50,COLORGRAY;底:10,COLORGRAY;。

通达信指标公式源码 傻买傻卖公式趋势主图

通达信指标公式源码 傻买傻卖公式趋势主图

{N(1,,100,6)}CC:IF(CURRBARSCOUNT<18,CONST(REF(C,1)),DRAWNULL),COLOR000000; 止赢:1.05*CC,COLORFFFFFF,LINETHICK2;止损:0.97*CC,COLORFFFFFF,LINETHICK2;{LOOW:BBI - 2.58*STD(BBI,10),COLOR000099,LINETHICK0};SAT:=IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100>100,100,(AMOU NT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100);AA10:MA(CLOSE,8),COLOR0000FF;AA12:MA(CLOSE,12),COLOR0000FF;BB10:=((ATAN((AA10 - REF(AA10,1))) * 3.1416) * 10);BB12:=((ATAN((AA12 - REF(AA12,1))) * 3.1416) * 10);MA13:=MA(CLOSE,13);DRAWBAND(AA10,RGB(150,0,100),AA12,RGB(256,96,96));X1:=(C+L+H)/3;BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;EMA8:=EMA(C,8);DRAWTEXT(FILTER(BB13>1 AND EMA(X1,13)>REF(EMA(X1,8),1),10),EMA8,'∠45上升'),COLORWHITE;压力:=MA(REF(HHV(C,30),1),2),COLOR9DFFFF;支撑:=MA(REF(LLV(C,30),1),2),COLORABFF46;AA1:=AMOUNT/V;BB1:=L<AA1*0.9;CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;DD1:=L<MA(C,5)*0.921;EE1:=V<MA(V,5)*1.5;FF1:=BB1 AND CC1 AND DD1 AND EE1;DRAWTEXT(FF1,(LOW* 0.99),'★老鼠仓'),COLOR4080FF;A51:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L ,55))/(HHV(H,55)-LLV(L,55))*100,5,1);黑码线:=EMA(A51,5);A54:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;趋势线:=(MA(3*SMA(A54,6,1)-2*SMA(SMA(A54,5,1),5,1),2));DRAWTEXT(CROSS(趋势线,0)AND 黑码线<40,(HIGH* 0.97),'★大黑码'),COLORYELLOW;LC:=REF(CLOSE,1);RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100); FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);DRAWTEXT(CROSS(FF,MA15),(LOW * 0.98),'★底背离'),COLOR00FFFF; DRAWTEXT(CROSS(88,RSI),(HIGH * 1.02),'☆顶背离'),COLORFFFF00;VAR2:=LLV(LOW,27);VAR3:=HHV(HIGH,34);VAR4:=EMA((CLOSE-VAR2)/(VAR3-VAR2)*4,4)*25;注意买:=IF((VAR4<10),80,100);RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;超跌:=IF(J<0,10,0);BDDD:=LLV(J,2)=LLV(J,8);买入:=IF(CROSS(J,REF(J+0.01,1)) AND BDDD AND J<20,30,0); DRAWTEXT(买入AND 注意买=100 AND 超跌=0,LOW,'★短买'),COLORFFFFFF;MTM:=C-REF(C,1);DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);买:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) ANDCROSS(DX,MA(DX,2)),1,0);DRAWTEXT(FILTER(买=1,5),LOW-0.09,'★拉升'),COLOR00FFFF;A7:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,21)+EMA((OPEN+HIGH+LOW+CL OSE)/4,34)+EMA((OPEN+HIGH+LOW+CLOSE)/4,68))/3;VAR7:=FORCAST(A7,6);{MA3K:VAR7,COLORRED,LINETHICK0;MA5K:VAR7,COLORYELLOW,LINETHICK0;}STICKLINE(CLOSE> REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORRED; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR000055; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR000077; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR000099; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLOR0000BB; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLOR0000DD; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLOR0000FF; STICKLINE(CLOSE= REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORWHITE; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR555555; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR777777; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR999999; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORBBBBBB; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORDDDDDD; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORFFFFFF; STICKLINE(CLOSE< REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORCYAN;STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR990000; STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLORCC0000; STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLORFF4400; STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORFF8800; STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORFFCC00; STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORCYAN;趋势射线3X: DRAWLINE(L=LLV(L,3),L,C=HHV(C,3),L,0),COLOR9A90FF;趋势射线7: DRAWLINE(H=HHV(H,7),H,L=LLV(L,7),L,0),COLOR9AFF89;射线7X: DRAWLINE(L=LLV(L,7),L,H=HHV(H,7),L,0),COLOR9AFF89;趋势射线21: DRAWLINE(H=HHV(H,21),H,L=LLV(L,21),L,0),COLORC100FF; 射线21X: DRAWLINE(L=LLV(L,21),L,H=HHV(H,21),L,0),COLORC100FF;趋势射线35: DRAWLINE(H=HHV(H,35),H,L=LLV(L,35),L,0),COLORC1005B; 射线35X: DRAWLINE(L=LLV(L,35),L,H=HHV(H,35),L,0),COLORC1005B;趋势射线49: DRAWLINE(H=HHV(H,49),H,L=LLV(L,49),L,0),COLORYELLOW; 射线49X: DRAWLINE(L=LLV(L,49),L,H=HHV(H,49),L,0),COLORYELLOW; AA:=(REF(CLOSE,1)+REF(CLOSE,2)+OPEN)/3;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.8,0.05,1,'今日保护价'),LINETHICK2,COLOR00FFFF;DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.84,0.05,1,AA);DRAWTEXT_FIX(CURRBARSCOUNT=1,0.86,0.05,1,'元');重心:(2*C+H+L)/4,COLOR00FFFF,LINETHICK0;SJ:=WMA((重心-LLV(L,5))/(HHV(H,5)-LLV(L,5))*100,2);ZJ:=WMA(0.618*REF(SJ,1)+0.382*SJ,2);DRAWTEXT(CROSS(SJ,ZJ) AND SJ<30,L-0.3,'★'),COLOR00FFFF; DRAWTEXT(CROSS(ZJ,SJ) AND SJ>70,H+0.2,'★'),COLORFFFF00;A1:=EMA(C,14),COLORA2A200,LINETHICK1;A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW;突破:REF(EMA(C,14),1),NODRAW;距离:(C-突破)/突破*100,NODRAW;出击:IF(A1X>=0,REF(EMA(C,14),BARSLAST(CROSS(A1X,0))+1),DRAWNULL),CO LORB000B0,LINETHICK1;休假:IF(A1X<0,REF(EMA(C,14),BARSLAST(CROSS(0,A1X))+1),DRAWNULL),COL ORFFFF00,LINETHICK1;涨幅:IF(A1X>=0,(C-出击)/出击*100,DRAWNULL)NODRAW;跌幅:IF(A1X<0,(C-休假)/休假*100,DRAWNULL)NODRAW;♂10%:IF(H>=出击*1.1,出击*1.1,DRAWNULL),COLORRED,DOTLINE,LINETHICK1;♂20%:IF(H>=出击*1.2,出击*1.2,DRAWNULL),COLORRED,DOTLINE,LINETHICK1;♂30%:IF(H>=出击*1.3,出击*1.3,DRAWNULL),COLORRED,DOTLINE,LINETHICK1;♀Ⅰ:IF(L<休假*0.9,休假*0.9,DRAWNULL),COLORGREEN,DOTLINE,LINETHICK1;♀Ⅱ:IF(L<休假*0.8,休假*0.8,DRAWNULL),COLORGREEN,DOTLINE,LINETHICK1;♀Ⅲ:IF(L<休假*0.7,休假*0.7,DRAWNULL),COLORGREEN,DOTLINE,LINETHICK1;STICKLINE(CROSS(A1X,0),C,O,2,0),COLOR00FFFF;STICKLINE(CROSS(0,A1X),C,O,2,0),COLOR606000;STICKLINE(CROSS(A1X,0)ORCROSS(0,A1X),REF(EMA(C,14),1),REF(EMA(C,14),1)*0.998,3,0),COLOR3C3C3 C;STICKLINE(ISLASTBAR,REF(EMA(C,14),1),REF(EMA(C,14),1)*0.998,3,0),COL OR00FFFF;A11:DRAWLINE(HIGH>=HHV(HIGH,5),HIGH,LOW<=LLV(LOW,5),LOW,0),CO LORA2A200;B1:DRAWLINE(LOW<=LLV(LOW,5),LOW,HIGH>=HHV(HIGH,5),HIGH,0),COL OR0000FF;A2:DRAWLINE(HIGH>=HHV(HIGH,13),HIGH,LOW<=LLV(LOW,13),LOW,0),C OLORA2A200;B2:DRAWLINE(LOW<=LLV(LOW,13),LOW,HIGH>=HHV(HIGH,13),HIGH,0),C OLOR0000FF;A3:DRAWLINE(HIGH>=HHV(HIGH,34),HIGH,LOW<=LLV(LOW,34),LOW,0),C OLORA2A200;B3:DRAWLINE(LOW<=LLV(LOW,34),LOW,HIGH>=HHV(HIGH,34),HIGH,0),C OLOR0000FF;A4:DRAWLINE(HIGH>=HHV(HIGH,55),HIGH,LOW<=LLV(LOW,55),LOW,0),C OLORA2A200;B4:DRAWLINE(LOW<=LLV(LOW,55),LOW,HIGH>=HHV(HIGH,55),HIGH,0),C OLOR0000FF;{MTM:=C-REF(C,1);}ZLGJ:=100*EMA(EMA(MTM,N1),N1)/EMA(EMA(ABS(MTM),N1),N1);买1:=IF(LLV(ZLGJ,2)=LLV(ZLGJ,7) AND COUNT(ZLGJ<0,2) ANDCROSS(ZLGJ,MA(ZLGJ,2)),1,0);卖1:=IF(HHV(ZLGJ,2)=HHV(ZLGJ,7) AND COUNT(ZLGJ>50,2) AND CROSS(MA(ZLGJ,2),ZLGJ),1,0);DRAWICON(FILTER(买1=1,5),LOW*0.96,34),COLORRED;STICKLINE(FILTER(买1=1,5),C,O,1,0),COLORRED;DRAWICON(FILTER(卖1=1,1),H*1.03,35),COLOR646400;STICKLINE(FILTER(卖1=1,1),C,O,1,0),COLOR646400;{RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;}BDGD:=HHV(J,2)=HHV(J,8) AND J>80;注意:=IF(CROSS(REF(J-0.01,1),J) AND REF(BDGD,1),1,0);DRAWTEXT(注意AND 卖1<1,HIGH*1.01,'★'),COLORFFFF00,LINETHICK3; STICKLINE(注意AND 卖1<1,O,CLOSE,1,0),COLOR646400,LINETHICK2;时间窗口01:=FILTER(IF(HHVBARS(HIGH,5),0,H),5),COLORFFFF00; DRAWTEXT(时间窗口01,HIGH*0.99,'5');时间窗口02:=FILTER(IF(LLVBARS(LOW,5),0,L),5),COLOR00FFFF; DRAWTEXT(时间窗口02,LOW*0.99,'5');时间窗口1:=FILTER(IF(HHVBARS(HIGH,13),0,1),13),COLOR00FF00; DRAWTEXT(时间窗口1,HIGH*0.99,'13');时间窗口2:=FILTER(IF(LLVBARS(LOW,13),0,1),13),COLOR0000FF; DRAWTEXT(时间窗口2,LOW*0.99,'13');时间窗口3:=FILTER(IF(HHVBARS(HIGH,34),0,2),34),COLOR55FF55; DRAWTEXT(时间窗口3,HIGH*0.99,'34');时间窗口4:=FILTER(IF(LLVBARS(LOW,34),0,2),34),COLOR5555FF; DRAWTEXT(时间窗口4,LOW*0.99,'34');时间窗口5:=FILTER(IF(HHVBARS(HIGH,55),0,30),55),COLOR99FF99; DRAWTEXT(时间窗口5,HIGH*0.99,'55');时间窗口6:=FILTER(IF(LLVBARS(LOW,55),0,30),55),COLORDD00FF; DRAWTEXT(时间窗口6,LOW*0.99,'55');时间窗口7:=FILTER(IF(HHVBARS(HIGH,89),0,40),89),COLORDDFFDD; DRAWTEXT(时间窗口7,HIGH*0.99,'89');时间窗口8:=FILTER(IF(LLVBARS(LOW,89),0,40),89),COLOR0055FF; DRAWTEXT(时间窗口8,LOW*0.99,'89');时间窗口9:=FILTER(IF(HHVBARS(HIGH,144),0,50),144),COLORDDFF00; DRAWTEXT(时间窗口9,HIGH*0.99,'144');时间窗口10:=FILTER(IF(LLVBARS(LOW,144),0,50),144),COLOR9955FF; DRAWTEXT(时间窗口10,LOW*0.99,'144');时间窗口11:=FILTER(IF(HHVBARS(HIGH,233),0,60),233),COLORDDFFFF; DRAWTEXT(时间窗口11,HIGH*0.99,'233');时间窗口12:=FILTER(IF(LLVBARS(LOW,233),0,60),233),COLORFF55FF; DRAWTEXT(时间窗口12,LOW*0.99,'233');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)/1.01,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=60{位置} 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=60{位置} AND (解盘16=1 OR 解盘18=1 OR 解盘20=1),IF(解盘18=1 OR 解盘20=1,KDAT*0.98,KDAT*0.96),解盘文字2),COLOR00FFFF;{A1:=REF(HIGH,3)=HHV(HIGH,2*3+1);B1:=FILTER(A1,3);}C1:=BACKSET(B1,3+1);D1:=FILTER(C1,3);{高点}}{A2:=REF(LOW,3)=LLV(LOW,2*3+1);B2:=FILTER(A2,3);}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 ISLASTBAR ORBARSCOUNT(CLOSE)=1;H2:=D1 AND NOT(D2 AND E1>=E2);L1:=D2 AND NOT(D1 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 ISLASTBAR 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);{过滤后高点}J1:=BACKSET(ISLASTBAR,MIN(BARSLAST(HD),BARSLAST(LD))+1);J2:=J1>REF(J1,1);{A3:=H;B3:=REF(H,REF(BARSLAST(HD),1)+1)>REF(H,REF(BARSLAST(HD),1)+2+REF (BARSLAST(HD),REF(BARSLAST(HD),1)+2));}D3:=A3 AND B3 AND HD;E3:=BACKSET(D3,REF(BARSLAST(HD),1)+2);HH:=E3>REF(E3,1);{找出全部长期高点}{A4:=L>REF(L,REF(BARSLAST(LD),1)+1);B4:=REF(L,REF(BARSLAST(LD),1)+1);}D4:=A4 AND B4 AND LD;E4:=BACKSET(D4,REF(BARSLAST(LD),1)+2); LL:=E4>REF(E4,1);{找出全部长期低点}DRAWICON(HH,H*1.01,8);DRAWICON(LL,L*0.999,7);H3:=HH OR ISLASTBAR OR BARSCOUNT(C)=1; {后面进行过滤,方法同前。

通达信指标公式源码量能趋势 副图源码

通达信指标公式源码量能趋势 副图源码

用法:跟随趋势,柱短关注,越短越好;柱长小心,量柱缩小小心变盘,简单明了。

{N:5,K:1}量能:EMA(400*(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N)),K)/4,STICK,L INETHICK5,COLORRED;Z:=DRAWTEXT(量能>23,量能*0.92,'○'),COLORYELLOW;DRAWICON(量能>23,量能*0.7,17);生命分水岭: 34;强势: 84;DRAWICON(量能<1,4,15);DRAWICON(量能<2,10,13);J:=DRAWICON(量能<3,17,1);买入线:20;卖出线:72;RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,LINETHICK2;K0:SMA(RSV,3,1),LINETHICK1;D:=SMA(K,3,1),LINETHICK1;J0:=3*K-2*D,COLORFF00FF,LINETHICK1;DRAWICON(CROSS(J0,1),J0,1);DRAWICON(K0>80 AND D>80 AND CROSS(D,K),D,2);KY:IF(K0>REF(K0,1),K0,DRAWNULL),COLORFF8000,LINETHICK1;KX:IF(K0<REF(K0,1),K0,DRAWNULL),COLORYELLOW,LINETHICK1;DY:IF(D<REF(D,1),D,DRAWNULL),COLORGREEN,LINETHICK1;DX:IF(D>REF(D,1),D,DRAWNULL),COLORRED,LINETHICK1;JY探升:=IF(J0>REF(J0,1),J0,DRAWNULL),COLORFF00FF,LINETHICK1;JX探跌:=IF(J0<REF(J0,1),J0,DRAWNULL),COLORFFFF00,LINETHICK1;{周赚10%}A7:=C-REF(C,1);A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);SHORT:=7;LONG:=19;RMA:=EMA(CLOSE,SHORT);NMA:=EMA(CLOSE,LONG);UP1:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1),LLV(L,BARSLAS T(CROSS(NMA,RMA))+1),H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1),HHV( H,BARSLAST(CROSS(RMA,NMA))+1),0);DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1),HHV(H,BA RSLAST(CROSS(RMA,NMA))+1),L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1),L LV(L,BARSLAST(CROSS(NMA,RMA))+1),0);买进:(LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2))) AND REF(DOWN,1)<REF(DOWN,2) ANDUP1>REF(DOWN,1),COLORYELLOW,STICK,LINETHICK7;顶:(HHV(A8,2)=HHV(A8,7) AND COUNT(A8<40,2) AND CROSS(MA(A8,2),A8)) AND REF(UP1,1)<REF(UP1,2) ANDDOWN>REF(UP1,1),COLORWHITE,STICK,LINETHICK7;抄底:CROSS("KDJ.J",1)*5,COLORWHITE;。

完美趋势主图指标 通达信指标公式源码

完美趋势主图指标 通达信指标公式源码

通达信完美趋势主图指标经典指标_完美趋势,本人在用,用到未来函数,看趋势一流,不喜欢未来函数的可以不用,这里说一下未来函数可是好东东呀!{完美趋势P 5 50 30 N 1 100 8}HV1:=REF(H,P)=HHV(H,2*P+1);HV2:=FILTER(HV1,P);HV3:=BACKSET(HV2,P+1);HV4:=FILTER(HV3,P);R11:=BACKSET(ISLASTBAR,BARSLAST(HV4)+1);S11:=R11>REF(R11,1);BOH:DRAWLINE(HV4,H,S11,H,1),COLORBLUE;AA2:=REF(L,P)=LLV(L,2*P+1);BB2:=FILTER(AA2,P);CC2:=BACKSET(BB2,P+1);DD2:=FILTER(CC2,P);T11:=BACKSET(ISLASTBAR,BARSLAST(DD2)+1);U11:=T11>REF(T11,1);BOL:DRAWLINE(DD2,L,U11,L,1),COLORRED;BOV:=L<=BOL AND C>BOL;DRAWICON(BOV,L,1);M:=INTPART(3*N/5);AAA:=REF(H,M)=HHV(H,2*M+1);QYY:=BACKSET(AAA,M+1);CCC:=FILTER(QYY,M) AND H=HHV(H,M+1);DDDD:=BARSLAST(CCC),NODRAW;GDTSS:=IF(CCC,CURRBARSCOUNT,0);DINGBUTSS:=IF(DDDD,REF(GDTSS,DDDD),GDTSS);GDCS11:=CONST(DINGBUTSS);DINGBUTS11:=REF(DINGBUTSS,DDDD+1);GDCS22:=CONST(DINGBUTS11);AA11:=REF(L,M)=LLV(L,2*M+1);QY11:=BACKSET(AA11,M+1);CC11:=FILTER(QY11,M) AND L=LLV(L,M+1);DD11:=BARSLAST(CC11);DDTSS:=IF(CC11,CURRBARSCOUNT,0);DDTS11:=IF(DD11,REF(DDTSS,DD11),DDTSS);DDCS11:=CONST(DDTS11);DDTS22:=REF(DDTS11,DD11+1);DDCS22:=CONST(DDTS22);线1:DRAWLINE(CURRBARSCOUNT=GDCS22,H,CURRBARSCOUNT=GDCS11,H,1),COLORFF AA99,LINETHICK1;线2:DRAWLINE(CURRBARSCOUNT=DDCS22,L,CURRBARSCOUNT=DDCS11,L,1) COLOR9966FF,LINETHICK1;{}预报:H>=线1 AND REF(H<线1,1),NODRAW; 预警:L<=线2 AND REF(L>线2 ,1),NODRAW;STICKLINE(预报,O,C,3,0),COLOR00FFFF; STICKLINE(预警,O,C,3,0),COLORFF0033;。

通达信指标公式源码 通达信趋势(副图源码)精品中的精品

通达信指标公式源码 通达信趋势(副图源码)精品中的精品

X1:=(C+L+H)/1.5;X2:=EMA(X1,3);X3:=EMA(X2,2.5);DRAWICON(CROSS(X2,X3),L*0.98,9),COLORRED;STICKLINE(X2>=X3,LOW,HIGH,0,1),COLORRED;STICKLINE(X2>=X3,CLOSE,OPEN,3.2,2),COLORRED;STICKLINE(X2<X3,LOW,HIGH,0,1),COLOR00FF00;STICKLINE(X2<X3,CLOSE,OPEN,3.2,2),COLOR00FF00;STICKLINE(CROSS(X3,X2),OPEN,CLOSE,3.2,0),COLOR00FF00;STICKLINE(CROSS(X2,X3),OPEN,CLOSE,3.2,0),COLORRED;STICKLINE((CLOSE>OPEN) AND (X2<X3),CLOSE,OPEN,3.2,2)COLOR00FF00; STICKLINE((CLOSE>OPEN) AND (X2>=X3),CLOSE,OPEN,3.2,2)COLORRED; STICKLINE((CLOSE<OPEN) AND (X2<X3),CLOSE,OPEN,3.2,0)COLOR00FF00; STICKLINE((CLOSE<OPEN) AND (X2>=X3),CLOSE,OPEN,3.2,0)COLORRED;VAR1F:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27 )-LLV(LOW,27))*100;VAR20:=REVERSE(VAR1F);VAR21:=SMA(VAR1F,3,1);移动平均: SMA(VAR21,3,1), COLORRED;参考线: SMA(移动平均,3,1),COLORCYAN ;走势线:SMA(移动平均,2,1),COLORWHITE;关注: IF(CROSS(移动平均,参考线) AND 移动平均<30,33,0), COLORCYAN,LINETHICK2;风险: IF(CROSS(参考线,移动平均) AND 参考线>75,68,100) , COLORGREEN,LINETHICK2; DRAWTEXT(CROSS(移动平均,参考线) AND 移动平均<20,33,'☆--底位金叉') , COLORWHITE;A1:IF(CROSS(移动平均,参考线) AND 移动平均<70 AND 移动平均>40,移动平均*1.1,0),STICK,LINETHICK2,COLORRED;DRAWTEXT(A1,移动平均*1.1,'再次起飞'),LINETHICK2,COLORYELLOW;。

通达信趋势看顶底指标公式源码编程思路破译

通达信趋势看顶底指标公式源码编程思路破译

通达信趋势看顶底指标公式源码编程思路破译编程思路破译VAR1赋值:(收盘价的34日指数移动平均-收盘价的21日指数移动平均)*100VAR2赋值:VAR1的7日指数移动平均VAR3赋值:((21日内最高价的最高值-收盘价)/(21日内最高价的最高值-21日内最低价的最低值))*100-10VAR4赋值:((收盘价-21日内最低价的最低值)/(21日内最高价的最高值-21日内最低价的最低值))*100VAR5赋值:VAR4的13日[8日权重]移动平均VAR6赋值:VAR3的21日[8日权重]移动平均VAR7赋值:收盘价的80日简单移动平均-收盘价的10日简单移动平均/7VAR8赋值:收盘价的5日指数移动平均VAR9赋值:(9日内收盘价的最低值)*1.1的14日简单移动平均VAR10赋值:2*VAR9-VAR8-收盘价*0.1VAR11赋值:如果((VAR8-VAR10)*5>0),返回((VAR8-VAR10)*5的2乘幂)/10,否则返回(-1*((VAR8-VAR10)*(5)的2乘幂))/(10) VAR12赋值:如果(VAR11>0),返回VAR11-0,否则返回12VAR13赋值:收盘价-2日前的收盘价和0的较大值的7日[1日权重]移动平均/收盘价-2日前的收盘价的绝对值的7日[1日权重]移动平均*100A赋值:如果收盘价的5日简单移动平均>1日前的收盘价的5日简单移动平均,返回收盘价+最高价-开盘价,否则返回如果收盘价的5日简单移动平均<1日前的收盘价的5日简单移动平均,返回收盘价+最低价-开盘价,否则返回收盘价RSV赋值:(A-34日内最低价的最低值)/(34日内最高价的最高值-34日内最低价的最低值)*100的3日指数移动平均输出做多:(RSV的21日指数移动平均)输出趋势:(做多的5日指数移动平均)OK赋值:VAR5的13日[8日权重]移动平均的向上舍入输出看底:如果(OK-VAR6<(-65)),返回20,否则返回20输出顶峰:如果(OK-VAR6>85),返回80,否则返回80输出分:50程序源码VAR1:=(EMA(C,34)-EMA(C,21))*100;VAR2:=EMA(VAR1,7);VAR3:=((HHV(H,21)-C)/(HHV(H,21)-LLV(L,21)))*100-10;VAR4:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;VAR5:=SMA(VAR4,13,8); VAR6:=SMA(VAR3,21,8);VAR7:=MA(C,80)-MA(C,10)/7; VAR8:=EMA(C,5);VAR9:=MA((LLV(C,9))*1.1,14);VAR10:=2*VAR9-VAR8-C*0.1;VAR11:=IF(((VAR8-VAR10)*5>0),(POW((VAR8-VAR10)*5,2))/10,(-1*(POW((VAR8-VAR10)*(5),2)))/(10));VAR12:=IF((VAR11>0),VAR11-0,12); VAR13:=SMA(MAX(C-REF(C,2),0),7,1)/SMA(ABS(C-REF(C,2)),7,1)*100;A:=IF(MA(C,5)>REF(MA(C,5),1),C+H-O,IF(MA(C,5)<REF(MA(C,5),1),C+L-O,C));RSV:=EMA((A-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100,3);做多:(EMA(RSV,21));趋势:(EMA(做多 ,5));OK:=CEILING(SMA(VAR5,13,8));看底:IF((OK-VAR6<(-65)),20,20);顶峰:IF((OK-VAR6>85),80,80);分:50;。

通达信指标公式源码 主力趋势 中线主图

通达信指标公式源码 主力趋势 中线主图

{开始---主力趋势指标}MTM:=C-REF(C,1);主力做多:=100*EMA(EMA(MTM,9),9)/EMA(EMA(ABS(MTM),9),9),COLORWHITE; 多空趋势线:=MA(主力做多,5),COLORYELLOW;能量:=(主力做多-0)*1,COLORBLACK;持仓:=能量, COLORSTICK;{结束}VAR1:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) -LLV(LOW,14))));VAR2:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) -LLV(LOW,14))));VAR3:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));DIR1:=ABS(CLOSE-REF(CLOSE,5));VIR1:=SUM(ABS(CLOSE-REF(CLOSE,1)),5);ER1:=DIR1/VIR1;CS1:=ER1*(0.8-2/8)+2/8;CQ1:=CS1*CS1;基线:EMA(DMA(CLOSE,CQ1),2) ,COLORWHITE;DIR2:=ABS(CLOSE-REF(CLOSE,10));VIR2:=SUM(ABS(CLOSE-REF(CLOSE,1)),10);ER2:=DIR2/VIR2;CS2:=ER2*(0.8-2/24)+2/24;CQ2:=CS2*CS2;观望:EMA(DMA(CLOSE,CQ2),2),COLORGREEN,LINETHICK2;高抛低吸:IF(观望/REF(观望,1)>0.997,观望,DRAWNULL),COLORYELLOW,LINETHICK2;持股:IF(观望/REF(观望,1)>1.001,观望,DRAWNULL),COLORRED,LINETHICK2; STICKLINE((VAR2 < MA(VAR3,6)) AND 主力做多>0,CLOSE,OPEN,3,1),COLOR008000;STICKLINE((VAR2 > MA(VAR3,6)) AND 主力做多>0,OPEN,CLOSE,3,1),COLORRED;STICKLINE(((OPEN > CLOSE) AND (VAR2 > MA(VAR3,6)) AND 主力做多>0),(OPEN * 0.998),(CLOSE * 1.0001),2.3,0),COLOR008000; STICKLINE(((OPEN < CLOSE) AND (VAR2 < MA(VAR3,6)) AND 主力做多>0),(CLOSE * 0.998),(OPEN * 1.002),2.3,0),COLORRED;STICKLINE(((OPEN > CLOSE) AND (VAR2 < MA(VAR3,6)) AND 主力做多>0),CLOSE,OPEN,2.3,0),COLORCYAN;{主图赋值结束}PT:=REF(H,1)-REF(L,1);CDP:=(REF(H,1)+REF(L,1)+REF(C,1)*2)/4;AH:=CDP+PT;AL:=CDP-PT;NH:=CDP*2-REF(L,1);NL:=CDP*2-REF(H,1);强:=IF(AH>REF(C,1)*1.1 ,REF(C,1)*1.1,AH),COLORMAGENTA;阻:=IF(NH>强,(强-CDP)*0.618+CDP ,NH),COLORCYAN;M:=IF(AL<REF(C,1)/1.1,REF(C,1)/1.1,AL);撑:=IF(NL<M,CDP-(CDP-M)*0.618 ,NL),COLORRED;底:=IF(AL<REF(C,1)/1.1,REF(C,1)/1.1 ,AL),COLORGREEN;{开始---主散分布图指标}机构持仓:=EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3),COLO RFF00FF;指数趋势:=EMA(1250*(INDEXC-LLV(INDEXL,34))/HHV(INDEXH,34)-LLV(INDEXL,34) ,3),COLORYELLOW,NODRAW;主力:=WINNER(C)*100,COLORRED;散户:= (WINNER(C*1.1)-WINNER(C*0.9))*100,COLORGREEN;强势:=(机构持仓+主力+散户)/2,COLORFF6699;强弱分界:=80,COLOR00FFFF;{结束}{开始----资金动向指标}PJJ:=DMA((H + L + C * 2) / 4,0.9);JJ:=REF(EMA(PJJ,3),1);QJJ:=VOL / ((H - L) * 2 - ABS(C - O));XVL:=IF(C > O,QJJ * (H - L),IF(C < O,QJJ * (H - O + (C - L)),VOL / 2)) +IF(C > O,0 - QJJ * (H - C + (O - L)),IF(C < O,0 - QJJ * (H - L),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);流量:=LLJX,COLORC875B7,NODRAW;流量基线:=GJJ,COLOR00BBBB;ZJLL:=REF(LLJX,1);QZJJ:=(((LLJX - ZJLL) / ZJLL) * 100);流量幅%:=IF(((LLJX > 0) AND (ZJLL < 0)),ABS(QZJJ),IF((((LLJX < 0) AND (ZJLL < 0)) AND (LLJX < ZJLL)),(0 - QZJJ),QZJJ))COLORWHITE,NODRAW;大单:=HSL / 1000,COLOR9B37FF,NODRAW;周流量:=SUM(LLJX,5),COLORFFBFDF,NODRAW;BB:=REF(周流量,1);ZQZJJ:=(周流量-BB)/BB*100;周幅%:=IF(周流量>0 AND BB<0,ABS(ZQZJJ),IF(周流量<0 AND BB<0 AND 周流量<BB,-ZQZJJ,ZQZJJ))COLORWHITE,NODRAW;{结束}{反转}VARZ1:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-RE F(CLOSE,1))),25);VARZ2:=HIGH-REF(HIGH,1);VARZ3:=REF(LOW,1)-LOW;VARZ4:=SUM(IF(VARZ2>0 AND VARZ2>VARZ3,VARZ2,0),25);VARZ5:=SUM(IF(VARZ3>0 AND VARZ3>VARZ2,VARZ3,0),25);VARZ6:=VARZ4*100/VARZ1;VARZ7:=VARZ5*100/VARZ1;VARZ8:=MA(ABS(VARZ7-VARZ6)/(VARZ7+VARZ6)*100,15);VARZ9:=(VARZ8+REF(VARZ8,15))/2;A:=(VARZ7>VARZ6 AND VARZ7>25 AND VARZ6<25);B:=ZIG(3,50/5)*100,COLORWHITE;G:=MA(B,2),COLORYELLOW;D:=CROSS(B,G)*1000,COLORRED;W:=CROSS(G,B)*1000,COLORBLUE;E:=REF(INDEXC,1);F:=SMA(MAX(INDEXC-E,0),3,1)/SMA(ABS(INDEXC-E),3,1);VARZ10:=F AND F<8;VARZ11:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;VARZ12:=SMA(VARZ11,3,1);VARZ13:=SMA(VARZ12,3,1);VARZ14:=VARZ13 AND VARZ13<20;MM:=A AND D AND VARZ10 AND VARZ14 ;XXX:=DRAWTEXT(W=1000,B*1.05,'卖' ),COLOR00FF00;XXY:=DRAWTEXT(D=1000,B*1.05,'买'),COLORRED;底1:=STICKLINE(D=1000 AND B*1.05,0,20,2,0),COLORRED;顶1:=STICKLINE(W=1000 AND B*1.05,0,20,2,0),COLORGREEN;{反转}日线:=(MA(CLOSE,3)+MA(CLOSE,5)+MA(CLOSE,10)+MA(CLOSE,20))/4;平均线:=MA(日线,2);{DRAWICON(CROSS(日线,平均线),平均线,1);DRAWICON(CROSS(平均线,日线),平均线,2);}{综合选股输出}顶部:=DRAWTEXT( 顶1 ,(HIGH+(HIGH*0.10)),'顶')COLORGREEN;底部:=DRAWTEXT( 底1 ,(LOW - (LOW*0.10)),'底')COLORRED;VAR11:=(2*CLOSE+HIGH+LOW)/4;VAR22:=EXPMA(EXPMA(EXPMA(VAR11,5),5),5);J:= (VAR22-REF(VAR22,1))/REF(VAR22,1)*100, COLORSTICK;多空:= MA(J,3);多头:= MA(J,1);{STICKLINE( UPNDAY(J,1)AND J>0,J ,0,1,0)COLORRED;STICKLINE( UPNDAY(J,1)AND J>0,J ,0,0.8,0)COLORLIRED;}买进:DRAWICON(CROSS(主力做多,0) ,(LOW - (LOW*0.06)),3);卖出:DRAWICON(CROSS(0,主力做多),(HIGH+ (HIGH*0.06)),4);风险:DRAWICON( DOWNNDAY(机构持仓,1) AND (CROSS(多空趋势线,主力做多) AND 主力做多>0) OR( 顶1 AND 主力做多>0),(HIGH+ (HIGH*0.06)),6);。

操盘通达信指标公式源码

操盘通达信指标公式源码

操盘通达信指标公式源码1.移动平均线(MA)MA表示一段时间内数据的平均值,是一种常用的趋势指标。

```python'''计算移动平均线'''def MA(data, n):ma = []for i in range(len(data)):if i < n - 1:ma.append(None)else:ma.append(sum(data[i - n + 1:i + 1]) / n)return ma```2.相对强弱指标(RSI)RSI指标表示一段时间内上涨和下跌的相对强度,用于判断市场的超买和超卖情况。

```python'''计算相对强弱指标RSI'''def RSI(data, n):rsi = []for i in range(len(data)):if i < n - 1:rsi.append(None)else:diff = [(data[j + 1] - data[j]) for j in range(i - n + 1, i)] up = sum([x for x in diff if x > 0])down = abs(sum([x for x in diff if x < 0]))rsi.append(100 * up / (up + down))return rsi```3.平均真实波幅指标(ATR)ATR指标表示一段时间内价格的波幅,用于衡量市场的波动性。

```python'''计算平均真实波幅指标ATR'''def ATR(data, n):atr = []for i in range(len(data)):if i < n - 1:atr.append(None)else:tr = [max(data[j+1] - data[j], abs(data[j+1] - data[j]), abs(data[j+1] - data[j])) for j in range(i - n + 1, i)] atr.append(sum(tr) / n)return atr```4.相对强弱指标(ROC)ROC指标表示一段时间内价格的变动百分比,用于判断市场的涨势和跌势。

通达信指标公式源码最牛的抄底追涨公式无未来

通达信指标公式源码最牛的抄底追涨公式无未来

通达信指标公式源码最牛的抄底追涨公式无未来抄底追涨实战公式DEFDRAWICON(T1,T2,SHORT):REF(L,T1)>REF(LLV(L,T2),T1)ANDREF(L,T1)<REF(HHV(H,T2),T1)ANDC<REF(O,T1)ANDC>REF(C,T1)ANDC=HHV(H,T1)ANDC<REF(HHV(H,T2),T1)ANDSHORT>REF(MA(C,SHORT),T1)?1:01,DEFDRAWICON(T1,T2,SHORT)定义函数使用3个参数,T1,T2,SHORT。

2,REF(L,T1),取最近T1日内的最低价;3,REF(LLV(L,T2),T1),取最近T1日内,T2日内的最低价的最低价;4,REF(L,T1)>REF(LLV(L,T2),T1),判断最近T1日内的最低价是否大于最近T1日内,T2日内的最低价的最低价;5,REF(L,T1)<REF(HHV(H,T2),T1),判断最近T1日内的最低价是否小于最近T1日内,T2日内的最高价的最高价;6,C<REF(O,T1),判断当日收盘价是否小于最近T1日开盘价;7,C>REF(C,T1),判断当日收盘价是否大于最近T1日收盘价;8,C=HHV(H,T1),判断当日收盘价是否等于最近T1日内的最高价;9,C<REF(HHV(H,T2),T1),判断当日收盘价是否小于最近T1日内,T2日内的最高价的最高价;10,SHORT>REF(MA(C,SHORT),T1),判断当日SHORT均线是否大于最近T1日内当日SHORT均线;11,?1:0,符合上述条件就返回1,否则返回0。

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

A:=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);
ZDZK1:=EMA(A,6);
ZDZK2:=REF(ZDZK1,1);
超短线: ((A-LLV(A,21))/(HHV(A,21)-LLV(A,21))*(4))*(25),COLORWHITE,LINETHICK1;
趋势线:IF(ZDZK1>=ZDZK2,ZDZK1+10,ZDZK2),COLORRED;
调和线:IF(ZDZK2-ZDZK1,ZDZK2,ZDZK1),COLORGREEN;
月量价:=SUM((CLOSE-OPEN)/(HIGH-LOW)*VOL,20)/10000;
周均量:=EMA(月量价,5);
趋势买点:(趋势线>调和线AND REF(趋势线,1)=REF(调和线,1) AND (趋势线<(MA(REF(HHV(趋势线,30),1),2)+MA(REF(LLV(趋势线,30),1),2))/2) AND 月量价>周均量AND (ZIG(3,12)>MA(ZIG(3,12),2)))*20,STICK,COLORRED;
DRAWICON(趋势买点>0,趋势买点,1);
STICKLINE(REF(趋势线,1)<趋势线,趋势线,REF(趋势线,1),8,1),COLORF00FF0; STICKLINE((趋势线>调和线AND REF(趋势线,1)=REF(调和线,1)),趋势线,REF(趋势线,1),2,1),COLORRED;
STICKLINE(趋势线<REF(趋势线,1) OR (AMOUNT/REF(AMOUNT,1)<0.97),趋势线,REF(趋势线,1),8,0),COLORWHITE;
STICKLINE(REF(调和线,1)>调和线,调和线,REF(调和线,1),8,1),COLOR00FF00;
离场:(趋势线=调和线AND REF(趋势线,1)>REF(调和线,1) AND 调和线>50 AND (MA(ZIG(3,12),2)> ZIG(3,12))),STICK;
出5:STICKLINE(离场,100,80,2,0),STICK,COLORGREEN,LINETHICK2;
顶:90,COLOR9DFFFF;
强弱:50,COLORGRAY;
底:10,COLORGRAY;。

相关文档
最新文档