中短趋势主图指标 源码 通达信
通达信指标公式源码 买卖监控 主图源码 无未来
MA5:MA(CLOSE,5);短趋势:MA(CLOSE,13),COLORRED,LINETHICK2;MA20:MA(CLOSE,20);MA30:MA(CLOSE,30);MA60:MA(CLOSE,60);MA120:MA(CLOSE,120);MA250:MA(CLOSE,250);AA10:=MA(CLOSE,8);AA12:=MA(CLOSE,12);BB10:=((ATAN((AA10 - REF(AA10,1))) * 3.1416) * 10);VAR01:=((((OPEN + LOW) + HIGH) + CLOSE) / 4);中期大底:=LLV(LOW,30),COLORCDFFBB;短底:=EMA(VAR01,5);支撑:=HHV(短底,60);压力1:=HHV(LOW,20),COLORFAABEC;中线:=MA(CLOSE,3);天:=(MA(LOW,15) * 0.985);人:=(MA(LOW,15) * 0.96);地:=(((HIGH + LOW) + CLOSE) / 3);B1:=HHV(地,(4 * 15));B6:=LLV(地,(4 * 15));B7:=(B1 - B6);B8:=(MA(((地- B6) / B7),2) * 80);VAR1:=(((CLOSE - LLV(LOW,100)) / (HHV(HIGH,100) - LLV(LOW,100))) * 200); 飞龙顶底线1:=SMA(VAR1,3,1);VAR2:=SMA(飞龙顶底线1,3,1);VAR3:=((3 * 飞龙顶底线1) - (2 * VAR2));VAR4:=LLV(LOW,5);VAR5:=HHV(HIGH,5);VAR6:=(EMA((((CLOSE - VAR4) / (VAR5 - VAR4)) * 100),4) * 2);VAR7:=EMA(((0.667 * REF(VAR6,1)) + (0.333 * VAR6)),2);VAR8:=((3 * VAR6) - (2 * VAR7));VAR9:=(POW(MA(CLOSE,5),2) + MA(CLOSE,5));VARA:=(POW(MA(LOW,5),2) + MA(LOW,5));VARB:=(POW(MA(HIGH,5),2) + MA(HIGH,5));VARC:=(((((VAR9 - LLV(VARA,64)) / (HHV(VARB,64) - LLV(VARA,64))) * 150) + 65) - 10); VARD:=((SMA(VARC,3,1) * 1.5) - 100);VARE:=SMA(VARD,3,1);VARF:=((3 * VARD) - (2 * VARE));VAR10:=(((HIGH + LOW) + (CLOSE * 2)) / 4);VAR11:=EMA(VAR10,13);VAR12:=STD(VAR10,13);VAR13:=(((VAR10 - VAR11) * 100) / VAR12);VAR14:=EMA(VAR13,5);VAR15:=EMA(VAR14,13);VAR16:=((EMA(VAR14,13) + 200) - 100);VAR17:=EMA(VAR16,10);VAR18:=((3 * VAR16) - (2 * VAR17));VAR19:=(((飞龙顶底线1 + VAR6) + VARD) + VAR16);VAR1A:=(((VAR2 + VAR7) + VARE) + VAR17);VAR1B:=(((VAR3 + VAR8) + VARF) + VAR18);VAR1C:=(((HIGH + LOW) + CLOSE) / 3);VAR1D:=((AMOUNT / VOL) / 100);VAR1E:=((SUM(AMOUNT,5) / SUM(VOL,5)) / 100);VAR1F:=((VAR1C - MA(VAR1C,34)) / (0.015 * AVEDEV(VAR1C,34)));VAR21:=((((HIGH + LOW) + CLOSE) + VAR1C) / 4);VAR22:=EMA(VAR21,24);VAR23:=STD(VAR21,24);VAR24:=(((VAR21 - VAR22) / VAR23) * 100);VAR25:=((VAR1C - MA(VAR1C,24)) / (0.015 * AVEDEV(VAR1C,24)));VAR26:=EMA(VAR24,5);VAR27:=((VAR1D - MA(VAR1D,21)) / (0.015 * AVEDEV(VAR1D,21)));VAR28:=((VAR1E - MA(VAR1E,90)) / (0.015 * AVEDEV(VAR1E,90)));VAR29:=(((((((VAR28 + VAR27) + VAR26) + VAR25) + VAR1F) / 5) + 165) / 4);VAR2A:=(((((VAR19 + VAR1A) + (VAR1B * 30)) / 32) / 5) - 15);VAR2B:=(((VAR29 + VAR2A) / 2) / 1.1);VAR2C:=VAR2B;短线:=MA(VAR2C,26);UPPER:=(短线- (2 * STD(VAR2C,26)));XY:=MA(CLOSE,5);M80:=MA(CLOSE,80);短期底部:=(LLV(HIGH,30) * 0.93),COLOR0000FF;MA80:=LLV(HIGH,30);短期底部2:=SMA(CLOSE,2,1);趋势:=(MA(LOW,10) * 0.96);MAN:=(SMA(HIGH,21,2) * 1.05);上1:=(HHV(短底,60) * 0.92);下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100);RSV:=SMA(下档线,3,1);K:=SMA(RSV,3,1);D:=((3 * RSV) - (2 * K));J:=(((CLOSE - MA(CLOSE,6)) / MA(CLOSE,6)) * 100);VAR2P:=(((CLOSE - MA(CLOSE,12)) / MA(CLOSE,12)) * 100);VAR3P:=(((CLOSE - MA(CLOSE,24)) / MA(CLOSE,24)) * 100);VAR4P:=(((J + (2 * VAR2P)) + (3 * VAR3P)) / 6);VAR5P:=MA(VAR4P,3);VAR6P:=(((CLOSE - LLV(LOW,34)) / (HHV(HIGH,34) - LLV(LOW,34))) * 100);RSV12:=SMA(VAR6P,3,1);K12:=SMA(RSV12,3,1);D12:=((3 * RSV12) - (2 * K12));J12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);RSV24:=SMA(J12,3,1);K24:=SMA(RSV24,3,1);D24:=((3 * RSV24) - (2 * K24));J24:=IF(CROSS(D,D24),LOW,REF(LOW,BARSLAST(CROSS(D,D24))));压力位:=IF(CROSS(D24,D),HIGH,REF(HIGH,BARSLAST(CROSS(D24,D)))),COLORFFFFFF; U2L:=IF((CLOSE >= MA(CLOSE,20)),50,20);RH5:=IF(((D > U2L) AND (REF(D,1) <= U2L)),LLV(REF(LOW,1),(BARSLAST(((D <= U2L) AND (REF(D,1) > U2L))) - 1)),REF(LLV(REF(LOW,1),(BARSLAST(((D <= U2L) AND (REF(D,1) > U2L))) - 1)),BARSLAST(((D > U2L) AND REF(D,1)))));RL1:=IF((LOW < RH5),HIGH,REF(HIGH,BARSLAST((LOW < RH5))));RL4:=IF((LOW < RH5),D,REF(D,BARSLAST((LOW < RH5))));RL42:=IF((((LOW < RL1) AND (D > RL4)) AND (D > D24)),LOW,REF(LOW,BARSLAST((((LOW < RL1) AND (D > RL4)) AND (D > D24)))));长期底部:=LLV(HIGH,30),COLORFF0000;DRAWTEXT(FILTER(((((RL42 = J24) AND (CLOSE > OPEN)) AND (CLOSE > 长期底部)) AND (LOW <= J24)),20),(LOW - 0.12),'底成'),COLOR0EABFF;上:=(SMA(LOW,5,2) * 0.96);中:=(((((3 * CLOSE) + HIGH) + LOW) + OPEN) / 6);X1:=EMA(中,10);X2:=REF(X1,1);X3:=((REF(HIGH,1) + REF(LOW,1)) / 2);X4:=(MA(CLOSE,21) + (2 * STD(CLOSE,21)));X5:=REF(CLOSE,1);X6:=((SMA(MAX((CLOSE - X5),0),7,1) / SMA(ABS((CLOSE - X5)),7,1)) * 100);X7:=CROSS(79,X6);X8:=FILTER(X7,4);X9:=MA(CLOSE,115);VAR001:=EMA(CLOSE,8);飞龙顶底线:=EMA(VAR001,20);VAR002:=CROSS(VAR001,飞龙顶底线);VAR003:=(VAR001 < MA(CLOSE,20));VAR004:=(((HHV(HIGH,36) - CLOSE) / (HHV(HIGH,36) - LLV(LOW,36))) * 100);VAR005:=SMA(VAR004,5,1);VAR006:=SMA(VAR005,8,1);VAR007:=(CROSS(VAR005,VAR006) AND (VAR006 < 5));VAR008:=((CLOSE > (LLV(CLOSE,60) + (0.3 * LLV(CLOSE,60)))) AND VAR007);VAR009:=IF((CLOSE > 1000),VAR007,VAR008);VAR00F:=CROSS(X1,X2);MA115:=VAR00F;低买:=(VAR002 AND VAR003);黑码起步:=VAR009;DRAWTEXT((黑码起步> 0),(HIGH * 1.04),'逃命'),COLORFF0000;逃遁:=(SMA(HIGH,21,2) * 1.05);阻挡:=(SMA(LOW,21,2) * 0.94);DRAWTEXT((((((低买> 0) AND ((X1 - REF(X1,1)) > 0)) AND (HIGH < 压力位)) AND (HIGH < X9)) AND ((X2 - REF(X2,1)) > 0)),LOW,'黑码'),COLORRED;DRAWTEXT((((((CROSS(VAR2C,短线) AND ((CLOSE - REF(HIGH,1)) > 0)) AND ((中线- REF(中线,1)) > 0)) AND (HIGH <= 压力1)) AND (CLOSE < MA20)) AND (LOW <= 中线)),(LOW - 0.06),'关注'),COLOR00FF00;DRAWTEXT((((CROSS(VAR2C,UPPER) AND (HIGH < 压力1)) AND ((XY - REF(XY,1)) > 0)) AND (HIGH < 支撑)),LOW,'买'),COLORFFFFFF;DRAWTEXT(FILTER(((((((LOW <= 天) AND (CLOSE >= MA20)) AND (HIGH < 压力1)) AND ((天- REF(天,1)) > 0)) AND (CLOSE < 压力1)) AND ((MA20 - REF(MA20,1)) > 0)),6),(LOW - 0.12),'全仓'),COLOR00FFFF;DRAWTEXT(FILTER((((((MA115 AND (CLOSE < 压力位)) AND ((人- REF(人,1)) > 0)) AND ((X1 - REF(X1,1)) > 0)) AND (HIGH < 上1)) AND ((CLOSE / OPEN) > 1.03)),5),LOW,'●买'),COLOR93EE7D;DRAWTEXT(((((LOW <= 上) AND (HIGH >= 短期底部)) AND (CLOSE >= 长期底部)) AND ((CLOSE / OPEN) > 1.03)),(LOW - 0.08),'★抄底'),COLOR0000FF;DRAWTEXT(FILTER((((((B8 <= 1) AND (LOW <= 阻挡)) AND (CLOSE > OPEN)) AND (LOW <= 中期大底)) AND (CLOSE >= 长期底部)),3),(LOW - 0.08),'短抄'),COLORA100FF;DRAWTEXT((((CROSS(D,0) AND (HIGH < 压力位)) AND (VAR5P <= (0 - 7))) AND (CLOSE < XY)),(LOW - 0.11),'半仓'),COLORFFFF00;DRAWTEXT(FILTER((((CROSS(趋势,趋) AND (HIGH < M80)) AND (HIGH < 压力1)) AND LLV(LOW,0)),10),LOW,'果断买'),COLOR668800;DRAWTEXT(FILTER(((CROSS(中线,人) AND (LOW <= 人)) AND (CLOSE >= 人)),4),(LOW - 0.06),'买'),COLOR00FF00;DRAWTEXT(((CROSS(阻挡,长期底部) AND (BB10 > 1)) AND (HIGH < 支撑)),LOW,'出击'),COLORRED;DRAWTEXT(FILTER((((((((MA20 - REF(MA20,1)) > 0) AND (HIGH < 支撑)) AND ((AA10 - REF(AA10,1)) > 0)) AND (HIGH < 压力1)) AND (VOL >= REF(VOL,1))) AND CROSS(CLOSE,MA20)),57),LOW,'突破生命线'),COLOR0000FF;DRAWTEXT(FILTER(((((LOW <= MA80) AND (CLOSE > MA80)) AND (CLOSE > OPEN)) AND (短期底部2 <= MA80)),8),LOW,'底'),COLORFFFF00;DRAWTEXT(((CROSS(MA20,压力位) AND (LOW <= MA20)) AND ((MA20 - REF(MA20,1)) > 0.02)),(LOW - 0.03),'●绝佳买点'),COLORAFA0AF;DRAWTEXT((((((((CROSS(CLOSE,MA20) AND (HIGH < 压力位)) AND (OPEN < MA20)) AND (HIGH < 支撑)) AND ((MAN - REF(MAN,1)) > 0)) AND ((X1 - REF(X1,1)) > 0)) AND (D < 63)) AND ((MA20 - REF(MA20,1)) > 0)),(LOW - 0.05),'●大牛浮水'),COLORBLUE; DRAWTEXT(CROSS(MA(CLOSE,13),C) AND INDEXC>MA(INDEXC,13) AND MA(CLOSE,13)>REF(MA(CLOSE,13) ,1) AND V<REF(V,1) AND MA(CLOSE,13)>MA(CLOSE,55) ,L*0.9,'买'),COLORRED,LINETHICK2;VAR011:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOS E,24)*100+(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100)/3;VAR012:=HHV(VAR011>20,10);DRAWTEXT(FILTER(VAR011<-9 AND VAR011>REF(VAR011,1),18),L*0.9,'反弹'),COLORRED,LINETHICK2;DRAWTEXT(VAR011<-20 AND INDEXC<MA(INDEXC,13) AND FILTER(VAR011> REF(VAR011,1),5),L*0.93,'抄底'),COLORYELLOW,LINETHICK2;DRAWTEXT(VAR012 AND CROSS((REF(HIGH,1)+REF(LOW,1))/2,MA(CLOSE,20)+2*STD(CLOSE,20)),H*1.1,'危险'),COLORYELLOW;B36:=MA(CLOSE,3) - MA(CLOSE,6);B612:=MA(CLOSE,6) - MA(CLOSE,12);W:=((B36)/(CLOSE))*(10);J1:=((B612)/(CLOSE))*(10);DRAWTEXT((W < (-0.2)) AND (J1 < (-0.2)) AND CROSS(W,J1),(LOW)*0.93,'庄影'),COLORBROWN;EMA13:=EMA(C,13);EMA34:=EMA(C,34);EMA55:=EMA(C,55);EMA120:=EMA(C,120);AR1:=EMA55>EMA34 AND EMA34>EMA13;AR2:=BARSLAST((C-EMA13)/EMA13*100<-6);AR3:=EMA13>=REF(EMA13,2);AR4:=COUNT(CROSS(C,EMA13),AR2)=1;AR5:=AR1 AND AR2 AND AR3 AND AR4;AR6:=AR5 AND FILTER(AR5,10);A1AA:=9;A2AA:=(REF(CLOSE,A1AA+1)<CLOSE);DRAWTEXT(FILTER((A2AA>-0.5),84),(HIGH)*(1.04),'清仓'),COLORGREEN;LOCK:=1;M8:=EMA(CLOSE,8);VARP21:=EMA(短趋势,62);VARP22:=(CLOSE+HIGH+LOW)/3;VARP23:=EMA(VARP22,10)*LOCK;VARP24:=REF(VAR23,1)*LOCK;DRAWTEXT(AR6,L-0.25,'杏'),COLOR00CCFF;量价背离:=VAR15*40,STICK,COLORF5CCEB,LINETHICK2;DRAWTEXT(量价背离,HIGH * 1.02,'离'),COLORYELLOW;VAR60:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*S MA(SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);VAR61:=VARF<REF(VAR60,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);大资金:=(VAR61 AND COUNT(VAR61,30)=1);DRAWTEXT(大资金,LOW*0.85,'▲大资金');{做空}RSV11:=(C - LLV(LOW,27))/(HHV(HIGH,3) - LLV(LOW,27)) * 100;F := SMA(RSV11, 3, 1);K11 := SMA(F,3, 1);D11 := SMA(K11,3, 1);WAV:=3*K11-2*D11;A41:=IF(1,C,IF(C<REF(O,1) AND L<REF(L,1),L,C));A42:=IF(C<REF(L,1),L,A41);A43:=IF(H<REF(O,1),L,A42);A44:=IF(O<=REF(C,1) AND C<REF(O,1),L,A43);A:=IF(C<O AND O<REF(O,1) AND L<REF(L,1),L,A44);AJ1:=ATAN((A/REF(A,1)-1)*100)*180/3.1416;LJIAO:=ATAN((VOL/REF(VOL,1)-1)*100)*180/3.1416;DSLJ:=LJIAO>0 AND ABS(LJIAO-AJ1)<30;JIA5:=WAV-REF(WAV,4)>50;DSALE:=DSLJ AND (JIA5 OR WAV>90);涨幅:=(C-LLV(C,10))/LLV(C,10)*100;DING2:=涨幅>20;DING:=DSALE OR DING2;QSA:=(MA(C,60)-REF(MA(C,60),10))/REF(MA(C,60),10)*100;QS:=SMA(QSA,10,1);DS:=QS<-3 OR MA(C,60)<REF(MA(C,60),1);QC:=DS AND DING AND DING!=REF(DING,1);DRAWTEXT(QC,H*1.08,'◇做空'),COLORRED;{抢钱买入}RSV1:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;K1:=SMA(RSV1,3,1);D1:=SMA(K1,3,1);J11:=3*K1-2*D1;X:=LLV(J11,2)=LLV(J11,8);VARR1:=LLV(LOW,10);VARR2:=HHV(HIGH,25);VARR3:=100*EMA((CLOSE-VARR1)/(VARR2-VARR1),4);DRAWTEXT(CROSS(J11,REF(J11+0.01,1)) AND X AND J11<20,LOW*0.95,'抢钱'),COLORRED;{加仓}MA10:=MA(CLOSE,10);五日乖离率:=(C-MA5)/MA5*100;BB05:=ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416;速度5:=SMA(EMA((MA5-REF(MA5,1))/REF(MA5,1),3)*100,3,1);加速度5:=EMA((速度5-REF(速度5,1)),3),NODRAW;SSR:=(C-MA30)/MA30*100,NODRAW;加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 AND MA5>REF(MA5,1) AND SSR>REF(SSR,1) AND MA10>REF(MA10,1) AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1) ,10) ;DRAWTEXT(加仓,LOW*0.98,'◆加仓'),COLORYELLOW;{时间窗,变盘}AA:=BARSCOUNT(C);AH:=HHV(H,200);AL:=LLV(L,200);A0:=(AH-AL)/40;B11:=L-A0;STICKLINE((AA+0)/34=FLOOR((AA+0)/34),B11,B11-1.5*A0,2,0),COLORF00FF0; DRAWTEXT((AA+0)/34=FLOOR((AA+0)/34),B11-1*A0,'时间窗,变盘'),COLORF00FF0; {出货}LC:=REF(CLOSE,1);RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100); DRAWTEXT(CROSS(88,RSI),(HIGH * 1.04),'●离开'),COLORRED;VARE1:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;VAR121:=(HIGH+LOW+CLOSE)/3;VAR131:=(VAR121-MA(VAR121,14))/(0.015*AVEDEV(VAR121,14));VAR141:=(VAR121-MA(VAR121,70))/(0.015*AVEDEV(VAR121,70));VAR171:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;VAR181:=100-ABS(VAR171);VAR191:=IF(VAR181<90,VAR181,100);VAR1A1:=IF(VARE1>0,VARE1,0);VAR1B1:=IF(VAR141>=200 AND VAR131>=150,15,IF(VAR141<=-200 AND VAR131<=-150,-15,VAR16))+60;VAR1C1:=VAR1A1>48 AND VAR1B1>60 AND VAR191<100;DRAWTEXT(VAR1C1 AND COUNT(VAR1C1,30)=1,HIGH*1.02,'大笔出货'),LINETHICK1,COLORFFCC66;XXS:=MA(HIGH,5)*(1+5/100);DRAWTEXT_FIX(1,0.14,0,0,'所属地区:')COLOR00FFFF;DRAWTEXT_FIX(1,0.21,0,0,DYBLOCK)COLOR00FFFF;DRAWTEXT_FIX(1,0.00,0.06,0,'主题投资:')COLOR0000FF;DRAWTEXT_FIX(1,0.07,0.06,0,EXTERNSTR(0,1))COLOR0000FF; DRAWTEXT_FIX(1,0.00,0.10,0,'主营业务:')COLORFF00FF; DRAWTEXT_FIX(1,0.07,0.10,0,EXTERNSTR(0,2))COLORFF00FF; DRAWTEXT_FIX(1,0.00,0.14,0,'出千概念:')COLORFF88FF; DRAWTEXT_FIX(1,0.07,0.14,0,EXTERNSTR(0,3))COLORFF88FF; DRAWTEXT_FIX(1,0.00,0.18,0,'愚民主题概念:'),COLOR00FFFF; DRAWTEXT_FIX(1,0.09,0.18,0,EXTERNSTR(0,4)),COLOR00FFFF;。
【炒股必看】通达信指标王之短中决策主图指标公式
通达信指标王之短中决策主图指标公式回归斜率线A:=EMA(SLOPE(C,21)*20+C,42);经典RL:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;经典K:=SMA(经典RL,3,1); 经典D:=SMA(经典K,3,1); 经典J:=3*经典K-2*经典D; MAHL1:=100*((EMA((H+L)/2,3)-LLV(EMA((H+L)/2,5),30)-(EMA(H,20)-EMA(L,20)))/(LLV(EMA((H+L)/2,5),30)-(EMA(H,20)-EMA(L,20))));MAHL2:=IF(EMA(C,2)>回归斜率线 A AND MAHL1>0,EMA(C,3),LLV(EMA((H+L)/2,5),30));{A}MAHL3:=IF(EMA(C,2)>回归斜率线 A AND MAHL1>0,LLV(EMA((H+L)/2,5),30),EMA(C,5));{A}MAHL4:DRAWBAND(MAHL2,RGB(105,32,32),MAHL3,RGB(0,154,154));MAHL5:DRAWBAND(EMA(C,2),RGB(135,32,32),EMA(C,5),RGB(0,154,154));MAHL6:DRAWBAND(EMA(C,2),RGB(135,32,32),EMA(C,9),RGB(0,154,154));回归斜率带:DRAWBAND(回归斜率线A,RGB(235,0,230),REF(回归斜率线A,2),RGB(0,104,154));{C>昨C红K柱+C>O红K柱C>昨C红K柱C=昨C是跟白色24线C<昨C蓝K柱+C>O红K柱C<昨C蓝K柱}STICKLINE(CLOSE> REF(CLOSE,1) ,HIGH,LOW,0,0 ),COLORRED;STICKLINE(C<O AND C>REF(C,1),C,O,3,0),COLORFFCC00;STICKLINE(CLOSE> REF(CLOSE,1) AND C>O ,OPEN,CLOSE,3,0 ),COLOR000055;{红K};STICKLINE(CLOSE> REF(CLOSE,1) AND C>O ,OPEN,CLOSE,2.7,0 ),COLOR000077;{红K};STICKLINE(CLOSE> REF(CLOSE,1) AND C>O ,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) ,H,L,3,1 ),COLOR999999;STICKLINE(CLOSE= REF(CLOSE,1) ,HIGH,LOW,0,0 ),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(C<REF(C,1) AND C>O,C,O,3,0),COLORFFCC00;STICKLINE(C<REF(C,1) AND C<O ,OPEN,CLOSE,3,0 ),COLOR990000;STICKLINE(C<REF(C,1) AND C<O ,OPEN,CLOSE,2.7,0 ),COLORCC0000; STICKLINE(CLOSE< REF(C,1) ,OPEN,CLOSE,2.1,0 ),COLORFF4400;STICKLINE(CLOSE< REF(C,1) ,OPEN,CLOSE,1.5,0 ),COLORFF8800;STICKLINE(CLOSE< REF(C,1) ,OPEN,CLOSE,0.9,0 ),COLORFFCC00;经典KDJ买:IF(CROSS(经典K,经典D),(L-(H-L)/2),DRAWNULL),POINTDOT,LINETHICK6,COLOR0000FF;{高亮红}回归斜率买:IF(CROSS(EMA(C,3),回归斜率线A),(L-(H-L)/3),DRAWNULL),POINTDOT,COLOR0000FF;{高亮红}回归斜率买_:DRAWICON(CROSS(EMA(C,3),回归斜率线A),(L-(H-L)/3),1),{买};回归斜率卖:IF(CROSS(回归斜率线A,EMA(C,2)),(H+(H-L)/3),DRAWNULL),POINTDOT,COLOR00CF00;{中绿}卖:DRAWICON(CROSS(回归斜率线A,EMA(C,2)),(H+(H-L)/3),2);经典KDJ卖:IF(CROSS(经典D,经典K),(H+(H-L)/2),DRAWNULL),CROSSDOT,LINETHICK3,COLOR00CF00;{中绿};。
通达信指标公式源码 指导线指标 主图源码
{背景长线}UR:=10;LR:=10;TC1:=IF(H=HHV(H,8*UR),H,DRAWNULL);TC2:=CONST(BARSLAST(TC1=H))+1;UPPER:=CONST(IF(TC2=1,H,REF(H,TC2-1)));BC1:=IF(L=LLV(L,8*LR),L,DRAWNULL);BC2:=CONST(BARSLAST(BC1=L))+1;LOWER:=CONST(IF(BC2=1,L,REF(L,BC2-1)));A:=EMA((LOW+CLOSE+OPEN)/3,28);B:=REF(EMA((LOW+CLOSE+OPEN)/3,28),1);N:=IF(BARSCOUNT(C)>=45,45,BARSCOUNT(C)); D:=C>=MA(C,N);E:=C<MA(C,N);上线:=SMA(C,6.5,1);下线:=SMA(C,13.5,1);上线1:=SMA(C,3,1);下线1:=SMA(C,8,1);{}STICKLINE( A>B OR D>0 OR 上线>下线,UPPER*1.01,LOWER*0.99,4.2,0),COLORADEAEA; STICKLINE( A<B OR E>0 OR 下线>上线,UPPER*1.01,LOWER*0.99,4.2,0),COLORA8A8A8; {背景中线}AA10:=MA(CLOSE,8);AA12:=MA(CLOSE,12);BB10:=((ATAN((AA10 - REF(AA10,1))) * 3.1416) * 10);BB12:=((ATAN((AA12 - REF(AA12,1))) * 3.1416) * 10);JJ:=(CLOSE+HIGH+LOW)/3;A1:=EMA(JJ,10);B1:=REF(A1,1);A0:=(L+H+C*2)/4;A111:=EMA(A0,14),LINETHICK2;A211:=EMA(A0,25),LINETHICK2;A1X:=(A111-REF(A111,1))/REF(A111,1)*100,NODRAW;A2X:=(A211-REF(A211,1))/REF(A211,1)*100,NODRAW;看多:=IF(A1X>=0 ANDBARSLAST(CROSS(A1X,0))>0,REF((C+O)/2,BARSLAST(CROSS(A1X,0))),DRA WNULL);逃顶:=IF(A1X<0 ANDBARSLAST(CROSS(0,A1X))>0,REF((C+O)/2,BARSLAST(CROSS(0,A1X))),DRA WNULL);AF:=EMA((CLOSE+HIGH+LOW)/3,10);BF:=IF(YEAR<=2017,IF(YEAR<2017,REF(AF,1),IF(YEAR=2017 ANDMONTH<10,REF(AF,1),0)),0);{}STICKLINE(A1>B1 OR AA10>AA12 OR A1X>=0 ORAF>BF ,UPPER,LOWER,4.2,0),COLORADEAEA;STICKLINE(A1<B1 OR AA10<AA12 OR (A1X<0 AND A2X<0) ORAF<BF ,UPPER,LOWER,4.2,0),COLORGRAY;{};DRAWKLINE(H,O,L,C);{MA3:=MA(CLOSE,3);YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;辰星线:=(20*YTSL+19*REF(YTSL,1)+18*REF(YTSL,2)+17*REF(YTSL,3)+16*REF( YTSL,4)+15*REF(YTSL,5)+14*REF(YTSL,6)+13*REF(YTSL,7)+12*REF(YTSL, 8)+11*REF(YTSL,9)+10*REF(YTSL,10)+9*REF(YTSL,11)+8*REF(YTSL,12)+7 *REF(YTSL,13)+6*REF(YTSL,14)+5*REF(YTSL,15)+4*REF(YTSL,16)+3*REF( YTSL,17)+2*REF(YTSL,18)+REF(YTSL,20))/211,COLOR0000FF;牵牛线:=MA(CLOSE,26),COLORFF00FF;等待:=IF(MA3>辰星线,辰星线,MA3);IF(等待>REF(等待,1),等待,DRAWNULL),LINETHICK2,COLOR0000FF;IF(辰星线>REF(辰星线,1),辰星线,DRAWNULL),LINETHICK2,COLOR0000FF;} {1}{AA05:MA(C,5),LINETHICK3,COLOR00CCFF;五日乖离率:=(C-AA05)/AA05*100;BB051:=ATAN((AA05/REF(AA05,1)-1)*100)*180/3.1416;速度5:=SMA(EMA((AA05-REF(AA05,1))/REF(AA05,1),3)*100,3,1);加速度5:EMA((速度5-REF(速度5,1)),3),NODRAW;IF(BB051>30 AND AA05>REF(AA05,1),AA05,DRAWNULL),LINETHICK3,COLORRED;AA101:=MA(C,10);AA20:=MA(C,20);BB101:=ATAN((AA101/REF(AA101,1)-1)*100)*180/3.1416;IF(BB051<0 AND AA05<REF(AA05,1),AA05,DRAWNULL),LINETHICK3,COLORGREEN;}{};{1}AAA:=(3*C+H+L+O)/6;VAR1:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(AAA,4) +3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;VAR2:=(HHV(VAR1,5)+HHV(VAR1,10)+HHV(VAR1,20))/3;VAR3:=(LLV(VAR1,5)+LLV(VAR1,10)+LLV(VAR1,20))/3;VAR4:=(HHV(VAR2,5)+HHV(VAR2,10)+HHV(VAR2,20))/3;VAR5:=(LLV(VAR3,5)+LLV(VAR3,10)+LLV(VAR3,20))/3;VAR6:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;短线:=VAR1,COLORWHITE;中线:=VAR6,COLORYELLOW;DRAWBAND(短线,RGB(220,163,0),中线,RGB(0,0,220));{提示点}买线:=EMA(C,4);卖线:=EMA(SLOPE(C,20)*10+C,35);DRAWTEXT(CROSS(买线,卖线),LOW*0.98,'买'),COLORRED,LINETHICK2; DRAWTEXT(CROSS(卖线,买线),HIGH*1.02,'卖'),COLORGREEN;{}FF1:=EMA(CLOSE,3);MA151:=EMA(CLOSE,21);DRAWTEXT(CROSS(FF1,MA151),(LOW * 0.99),'上拐点'),COLOR00FFFF; DRAWTEXT(CROSS(MA151,FF1),(HIGH * 1.02),'下拐点'),COLOR00FF00;{}MTM:=C-REF(C,1);DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);卖:=HHV(DX,2)=HHV(DX,7) AND COUNT(DX>50,2) ANDCROSS(MA(DX,2),DX);DRAWTEXT(FILTER(卖=1,1),HIGH*1.02,'卖1'),COLORGREEN;{}{}多方趋势:=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);天线:=78.89;DRAWTEXT(CROSS(天线,多方趋势),H*1.01,'逃顶'),COLOR00FF00; {}VAR51:=3;VAR52:=(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)); DRAWTEXT(CROSS(VAR52,VAR51), LOW,'←启动')COLORMAGENTA;。
盘后专用中短线买卖主图通达信指标公式源码
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)NODRAW;
阻:IF(NH>强,(强-CDP)*0.618+CDP,NH)NODRAW,COLORCYAN;
STICKLINE(CROSS(A1X,0),C,O,2,0)COLORYELLOW;
STICKLINE(CROSS(0,A1X),C,O,2,0)COLORGREEN;
STICKLINE(CROSS(A1X,0)OR CROSS(0,A1X),REF(EMA(C,14),1),REF(EMA(C,14),1)*0.998,2,0)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;
AMA2:EMA(DMA(CLOSE,CQ2),2),COLORGREEN,LINETHICK2;
休假:IF(A1X<0,REF(EMA(C,14),BARSLAST(CROSS(0,A1X))+1),DRAWNULL)COLORGREEN,LINETHICK2;
涨幅:IF(A1X>=0,(C-出击)/出击*100,DRAWNULL)NODRAW;
跌幅:IF(A1X<0,(C-休假)/休假*100,DRAWNULL)NODRAW;
通达信指标公式源码 主图趋势画线 源码主图
JRH:=HHV(C,2);JRL:=LLV(C,2);MA3:=MA(CLOSE,3);YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;R1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));R2:=(REF(R1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R3:=(REF(R2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R4:=(REF(R3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R5:=(REF(R4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R6:=(REF(R5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R7:=(REF(R6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R8:=(REF(R7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R9:=(REF(R8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); RA:=(REF(R9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); RB:=(REF(RA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); RC:=(REF(RB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); RD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2));RE:=(REF(RD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); RF:=(REF(RE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); R10:=(REF(RF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); R11:=(REF(R10,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R12:=(REF(R11,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R13:=(REF(R12,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R14:=(REF(R13,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R15:=(REF(R14,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R16:=(REF(R15,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R17:=(REF(R16,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));R18:=(REF(R17,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));R19:=REF(RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,1) AND R1;R1A:=((REF(R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,1)) AND RD);VAR3:=IF(C<200 ,MA(COST(80),3),2500),NODRAW;VAR4:=(((HIGH + LOW) + CLOSE) / 3);VAR5:=EMA(((((OPEN + HIGH) + LOW) + CLOSE) / 4),2330);VAR6:=(VAR5 + ((VAR5 * 6) / 100));春买:=R19,NODRAW,COLOR00DD00;秋离场:=R1A,NODRAW,COLOR2288EE;红持股:=R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,NODRAW,COLOR0000FF;阴观望:=RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,NODRAW,COLOR999999;急速超跌关注:=(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100<-14,COLORBBBBBB,NODRA W;离场:=IF(红持股,JRL,DRAWNULL);明离场价:=离场,COLORFF99FF,NODRAW;今离场价:=REF(离场,1)COLOR0000FF,NODRAW;进:=IF(阴观望,JRH,DRAWNULL);明进场价:=进,COLOR33AACC,NODRAW;今进场价:=REF(明进场价,1),COLOR00FF00,NODRAW;STICKLINE(ISLASTBAR AND (红持股OR REF(红持股,1)=1),今离场价,今离场价,20,1),COLOR0000FF;STICKLINE(ISLASTBAR AND (阴观望OR REF(阴观望,1)=1),今进场价,今进场价,20,1),COLOR00FF00;XX2:EMA(EMA((CLOSE+LOW+HIGH)/3,3),23),COLORGREEN, LINETHICK2; XX3:=REF(XX2,1);IF(XX2>XX3,XX2,DRAWNULL),COLORRED, LINETHICK2;B11:=MA(CLOSE,1);B22:=SMA(SMA(SMA(B11,2,1),2,1),2,1) ;SMA2:=MA(B22,3) ;DRAWBAND(B22,RGB(255,0,0),SMA2,RGB(0,255,0));下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100); RRRSV:=SMA(下档线,3,1);KKK:=SMA(RRRSV,3,1);DDDDD:=((3 * RRRSV) - (2 * KKK));JJ12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100); RSV24:=SMA(JJ12,3,1);K24:=SMA(RSV24,3,1);D24:=((3 * RSV24) - (2 * K24));压力2:=IF(CROSS(D24,DDDDD),HIGH,REF(HIGH,BARSLAST(CROSS(D24,DDDDD)) )),COLORFFFFFF;底部:=LLV(HIGH,30),COLOR00FF00;压力位:=IF(ISLASTBAR,压力2,DRAWNULL),NODRAW;底部位:=IF(ISLASTBAR,底部,DRAWNULL),NODRAW;STICKLINE(ISLASTBAR ,压力位,压力位,40,0),COLORFF00FF,LINETHICK2; STICKLINE(ISLASTBAR ,底部位,底部位,35,0),COLOR00FFFF,LINETHICK2;B1:=REF(CLOSE,1);B2:=REF(CLOSE,2);B3:=REF(CLOSE,3);B4:=REF(CLOSE,4);CMAX:=MAX(MAX(MAX(CLOSE,B1),B2),B3);CMIN:=MIN(MIN(MIN(CLOSE,B1),B2),B3);持股:=(CLOSE=CMAX AND (B1>=B2 OR B1>=B3)) OR ((B1=CMAX AND(B2=CMIN OR B3=CMIN)) AND CLOSE>=B2) OR(B2=CMAX AND B3=CMIN AND CLOSE>=B1) OR (B3=CMAX AND CLOSE>=B1 AND CLOSE>=B2);STICKLINE(持股,B1,CLOSE,3,0),COLOR000099;变盘:=CLOSE=CMAX AND B1=CMIN;STICKLINE(变盘,B2,CLOSE,3,0),COLOR0099EF;下跌:=(CLOSE=CMIN AND (B1<B2 OR B1<B3)) OR ((B1=CMIN AND(B2=CMAX OR B3=CMAX)) AND CLOSE<B2) OR(B2=CMIN AND B3=CMAX AND CLOSE<B1) OR (B3=CMIN AND CLOSE<B1 AND CLOSE<B2);STICKLINE(下跌,B1,CLOSE,3,0),COLOR009900;STICKLINE(B1=CMAX AND CLOSE=CMIN,B2,CLOSE,3,0),COLOR009900;买入:=(B1=CMIN AND CLOSE>=B2) OR ((B2=CMIN AND B1<=B3) OR(B3=CMIN AND B1<=B2) AND B2<B4 AND CLOSE>=B1);STICKLINE(买入,B1,B2,3,0),COLOR00FFFF;抛售:=(B1=CMAX AND CLOSE<B2) OR ((B2=CMAX AND B1>B3) OR(B3=CMAX AND B1>B2) AND B2>=B4 AND CLOSE<B1);STICKLINE(抛售,B1,B2,3,0),COLORFFFFFF;STICKLINE(C>=O,L,H,0,1),COLORRED;STICKLINE(C<O,H,L,0,1),COLORGREEN;STICKLINE(持股OR 买入,O,C,1.5,0),COLORRED;STICKLINE(下跌OR 抛售,O,C,1.5,0),COLORGREEN;STICKLINE(C>0,O,C,0,0),COLORFFFFFF;MMA:=CONST(HHV(H,90));MMB:=CONST(LLV(L,90));WN:=3;{原码N:=3;}WA1:=REF(H,WN)=HHV(H,2*WN+1); WB1:=FILTER(WA1,WN);WC1:=BACKSET(WB1,WN+1); WD1:=FILTER(WC1,WN);{高点}WA2:=REF(L,WN)=LLV(L,2*WN+1); WB2:=FILTER(WA2,WN);WC2:=BACKSET(WB2,WN+1); WD2:=FILTER(WC2,WN);{低点}WE1:=(REF(LLV(L,2*WN),1)+REF(HHV(H,2*WN),1))/2;WE2:=(H+L)/2;{高低点出现在同一K线上时可作取舍}WH1:=(WD1 AND NOT(WD2 AND WE1>=WE2)) OR ISLASTBAR OR BARSCOUNT(C)=1;WL1:=(WD2 AND NOT(WD1 AND WE1<WE2)); WH2:=WD1 AND NOT(WD2 AND WE1>=WE2);WX1:=REF(BARSLAST(WH1),1)+1; WF1:=BACKSET(WH1 ANDCOUNT(WL1,WX1)>0,LLVBARS(IF(WL1,L,10000),WX1));WG1:=WF1>REF(WF1,1); WI1:=BACKSET(WG1,2);WLD:=WI1>REF(WI1,1);{过滤后低点}WL2:=WLD OR ISLASTBAR OR BARSCOUNT(C)=1;WX2:=REF(BARSLAST(WL2),1)+1; WF2:=BACKSET(WL2 ANDCOUNT(WH2,WX2)>0,HHVBARS(IF(WH2,H,0),WX2));WG2:=WF2>REF(WF2,1); WI2:=BACKSET(WG2,2);WHD:=WI2>REF(WI2,1);{过滤后高点}WR1:=BACKSET(ISLASTBAR,BARSLAST(WHD)+1); WS1:=WR1>REF(WR1,1); {前一高}WT1:=BACKSET(ISLASTBAR,BARSLAST(WLD)+1); WU1:=WT1>REF(WT1,1); {前一低}WR2:=BACKSET(WS1,REF(BARSLAST(WHD),1)+2); WS2:=WR2>REF(WR2,1); {前二高}WT2:=BACKSET(WU1,REF(BARSLAST(WLD),1)+2); WU2:=WT2>REF(WT2,1); {前二低}WT3:=BACKSET(WU2,REF(BARSLAST(WLD),1)+2); WU3:=WT3>REF(WT3,1); {前三低}WT4:=BACKSET(WU3,REF(BARSLAST(WLD),1)+2); WU4:=WT4>REF(WT4,1); {前四低}WR3:=BACKSET(WS2,REF(BARSLAST(WHD),1)+2); WS3:=WR3>REF(WR3,1); {前三高}WR4:=BACKSET(WS3,REF(BARSLAST(WHD),1)+2); WS4:=WR4>REF(WR4,1); {前四高};压力1:=DRAWLINE(WS2,H,WS1,H,1),COLOR008888; {★压力1:}支撑1:=DRAWLINE(WU2,L,WU1,L,1),COLOR008888;{★支撑1:}压力2:=DRAWLINE(WS3,H,WS2,H,1),COLOR888000; {★压力2:}支撑2:=DRAWLINE(WU3,L,WU2,L,1),COLOR888000;{★支撑2:}压力3:=DRAWLINE(WS4,H,WS3,H,1),COLOR0000CC;{★压力3:}支撑3:=DRAWLINE(WU4,L,WU3,L,1),COLOR0000CC;{★支撑3:};BSC:=CONST(MAX(BARSLAST(WS4),BARSLAST(WU4))*3),NODRAW;IF(BETWEEN(压力1,MMA,MMB),压力1,DRAWNULL),COLOR008888,LINETHICK1;IF(BETWEEN(支撑1,MMA,MMB),支撑1,DRAWNULL),COLOR008888,LINETHICK1;IF(BETWEEN(压力2,MMA,MMB),压力2,DRAWNULL),COLOR888000,LINETHICK1;IF(BETWEEN(支撑2,MMA,MMB),支撑2,DRAWNULL),COLOR888000,LINETHICK1;IF(BETWEEN(压力3,MMA,MMB),压力3,DRAWNULL),COLOR0000CC,LINETHICK1;IF(BETWEEN(支撑3,MMA,MMB),支撑3,DRAWNULL),COLOR0000CC,LINETHICK1;底:=SUM(MA(CLOSE,10),9)/11.114;DRAWTEXT(CROSS(LOW,底) AND REF(底,1)>REF(HIGH,1) OR CROSS(HIGH,底),L,'---铁底'),COLOR00FF00;X1:=(3*CLOSE+HIGH+LOW+OPEN)/6;X2:=EMA(X1,10);X3:=REF(X2,1);X4:=(REF(HIGH,1)+REF(LOW,1))/2;X5:=MA(CLOSE,21)+2*STD(CLOSE,21);X6:=REF(CLOSE,1);X7:=(SMA(MAX(CLOSE-X6,0),7,1))/(SMA(ABS(CLOSE-X6),7,1))*100;X8:=CROSS(79,X7);X9:=FILTER(X8,4);WZ1:=POW(MA(CLOSE,5),2)+MA(CLOSE,5);WZ2:=POW(MA(LOW,5),2)+MA(LOW,5);WZ3:=POW(MA(HIGH,5),2)+MA(HIGH,5);WZ4:=(WZ1-LLV(WZ2,9))/(HHV(WZ3,9)-LLV(WZ2,9))*150+65;DK:=SMA(WZ4,3,1)*1.5;DD:=SMA(DK,3,1);DJ:=3*DK-2*DD;WZ5:=EMA(CLOSE,12)-EMA(CLOSE,26);WZ6:=EMA(WZ5,9);WZ7:=2*(WZ5-WZ6);WZ8:=REF(WZ7,1);WZ9:=CROSS(WZ8,WZ7) AND WZ8>0;VAR1T:=EMA(CLOSE,8);VAR2T:=EMA(VAR1T,20);VAR3T:=CROSS(VAR1T,VAR2T);VAR4T:=VAR1T<MA(CLOSE,120);VAR5T:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;VAR6T:=SMA(VAR5T,5,1);VAR7T:=SMA(VAR6T,8,1);VAR8T:=CROSS(VAR6T,VAR7T) AND VAR7T<20;VAR9T:=CLOSE>LLV(CLOSE,60)+0.3*LLV(CLOSE,60) AND VAR8T;VARA:=IF(CLOSE>1000,VAR8T,VAR9T);起步:=VAR3T AND VAR4T;逃遁:=VARA;XL1:=EMA(CLOSE,10)/100;XL2:=MA((XL1-REF(XL1,10))/REF(XL1,10),3)*100;XL3:=MA(XL2,3);XL4:=SMA((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,3,1); DRAWTEXT(IF(CROSS(3*XL4-2*SMA(XL4,3,1),8),87,0) AND X2>X3,LOW,'←反弹'),COLOR0000FF;DRAWTEXT(IF(CROSS((VAR1T-LLV(VAR1T,4))/(HHV(VAR1T,4)-LLV(VAR1T,4)) *4*25,87.5) AND VAR1T<40,87,0) AND X2>X3,LOW,'←短买'),COLOR0000AA; DRAWTEXT(IF(CROSS(2*(EMA((CLOSE*2+HIGH+LOW)/4,12)-EMA((CLOSE*2 +HIGH+LOW)/4,26)-(EMA(EMA((CLOSE*2+HIGH+LOW)/4,12)-EMA((CLOSE* 2+HIGH+LOW)/4,26),2)))*5.8,0.47),LOW,0) AND X2>X3,LOW,'←加仓'),COLORFF5ED8;DRAWTEXT(CROSS(X4,X5),HIGH+C*0.01,'←减'),COLORB4FF00; DRAWTEXT(FILTER((WZ9 AND DJ>250) OR X9 ,5),HIGH+C*0.02,'←跑'),COLORBCFF8B;STICKLINE(起步>0,HIGH,LOW,0.8,0),COLOR00FFFF;STICKLINE(起步>0,OPEN,CLOSE,5,0),COLOR00FFFF;DRAWTEXT(逃遁>0,HIGH,'●←逃'),COLOR7FFFD6;X1P:=(C+L+H)/3;BB13:=ATAN(EMA(X1P,13)-REF(EMA(X1P,13),1))*3.1416*10;EMA8:=EMA(C,8);DRAWTEXT(FILTER(BB13>1 ANDEMA(X1P,13)>REF(EMA(X1P,8),1),10),EMA8,'∠45上升'),COLORWHITE; VAR3AA:=IF((CLOSE>REF(CLOSE,1)),88,0);VAR4AA:=IF(((CLOSE)/(REF(CLOSE,1))>1.05) AND ((HIGH)/(CLOSE)<1.01) AND (VAR3AA>0),91,0);DRAWTEXT(FILTER((VAR4AA>90),45),(LOW),'★大胆搏'),COLOR00FFFF;L23:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20; L24:=(HIGH+LOW+CLOSE)/3;L25:=(L24-MA(L24,14))/(0.015*AVEDEV(L24,14));L26:=(L24-MA(L24,70))/(0.015*AVEDEV(L24,70));L27:=IF(L25>=150 AND L25<200 AND L26>=150 AND L26<200,10,0);L28:=IF(L25<=-150 AND L25>-200 AND L26<=-150 AND L26>-200,-10,L27); L29:=100-ABS((CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100);L30:=IF(L29<90,L29,100);L31:=IF(L23>0,L23,0);XL11:=(IF(L28>=200 AND L25>=150,15,IF(L26<=-200 ANDL25<=-150,-15,L28)))+60;XL22:=L31>48 AND XL11>60 AND L30<100;DRAWTEXT(XL22 AND COUNT(XL22,30)=1,L,'大笔买入'),COLORFF00FF; VAR3TD:=100-3*SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))* 100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42)) *100,20,1),15,1);VAR4TD:=100-3*SMA((OPEN-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*1 00,20,1)+2*SMA(SMA((OPEN-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*1 00,20,1),15,1);VAR2TD:=VAR3TD<REF(VAR4TD,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);DRAWTEXT(VAR2TD AND COUNT(VAR2TD,30)=1,L,'大资金进场'),COLORFF00FF;DRAWTEXT_FIX(1,0,0,0,'市盈率:'),COLORYELLOW;DRAWNUMBER_FIX(1,0.08,0,0,CONST(DYNAINFO(39))),COLORYELLOW; DRAWTEXT_FIX(1,0.16,0,0,'每股收益(元):'),COLOR0080FF; DRAWNUMBER_FIX(1,0.29,0,0,CONST(FINANCE(33))),COLOR0080FF; DRAWTEXT_FIX(1,0.36,0,0,'莸利比例:'),COLORYELLOW; DRAWNUMBER_FIX(1,0.46,0,0,CONST(WINNER(C )*100)),COLORYELLOW; DRAWTEXT_FIX(1,0,0.05,0,'总股本(万股):'),COLORMAGENTA; DRAWNUMBER_FIX(1,0.13,0.05,0,CONST(FINANCE(1)/10000)),COLORMAGE NTA;DRAWTEXT_FIX(1,0,0.1,0,'所属板块:'),COLORYELLOW;DRAWTEXT_FIX(1,0.1,0.1,0,HYBLOCK),COLOR0080FF;DRAWTEXT_FIX(1,0.21,0.1,0,DYBLOCK),COLOR0080FF;{量能饱和}SAT:=IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100>100,100,(AMOU NT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100);DRAWTEXT_FIX(1,0.35,0.9,0,'量能饱和度:')COLOR00FFFF; DRAWNUMBER_FIX(1,0.48,0.9,0,CONST(SAT)),COLORYELLOW;。
趋势跟踪主图源码,无未来,大趋势小波段通吃通达信指标公式源码
基本用法,小波段红买绿卖,大周期黄点持股,蓝点持币DRAWGBK(C>0, RGB(0,0,00),RGB(0,0,0),0,'竹',0);DRAWNUMBER(ISLASTBAR ,C,C),COLORMAGENTA;PL5:=HHV(H,18);SJTJ:=DATE<1590301;AA:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,30))/MA(CLOSE,30);长期趋势线:=DMA((2*CLOSE+LOW+HIGH)/4,AA);CC:=(CLOSE/长期趋势线);MA1:=MA(CC*(2*CLOSE+HIGH+LOW)/4,3);MAAA:=((MA1-长期趋势线)/长期趋势线)/3;TMP:=MA1-MAAA*MA1;长期趋势上升:IF(TMP>长期趋势线,长期趋势线,DRAWNULL),LINETHICK4,COLORRED;IF(TMP>长期趋势线,长期趋势线,DRAWNULL),COLORYELLOW,POINTDOT,LINETHICK4;长期趋势下降:IF(TMP<=长期趋势线,长期趋势线,DRAWNULL),LINETHICK4,COLORGREEN; IF(TMP<=长期趋势线,长期趋势线,DRAWNULL),COLORBLUE,POINTDOT,LINETHICK4; HZS:=CROSS(TMP,长期趋势线);LZS:=CROSS(长期趋势线,TMP);DRAWICON(HZS,长期趋势线-0.1,26);DRAWICON(LZS,长期趋势线+0.1,24);{DRAWICON(TMP<=长期趋势线AND NOT(LZS),长期趋势线-0.1,14)}; {DRAWICON(TMP>长期趋势线AND NOT(HZS),长期趋势线+0.1,13)};MAH:=(H*18+REF(H,1)*17+REF(H,2)*16+REF(H,3)*15+REF(H,4)*14+REF(H,5)*13+RE F(H,6)*12+REF(H,7)*11+REF(H,8)*10+REF(H,9)*9+REF(H,10)*8+REF(H,11)*7+REF(H, 12)*6+REF(H,13)*5+REF(H,14)*4+REF(H,15)*3+REF(H,16)*2+REF(H,17)*1)/171;MAL:=(L*18+REF(L,1)*17+REF(L,2)*16+REF(L,3)*15+REF(L,4)*14+REF(L,5)*13+REF( L,6)*12+REF(L,7)*11+REF(L,8)*10+REF(L,9)*9+REF(L,10)*8+REF(L,11)*7+REF(L,12)* 6+REF(L,13)*5+REF(L,14)*4+REF(L,15)*3+REF(L,16)*2+REF(L,17)*1)/171;MA5:=MA(CLOSE,5);MA10:=MA(CLOSE,10);MA20:=MA(CLOSE,20);MA60:=MA(CLOSE,60);DK:= SJTJ AND( CLOSE>=MAH OR (C>MA5 AND C>MA10 AND C>MA20 AND C>MA60)); KK:= SJTJ AND( MAL>CLOSE OR (C<MA5 AND C<MA10 AND C<MA20 AND C<MA60)); DK1:=BARSLAST(DK);KK1:=BARSLAST(KK);DK2:=BARSLAST(CROSS(KK1,DK1));KK2:=BARSLAST(CROSS(DK1,KK1));HS:=DK2<KK2;LS:=KK2<DK2;W2:=OPEN-CLOSE;HT:=IF(OPEN>CLOSE,OPEN,CLOSE);LT:=IF(OPEN<CLOSE,OPEN,CLOSE);STICKLINE(W2>0 AND HS,OPEN,CLOSE,2,0),COLORRED;STICKLINE(W2>0 AND HS,OPEN,H,0.0,0),COLORRED;STICKLINE(W2>0 AND HS,C,L,0.0,0),COLORRED;STICKLINE(W2<=0 AND HS,OPEN,CLOSE,2,1),COLORRED;STICKLINE(W2<=0 AND HS,O,L,0.0,0),COLORRED;STICKLINE(W2<=0 AND HS,C,H,0.0,0),COLORRED;STICKLINE(W2>0 AND LS,OPEN,CLOSE,2,0),COLORGREEN;STICKLINE(W2>0 AND LS,OPEN,H,0.0,0),COLORGREEN;STICKLINE(W2>0 AND LS,C,L,0.0,0),COLORGREEN;STICKLINE(W2<=0 AND LS,OPEN,CLOSE,2,1),COLORGREEN;STICKLINE(W2<=0 AND LS,C,H,0.0,0),COLORGREEN;STICKLINE(W2<=0 AND LS,O,L,0.0,0),COLORGREEN;趋势线:=(MAH+MAL)/2 COLORGREEN,,LINETHICK2;中级趋势上升:IF(HS,趋势线,DRAWNULL),LINETHICK2,COLORRED;中级趋势下降:IF(LS,趋势线,DRAWNULL),LINETHICK2,COLORGREEN;DRAWICON(HS,趋势线*0.995,1);DRAWICON(LS,趋势线*1.005,2);最新价:IF(SJTJ, C,DRAWNULL),LINETHICK0,COLORYELLOW;DRAWTEXT_FIX(C>0,0.004,1,0,EXTERNSTR(0,1)),COLORBLUE,LINETHICK2;。
通达信指标公式源码 超短稳赢主图选股公式 通达信 源码
{通达信强手超短主图指标公式}B1:=EMA((2*CLOSE+HIGH+LOW)/4,5);A1:IF(EMA((2*CLOSE+HIGH+LOW)/4,6)>REF(EMA((2*CLOSE+HIGH+LOW)/ 4,6),1),B1,DRAWNULL),COLOR0000FF;A2:IF(EMA((2*CLOSE+HIGH+LOW)/4,6)<REF(EMA((2*CLOSE+HIGH+LOW)/ 4,6),1),B1,DRAWNULL),COLOR00FF00;B2:=EMA((2*CLOSE+HIGH+LOW)/4,13);A3:IF(EMA((2*CLOSE+HIGH+LOW)/4,10)>REF(EMA((2*CLOSE+HIGH+LOW) /4,13),1),B2,DRAWNULL),COLOR0000FF;A4:IF(EMA((2*CLOSE+HIGH+LOW)/4,10)<REF(EMA((2*CLOSE+HIGH+LOW) /4,13),1),B2,DRAWNULL),LINETHICK2,COLOR00FF00;B3:=REF(EMA((LOW+CLOSE+OPEN)/3,25),1);A5:IF(EMA((LOW+CLOSE+OPEN)/3,28)>REF(EMA((LOW+CLOSE+OPEN)/3,2 8),1),B3,DRAWNULL),LINETHICK3,COLOR0000FF;A6:IF(EMA((LOW+CLOSE+OPEN)/3,28)<REF(EMA((LOW+CLOSE+OPEN)/3,2 8),1),B3,DRAWNULL),LINETHICK3,COLOR00FF00;B4:=(EMA(LOW,125)+EMA((CLOSE+LOW)/2,125))/2;A7:IF((EMA(LOW,125)+EMA((CLOSE+LOW)/2,250))/2>REF((EMA(LOW,125) +EMA((CLOSE+LOW)/2,250))/2,1),B4,DRAWNULL),POINTDOT,COLOR0000FF ;A8:IF((EMA(LOW,125)+EMA((CLOSE+LOW)/2,250))/2<REF((EMA(LOW,125) +EMA((CLOSE+LOW)/2,250))/2,1),B4,DRAWNULL),POINTDOT,COLOR0000FF ;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 ANDREF(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,'买'),COLOR00FFFF;DRAWTEXT(FILTER(KKML,30),H,'卖'),COLORFFFF00;DRAWTEXT(FILTER(KKMQ,30),C,'持仓'),COLOR00FF00;DRAWTEXT(FILTER(KKAL,30),H,'空仓'),COLORFF8080;DRAWTEXT(FILTER(CLOSE/REF(CLOSE,1)>INDEXC/REF(INDEXC,1),30),L*0.9 8,'强于大盘'),COLORFF00FF;DRAWTEXT(CROSS(MA(CLOSE,5),MA(CLOSE,10)),L*0.96,'出手'),COLORFF00FF;DRAWTEXT(CROSS(MA(CLOSE,10),MA(CLOSE,5)),H*1.02,'收手'),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,'有防御能力');。
通达信指标公式源码飞翔趋势主图指标
P0:=SMA(INDEXC,34,1);P1:=(55*P0+34*REF(P0,1)+21*REF(P0,2)+13*REF(P0,3)+8*REF(P0,4)+5*REF(P0,5) +3*REF(P0,6)+2*REF(P0,7)+REF(P0,8)+REF(P0,9))/143;P2:=REF(P1,1);大盘长牛熊:=0.5*(P1+P2);A0:SMA(C,3,1),COLORWHITE;A1:=(55*A0+34*REF(A0,1)+21*REF(A0,2)+13*REF(A0,3)+8*REF(A0,4)+5*REF(A0,5) +3*REF(A0,6)+2*REF(A0,7)+REF(A0,8)+REF(A0,9))/143;A2:=REF(A1,1);超短牛熊:0.5*(A1+A2),COLORRED;ZD0:=SMA(C,5,1),COLORRED;ZD1:=(55*ZD0+34*REF(ZD0,1)+21*REF(ZD0,2)+13*REF(ZD0,3)+8*REF(ZD0,4)+5*REF (ZD0,5)+3*REF(ZD0,6)+2*REF(ZD0,7)+REF(ZD0,8)+REF(ZD0,9))/143;ZD2:=REF(ZD1,1);中短牛熊:0.5*(ZD1+ZD2),COLORYELLOW;H0:=SMA(C,8,1);H1:=(55*H0+34*REF(H0,1)+21*REF(H0,2)+13*REF(H0,3)+8*REF(H0,4)+5*REF(H0,5) +3*REF(H0,6)+2*REF(H0,7)+REF(H0,8)+REF(H0,9))/143;H2:=REF(H1,1);短期牛熊:0.5*(H1+H2),COLORMAGENTA;{DRAWBAND(H1,RGB(255,255,0),H2,RGB(0,0,255));STICKLINE(H1>H2,H1,H2,10,0),COLORYELLOW;}DZ0:=SMA(C,13,1);DZ1:=(55*DZ0+34*REF(DZ0,1)+21*REF(DZ0,2)+13*REF(DZ0,3)+8*REF(DZ0,4)+5*REF (DZ0,5)+3*REF(DZ0,6)+2*REF(DZ0,7)+REF(DZ0,8)+REF(DZ0,9))/143;DZ2:=REF(DZ1,1);短中牛熊:0.5*(DZ1+DZ2),COLORWHITE;ZX0:=SMA(C,21,1);ZX1:=(55*ZX0+34*REF(ZX0,1)+21*REF(ZX0,2)+13*REF(ZX0,3)+8*REF(ZX0,4)+5*REF( ZX0,5)+3*REF(ZX0,6)+2*REF(ZX0,7)+REF(ZX0,8)+REF(ZX0,9))/143;ZX2:=REF(ZX1,1);中线牛熊:=0.5*(ZX1+ZX2),COLORGREEN;I0:=SMA(C,34,1);I1:=(55*I0+34*REF(I0,1)+21*REF(I0,2)+13*REF(I0,3)+8*REF(I0,4)+5*REF(I0,5)+3*REF(I0,6)+2*REF(I0,7)+REF(I0,8)+REF(I0,9))/143;I2:=REF(I1,1);中长牛熊:0.5*(I1+I2),COLORCYAN;CX0:=SMA(C,55,1);CX1:=(55*CX0+34*REF(CX0,1)+21*REF(CX0,2)+13*REF(CX0,3)+8*REF(CX0,4)+5*REF (CX0,5)+3*REF(CX0,6)+2*REF(CX0,7)+REF(CX0,8)+REF(CX0,9))/143;CX2:=REF(CX1,1);长线牛熊:0.5*(CX1+CX2),COLORBLUE;CC0:=SMA(C,89,1);CC1:=(55*CC0+34*REF(CC0,1)+21*REF(CC0,2)+13*REF(CC0,3)+8*REF(CC0,4)+5*REF (CC0,5)+3*REF(CC0,6)+2*REF(CC0,7)+REF(CC0,8)+REF(CC0,9))/143;CC2:=REF(CC1,1);超长牛熊:0.5*(CC1+CC2),COLORGREEN,LINETHICK2;TC0:=SMA(C,144,1);TC1:=(55*TC0+34*REF(TC0,1)+21*REF(TC0,2)+13*REF(TC0,3)+8*REF(TC0,4)+5*REF( TC0,5)+3*REF(TC0,6)+2*REF(TC0,7)+REF(TC0,8)+REF(TC0,9))/143;TC2:=REF(TC1,1);特长牛熊:0.5*(TC1+TC2),COLORMAGENTA,LINETHICK2;SC0:=SMA(C,233,1);SC1:=(55*SC0+34*REF(SC0,1)+21*REF(SC0,2)+13*REF(SC0,3)+8*REF(SC0,4)+5*REF( SC0,5)+3*REF(SC0,6)+2*REF(SC0,7)+REF(SC0,8)+REF(SC0,9))/143;SC2:=REF(SC1,1);特牛熊:0.5*(SC1+SC2),COLORMAGENTA,LINETHICK2;{DRAWBAND(I1,RGB(255,0,0),I2,RGB(0,255,0));STICKLINE(I1>I2,I1,I2,10,0),COLORRED;}{差:100*(短期牛熊-长期牛熊)/长期牛熊,COLORMAGENTA,NODRAW;};{笔底分型选股预警确保向下笔成立后的底分型}V00:= HIGH<REF(HIGH,1) AND LOW<REF(LOW,1);V01:= HIGH<REF(HIGH,1) AND LOW>REF(LOW,1);V02:= HIGH>REF(HIGH,1) AND LOW<REF(LOW,1);V03:= HIGH>REF(HIGH,1) AND LOW>REF(LOW,1);V04:= REF(HIGH,2) < HIGH AND REF(LOW,2) < LOWAND REF(HIGH,2) > REF(HIGH,1) AND REF(LOW,2) < REF(LOW,1);V1:= COUNT(V00,6)>=3 AND COUNT(V01 OR V02,5)=0 AND LLVBARS(LOW,6) = 1 AND HHVBARS(HIGH,6) >= 5 AND V03;V2:= COUNT(V00,7)>=3 AND COUNT(V01 OR V02,6)=1 AND LLVBARS(LOW,7) = 2 AND HHVBARS(HIGH,7) >= 6 AND V04;V3:= COUNT(V00,7)>=3 AND COUNT(V01 OR V02,6)=1 AND LLVBARS(LOW,7) = 1 AND HHVBARS(HIGH,7) >= 6 AND V03;V4:= COUNT(V00,8)>=3 AND COUNT(V01 OR V02,7)<=2 AND LLVBARS(LOW,8) = 2 AND HHVBARS(HIGH,8) >= 7 AND V04;V5:= COUNT(V00,8)>=3 AND COUNT(V01 OR V02,7)<=2 AND LLVBARS(LOW,8) = 1 AND HHVBARS(HIGH,8) >= 7 AND V03;V6:= COUNT(V00,9)>=3 AND COUNT(V01 OR V02,8)<=3 AND LLVBARS(LOW,9) = 2 AND HHVBARS(HIGH,9) >= 8 AND V04;V7:= COUNT(V00,9)>=3 AND COUNT(V01 OR V02,8)<=3 AND LLVBARS(LOW,9) = 1 AND HHVBARS(HIGH,9) >= 8 AND V03;V8:= COUNT(V00,10)>=3 AND COUNT(V01 OR V02,9)<=4 AND LLVBARS(LOW,10) = 2 AND HHVBARS(HIGH,10) >= 9 AND V04;V9:= COUNT(V00,10)>=3 AND COUNT(V01 OR V02,9)<=4 AND LLVBARS(LOW,10) = 1 AND HHVBARS(HIGH,10) >= 9 AND V03;V10:= COUNT(V00,11)>=3 AND COUNT(V01 OR V02,10)<=5 AND LLVBARS(LOW,11) = 2 AND HHVBARS(HIGH,11) >= 10 AND V04;XG:= V1 OR V2 OR V3 OR V4 OR V5 OR V6 OR V7 OR V8 OR V9 OR V10; DRAWTEXT(FILTER(XG=1,5),L*0.998,'底'),COLORYELLOW;{笔顶分型选股预警确保向上笔成立后的顶分型}HV00:= HIGH>REF(HIGH,1) AND LOW>REF(LOW,1);HV01:= HIGH<REF(HIGH,1) AND LOW>REF(LOW,1);HV02:= HIGH>REF(HIGH,1) AND LOW<REF(LOW,1);HV03:= HIGH<REF(HIGH,1) AND LOW<REF(LOW,1);HV04:= REF(HIGH,2) > HIGH AND REF(LOW,2) > LOW AND REF(HIGH,2) > REF(HIGH,1) AND REF(LOW,2) < REF(LOW,1);HV1:= COUNT(HV00,6)>=3 AND COUNT(HV01 OR HV02,5)=0 AND HHVBARS(HIGH,6) = 1 AND LLVBARS(LOW,6) >= 5 AND HV03;HV2:= COUNT(HV00,7)>=3 AND COUNT(HV01 OR HV02,6)=1 AND HHVBARS(HIGH,7) = 2 AND LLVBARS(LOW,7) >= 6 AND HV04;HV3:= COUNT(HV00,7)>=3 AND COUNT(HV01 OR HV02,6)=1 AND HHVBARS(HIGH,7) = 1 AND LLVBARS(LOW,7) >= 6 AND HV03;HV4:= COUNT(HV00,8)>=3 AND COUNT(HV01 OR HV02,7)<=2 AND HHVBARS(HIGH,8) = 2 AND LLVBARS(LOW,8) >= 7 AND HV04;HV5:= COUNT(HV00,8)>=3 AND COUNT(HV01 OR HV02,7)<=2 AND HHVBARS(HIGH,8) = 1 AND LLVBARS(LOW,8) >= 7 AND HV03;HV6:= COUNT(HV00,9)>=3 AND COUNT(HV01 OR HV02,8)<=3 AND HHVBARS(HIGH,9) = 2 AND LLVBARS(LOW,9) >= 8 AND HV04;HV7:= COUNT(HV00,9)>=3 AND COUNT(HV01 OR HV02,8)<=3 AND HHVBARS(HIGH,9) = 1 AND LLVBARS(LOW,9) >= 8 AND HV03;HV8:= COUNT(HV00,10)>=3 AND COUNT(HV01 OR HV02,9)<=4 ANDHHVBARS(HIGH,10) = 2 AND LLVBARS(LOW,10) >= 9 AND HV04;HV9:= COUNT(HV00,10)>=3 AND COUNT(HV01 OR HV02,9)<=4 AND HHVBARS(HIGH,10) = 1 AND LLVBARS(LOW,10) >= 9 AND HV03;HV10:= COUNT(HV00,11)>=3 AND COUNT(HV01 OR HV02,10)<=5 AND HHVBARS(HIGH,11) = 2 AND LLVBARS(LOW,11) >= 10 AND HV04;HXG:=HV1 OR HV2 OR HV3 OR HV4 OR HV5 OR HV6 OR HV7 OR HV8 OR HV9 OR HV10; {DRAWTEXT(FILTER(HXG=1,3),H*1.01,'顶'),COLORGREEN;};。
中短线决策主图指标通达信指标公式源码
这个是通达信加密的中线决策和短线决策
和谐了源码后加在一个主图里
操作方法; 不破中线决策均线一路持仓破短线决策减半仓
清晰明了
1.股价高于平均线,视为强势;股价低于平均线,视为弱势
2.平均线向上涨升,具有助涨力道;平均线向下跌降,具有助跌力道;
3.二条以上平均线向上交叉时,买进;
4.二条以上平均线向下交叉时,卖出;
5.移动平均线的信号经常落后股价,若以EXPMA 、VMA 辅助,可以改善。
N:=IF(BARSCOUNT(C)>=48,48,BARSCOUNT(C));
AMOV:=VOL*(C+L+H)/3;
MN:=SUM(AMOV,N)/SUM(VOL,N);
NOTEXT1:IF(C>=MN,MN,DRAWNULL),LINETHICK3,COLORYELLOW; NOTEXT2:IF(C<MN,MN,DRAWNULL),LINETHICK3,COLORGRAY;
N1:=IF(BARSCOUNT(C)>=8,8,BARSCOUNT(C));
AMOV2:=VOL*(C+L+H)/3;
MN1:=SUM(AMOV,N1)/SUM(VOL,N1);
NOTEXT3:IF(C>=MN1,MN1,DRAWNULL),LINETHICK2,COLORYELLOW;
NOTEXT4:IF(C<MN1,MN1,DRAWNULL),LINETHICK2,COLORGRAY;。
通达信指标公式源码 主力趋势 中线主图
{开始---主力趋势指标}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);。
通达信主图指标中短线(附源码)
通达信主图指标中短线(附源码)
通达信主图指标中短线(附源码)
MA18:M(CLOSE,33);
VAR2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<REF(ZIG(3,10),2);
STICKLINE(VAR1,O,C,2,0),COLORFF00FF,LINETHICK2;{高位红色}
STICKLINE(VAR1,H,L,0,0),COLORFF00FF,LINETHICK2;{高位红色}
股票:=CODELIKE('600') OR CODELIKE('601') OR CODELIKE('603') OR CODELIKE('000') OR CODELIKE('002') OR CODELIKE('300');
DRAWTEXT_FIX(ISLASTBAR AND股票,0,1,0,STRCAT(板块,STRCAT(STRCAT('廿换手:',CON2STR(SUM(DYNAINFO(37),20)*100,2)),'%'))),COLORYELLOW;
BBI:(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4,LINETHICK2;{BBI原始参数值:3,6,12,24}
{用法:白K线买进,粉K线卖出;}
VAR1:=ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>REF(ZIG(3,10),2);
通达信短中结合主图指标公式编程思路
通达信短中结合主图指标公式编程思路VAR1赋值:(2*收盘价+ 最高价+ 最低价 +开盘价)/5A1赋值:(VAR1的3日指数移动平均VAR1的6日指数移动平均VAR1的12日指数移动平均 VAR1的24日指数移动平均)/4 A2赋值:A1的2日指数移动平均A3赋值:A2的2日指数移动平均A4赋值:A3的2日指数移动平均A5赋值:A4的2日指数移动平均A6赋值:A5的2日指数移动平均A7赋值:A6的2日指数移动平均A8赋值:VAR1的2.78日指数移动平均*1.028A9赋值:开盘价的3.2日简单移动平均*1.028DUO赋值:A1>A2 AND A2>A3 AND A3>A4 AND A4>A5 AND A5>A6 AND A6>A7KONG赋值:A1<A2 AND A2<A3 AND A3<A4 AND A4<A5 AND A5<A6 AND A6<A7QYR赋值:1日前的DUO=0QIR2赋值:1日前的KONG=0输出中线B:DUO AND QYR,画红色,NODRAW输出中线S:KONG AND QIR2,画绿色,NODRAW当满足条件DUO时,在日期日130日内最高价的最高值和日期日100000日内最低价的最低值位置之间画柱状线,宽度为4,0不为0则画空心柱.,画蓝色当满足条件KONG时,在日期日130日内最高价的最高值和日期日100000日内最低价的最低值位置之间画柱状线,宽度为4,0不为0则画空心柱.,画深灰色当满足条件中线B时,在最低价*0.91和最低价*0.94位置之间画柱状线,宽度为4,-1不为0则画空心柱.,画红色当满足条件中线S时,在最高价*1.03和最高价*1.06位置之间画柱状线,宽度为4,-1不为0则画空心柱.,画绿色当满足条件中线B时,在最低价*0.92位置画1号图标当满足条件中线S时,在最高价*1.04位置画2号图标输出短1:A8的2日指数移动平均的2日指数移动平均,画红色,线宽为2输出短2:A9的2日指数移动平均的2日指数移动平均,画绿色,线宽为2输出安全线:收盘价的55日指数移动平均,DOTLINE,画绿色如果安全线>1日前的安全线,返回安全线,否则返回无效数,CIRCLEDOT,画红色K线TYP赋值:(最高价+最低价+收盘价)/3CCI赋值:(TYP-TYP的14日简单移动平均)/(0.015*TYP的14日平均绝对偏差)输出短底:CCI上穿-100,画黄色,NODRAW当满足条件短底时,在收盘价和开盘价位置之间画柱状线,宽度为2,0不为0则画空心柱.,画黄色当满足条件短底时,在收盘价和开盘价位置之间画柱状线,宽度为0,0不为0则画空心柱.,画洋红色LOWV赋值:9日内最低价的最低值HIGHV赋值:9日内最高价的最高值RSV赋值:(收盘价-LOWV)/(HIGHV-LOWV)*100的3日指数移动平均K赋值:RSV的3日指数移动平均D赋值:K的3日简单移动平均输出高抛:D上穿K AND K>=80,画绿色,NODRAW当满足条件高抛时,在收盘价和开盘价位置之间画柱状线,宽度为2,0不为0则画空心柱.,画绿色当满足条件高抛时,在收盘价和开盘价位置之间画柱状线,宽度为0,0不为0则画空心柱.,画蓝色。
通达信指标公式源码 趋势线主图源码
{趋势线主图}短线:EMA(CLOSE,4),COLORFF00FF;生命:EMA(CLOSE,13),COLORWHITE,LINETHICK2;趋势:EMA(SLOPE(C,21)*20+C,42),COLORYELLOW,LINETHICK2;中线:EMA(CLOSE,21),COLOR00FF00,LINETHICK3;神线:MA(C,72),COLORRED;年线:MA(C,250),COLORBLUE;{红点妖股系统:2015.12,COLORRED;}MA1:=MA(CLOSE,5),COLORFF00FF;QS1:=EMA(SLOPE(C,21)*20+C,42)*0.91 ;MA4:=EMA(CLOSE,13),COLORWHITE,LINETHICK2;MA3:=EMA(CLOSE,40),LINETHICK4;QS:=EMA(SLOPE(C,21)*20+C,42),COLORYELLOW,LINETHICK3;XX3:=EMA(C,30)*1.09,COLORBLUE,LINETHICK2;QSH:=EMA(CLOSE,13)*1.12;RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1),COLORWHITE;D:=SMA(K,3,1),COLORYELLOW;J:=3*K-2*D,COLORFF00FF;DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);DEA:=EMA(DIFF,9);MACD:=(DIFF-DEA)*2;SM:=EMA(C,13);P:=(HIGH + LOW + CLOSE)/3;CCI:=(P-MA(P,14))*100/(1.5*AVEDEV(P,14)),COLORWHITE;WR1:=100*(HHV(HIGH,10)-CLOSE)/(HHV(HIGH,10)-LLV(LOW,10));WR2:=100*(HHV(HIGH,101)-CLOSE)/(HHV(HIGH,101)-LLV(LOW,101));HSL:=VOL/CAPITAL*100;ZT:=C/REF(C,1)>1.095 AND H/C<1.001 AND H-C<=0.01 AND C>O;A:=HHVBARS(V,25);ZX:=EMA(C,21);SX:=MA(C,72);VAR2:=LLV(LOW,10);VAR3:=HHV(HIGH,25);GEGE:= EMA((CLOSE-VAR2)/(VAR3-VAR2)*4,4);L20:IF(A=0,L,REF(L,A)),POINTDOT,COLORYELLOW,LINETHICK3;L21:IF(A=0,H,REF(H,A)),POINTDOT,COLORRED,LINETHICK2;DX:=EMA(C,4);LB:=DYNAINFO(17);AQQ:=(REF(C,REF(HHVBARS(V,6),1)+1)>REF(O,REF(HHVBARS(V,6),1)+1)AND C>OOR (C>O AND V=HHV(V,7))) AND SM>REF(SM,1)AND (MACD>REF(MACD,1)OR DIFF>REF(DIFF,1))AND (K>REF(K,1)OR K>D)AND COUNT(H>REF(L,1),4)=4;大阴:=H>HHV(REF(H,1),9) AND V>HHV(REF(V,1),9)AND (C<O OR C<REF(C,1)); VOL5:=MA(V,5);VOL63:=MA(V,63);SLB:=C>REF(C,1) AND C=H AND C>O AND C/REF(C,3)>1.3;XSB:=C>REF(C,1) AND C=H AND C/REF(C,3)>1.2 ANDCOUNT(C/REF(C,1)>1.095,4)>2;DRAWICON(L<ZX AND ZX>REF(ZX,1)AND SM>REF(SM,1)AND QS>REF(QS,1) AND C>SM AND C>QS AND QS/ZX<1.02 AND SM/ZX<1.02AND SM>ZX AND QS>ZX AND GEGE>REF(GEGE,1)AND REF(K,1)>REF(D,1) AND (O<SM OR O<QS),L*0.99,1);DRAWTEXT( (K>75 OR REF(K,1)>80) AND ((REF(J,1)>80 AND J<REF(J,1)AND H>REF(H,1) AND J<97 AND O>L AND L<REF(C,1))OR (H>REF(H,1)AND J<REF(J,1) AND REF(J,1)>100 AND L<H AND H>C))OR (O>REF(EMA(C,4),1)AND H/O<1.002 AND H/L>1.005 AND C<H),H*1.005,'止'),COLORYELLOW,LINETHICK5;DRAWTEXT(J>REF(J,1) AND (O<MA(C,5)OR O<SM) AND C>EMA(C,40) ANDL<MA(C,5) AND C>QS AND C>REF(C,5AND REF(J,1)>REF(J,2) AND SM>QS) OR (CROSS(J,K) AND C>O AND C>QS AND SM>QS)AND O<MA1 ,L,'上车'),COLORRED,LINETHICK5;DRAWTEXT(MACD>REF(MACD,1) AND K>REF(K,1) AND O<DX AND C>O AND DIFF>0 AND (L<SM OR L<QS) AND MACD>0 AND K>D AND O<REF(QS,1) ANDL<REF(DX,1) AND L<SMAND (O/L<1.003 OR O<SM) AND REF(L,1)>REF(SM,1) ,L*0.95,'咪咪'),COLORYELLOW,LINETHICK5;DRAWTEXT(大阴,O,'大阴'),COLORYELLOW,LINETHICK5;DRAWTEXT(COUNT(REF(ZT,1),3)>0 AND O/L<1.004 AND COUNT(H/O>1.003,3)=3 AND REF(VOL5,1)>REF(VOL63,1) AND C>O AND (REF(C,1)-REF(L,1)>0.02 ORL<SM) AND (LB>1.5 OR V/REF(VOL5,1)>1.5 AND O<DX OR (LB>2 ORV/REF(VOL5,1)>2) OR ZT) AND (L<=REF(H,1) OR O-L<0.03) AND (REF(大阴,1)=0 OR O<REF(L,1)),L*0.99,'孙工'),COLORYELLOW,LINETHICK5;DRAWTEXT(CLOSE>MA(C,20) AND MA(C,20)>MA(C,60) AND O/REF(C,1)<0.95 AND C/O>1.03 AND C>REF(C,5) AND O<MA(C,5) AND REF(L,1)<REF(DX,1),L*0.98,'吃货'),COLORYELLOW,LINETHICK5;DRAWTEXT(COUNT(XSB,15)>0 AND L<SM AND (J>REF(J,1)OR O=L) ANDSM>REF(SM,1) AND (H>DX OR REF(O,1)/REF(L,1)<1.005 OR (O=L AND O<SM AND C>SM)) AND (REF(H,1)>REF(DX,1) OR (DX>REF(DX,1)AND C>DX AND O<SM AND C>SM)) AND (REF(SM,1)>REF(SM,2)OR K>REF(K,1)OR (DX>REF(DX,1)AND C>DX AND O<SM AND C>SM))AND (O<REF(DX,1) AND O<REF(C,1) AND (O<REF(O,1)OR REF(O,1)=REF(L,1))OR O<SM) AND (REF(C,1)>REF(L,1) OR O<REF(L,1)) AND(REF(SM,1)*1.001>REF(SM,2)OR REF(ZX,1)>REF(ZX,2)) AND (K>D ORO=L) ,L*0.98,'高鱼'),COLORYELLOW,LINETHICK5;。
绝无仅有主图通达信指标公式源码
{《绝无仅有》主图指标源码}{DRAWGBK(C>0,RGB(0,80,100),RGB(00,50,120),0,' ',0);}DPZX:=EMA(C,1),NODRAW;GGZX:=AMOUNT/V/100;重心:=IF(C<300,GGZX,DPZX),NODRAW;今重心:LLV(重心,2)COLORGREEN,NODRAW;ZC1:=CONST(LLV(重心,2));ZC2:=CONST(LLV(重心,4));VAR1:=(C+H+O+L)/4;卖出:=XMA(VAR1,20)*(1+80/1000),POINTDOT,COLORGREEN,LINETHICK3;买入:=XMA(VAR1,32)*(1-100/1000),POINTDOT,COLORMAGENTA,LINETHICK3;多空趋势彩带:DRAWBAND(SMA(C,6.5,1),RGB(255,97,0),SMA(C,13.5,1),RGB(0,128,0)); MA5:=MA(C,5),COLOR000099;MA10:=MA(C,10),COLOR006600;MA20:=MA(C,20),COLOR005555;ZB1:=EMA(C,34);长期趋势:EMA(ZB1,13),COLORRED,LINETHICK3;SQX:=(C-MA(CLOSE,13))*100;DIFF:=EMA(MA(SQX,7),1),COLORWHITE;DEA:=EMA(DIFF,7),COLORYELLOW;MACD:=(DIFF-DEA)*2,COLORSTICK;奉献理想专用:IF((CROSS(DIFF,DEA) ANDDIFF<-0.1) ,L*0.98,DRAWNULL),COLORMAGENTA,LINETHICK9,CROSSDOT;VAR10B:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);VAR11B:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) ANDREF(ZIG(3,6),2)<=REF(ZIG(3,6),3);VAR12B:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);VAR13B:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);VAR14B:=ZIG(3,22)<REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);VAR15B:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);VAR16B:=ZIG(3,51)<REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)>=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);VAR17B:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);VAR18B:=ZIG(3,72)<REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)>=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);VAR19B:=EMA(CLOSE,2)-EMA(CLOSE,150);买1B:=VAR10B;买2B:=(VAR11B+VAR13B+VAR15B+VAR17B);BB:=IF(买1B>0 OR 买2B>0 ,LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW;红买绿卖:IF(CROSS(BB,买1B),LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK5,COLORWHITE;FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);TTJ:=CROSS(FF,MA15);上:=EMA(C,3),COLORBLUE,LINETHICK1;中:=EMA(C,5),COLORWHITE,LINETHICK1;下:=EMA(中,5),COLOR00FF00,LINETHICK1;QQ:= C<中;MM:=上>REF(上,1) AND REF(上,1)<REF(上,2) ;V1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);V2:=(1-7/100)*(DMA(CLOSE,V1));V3:=(1+7/100)*(DMA(CLOSE,V1));V5:=MA((LOW+HIGH+CLOSE)/3,5);MA1Q:=MEMA(CLOSE,5);MA2Q:=ATAN((MA1Q/REF(MA1Q,1)-1)*100)*180/3.1416;MA3Q:=IF(MA2Q>0,MA2Q,MA2Q);MA5Q:=MA(CLOSE,5),COLOR888899;MA13:=MA(CLOSE,13),COLORFF00F0,LINETHICK2;VAR01:=CLOSE=HHV(C,4) AND (REF(C,1)>=REF(C,2) OR REF(C,1)>=REF(C,3)) OR REF(C,1)=HHV(C,4) AND CLOSE>=REF(C,2) OR REF(C,2)=HHV(C,4) AND REF(C,3)=LLV(C,4) AND C>=REF(C,1) OR REF(C,3)=HHV(C,4) ANDC>=REF(C,1) AND C>=REF(C,2);VAR02:=CLOSE=HHV(C,4) AND REF(C,1)=LLV(C,4);VAR03:=CLOSE=LLV(C,4) AND (REF(C,1)<REF(C,2) OR REF(C,1)<REF(C,3)) OR REF(C,1)=LLV(C,4) AND C<REF(C,2) OR REF(C,2)=LLV(C,4) ANDREF(C,1)=HHV(C,4) AND C<REF(C,1) OR REF(C,3)=LLV(C,4) ANDC<REF(C,1) AND C<REF(C,2);VAR04:=REF(C,1)=LLV(C,4) AND C>=REF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)<=REF(C,3) AND REF(C,2)<REF(C,4) AND C>=REF(C,1);VAR05:=REF(C,1)=HHV(C,4) AND C<REF(C,2) OR (REF(C,2)=HHV(C,4) AND REF(C,1)>REF(C,3) OR REF(C,3)=HHV(C,4) AND REF(C,1)>REF(C,2)) ANDREF(C,2)>=REF(C,4) AND C<REF(C,1);VAR06:=V5>REF(V5,1) AND REF(V5,1)<REF(V5,2);VAR07:=LOW<HHV(V5,13) AND HIGH>HHV(V5,13) AND CLOSE>REF(C,1) AND CLOSE>OPEN;VAR08:=VAR07 AND COUNT(VAR06,2);VAR09:=100*EMA(EMA(C-REF(C,1),6),6)/EMA(EMA(ABS(C-REF(C,1)),6),6);VAR10:=EMA(MA(C,13),13);VAR11:=FILTER((LLV(VAR09,2)=LLV(VAR09,7) AND COUNT(VAR09<0,2) AND CROSS(VAR09,MA(VAR09,2)))=1,5);VAR12:=FILTER((HHV(VAR09,2)=HHV(VAR09,7) AND COUNT(VAR09>50,2) AND CROSS(MA(VAR09,2),VAR09))=1,1);VAR13:=SMA(EMA((C-REF(C,1))/REF(C,1),5)*100,3,1)*10;VAR14:=FILTER(((CROSS(VAR13,0) OR CROSS(C,VAR10)) AND VAR11)=1,3); VAR15:=MA(C,18)>=REF(MA(C,18),3) AND CROSS(C,MA(C,18));VAR16:=VAR08 AND NOT(REF(VAR08,1));RSVQ:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSVQ,3,1);D:=SMA(K,3,1);J:=3*K-2*D;金叉:=CROSS(J,D);死叉:=CROSS(D,J);买1:=(VAR14 OR VAR15) AND VAR11;买2:=(VAR14 OR VAR15) AND VAR04;买3:=(VAR14 OR VAR15) AND VAR02;买4:=(VAR02 AND VAR11) OR (VAR04 AND VAR11);买5:=(金叉AND VAR04) OR (金叉AND VAR02) OR (金叉AND VAR11);TTJ0:=VAR16;TTJ1:=买1 OR 买2 OR 买3 OR 买4 OR 买5 AND MM;XG0:=TTJ AND TTJ0;XG1:=TTJ AND TTJ1;XG11:=XG0 OR XG1;PL5:=ZIG(3,5);EN1:=ZIG(3,5)>REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)<=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)<=REF(ZIG(3,5),3);EX1:=ZIG(3,5)<REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)>=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)>=REF(ZIG(3,5),3);PL10:=ZIG(3,10);EN2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)<=REF(ZIG(3,10),3);EX2:=ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)>=REF(ZIG(3,10),3);PL20:=ZIG(3,20);EN3:=ZIG(3,20)>REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)<=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)<=REF(ZIG(3,20),3);EX3:=ZIG(3,20)<REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)>=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)>=REF(ZIG(3,20),3);PL40:=ZIG(3,40);走强1:=BARSLAST(PL5<REF(PL5,1));走弱1:=BARSLAST(PL5>REF(PL5,1));走强2:=BARSLAST(PL10<REF(PL10,1));走弱2:=BARSLAST(PL10>REF(PL10,1));走强3:=BARSLAST(PL20<REF(PL20,1));走弱3:=BARSLAST(PL20>REF(PL20,1));ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0);DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0);TJ11:=EN2 AND ZTJZ5=1;TJ22:=EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2;TJ33:=EN2 AND DTJZ10=1;TJ44:=EN3 AND ZTJZ10=1;TJ55:=EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2;XG22:=TJ11 OR TJ22 OR TJ33 OR TJ44 OR TJ55;XGQ:=XG11 OR XG22;放心买:XGQ,COLORRED,NODRAW;DRAWTEXT(XGQ,L*0.99,'●放心买'),COLORRED;MA1:=MA(C,5);MA2:=MA(C,10);MA3:=MA(C,21);破N:=REF(MA1,1)<REF(MA2,1)AND MA2>REF(MA2,1);试摸N:=C>MA(C,10) OR H>=MA2;再上N:=C>O AND REF(C,1)< MA(C,10) AND 试摸N AND 破N AND MA(C,21)<MA(C,10); 有行情:=再上N AND (CROSS(C,长期趋势) OR CROSS(L,长期趋势) OR CROSS(H,长期趋势));DRAWTEXT(有行情,LOW*0.98,'●'),COLORGREEN;VAR1MZ:=((CLOSE > REF(CLOSE,1)) AND (CLOSE > REF(CLOSE,2)));VAR2MZ:=((REF(VAR1MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >=REF(CLOSE,2)));VAR3MZ:=((REF(VAR2MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <=REF(CLOSE,2)));VAR4MZ:=((REF(VAR3MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >=REF(CLOSE,2)));VAR5MZ:=((REF(VAR4MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <=REF(CLOSE,2)));VAR6MZ:=((REF(VAR5MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >=REF(CLOSE,2)));VAR7MZ:=((REF(VAR6MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <=REF(CLOSE,2)));VAR8MZ:=((REF(VAR7MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >=REF(CLOSE,2)));VAR9MZ:=((REF(VAR8MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <=REF(CLOSE,2)));VARAMZ:=((REF(VAR9MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >=REF(CLOSE,2)));VARBMZ:=((REF(VARAMZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <=REF(CLOSE,2)));VARCMZ:=((REF(VARBMZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >=REF(CLOSE,2)));{红K}STICKLINE((((((((((((VAR1MZ OR VAR2MZ) OR VAR3MZ) OR VAR4MZ) OR VAR5MZ) OR VAR6MZ) OR VAR7MZ) OR VAR8MZ) OR VAR9MZ) OR VARAMZ) OR VARBMZ) OR VARCMZ),C,O,3,0),COLOR000099;STICKLINE((((((((((((VAR1MZ OR VAR2MZ) OR VAR3MZ) OR VAR4MZ) OR VAR5MZ) OR VAR6MZ) OR VAR7MZ) OR VAR8MZ) OR VAR9MZ) OR VARAMZ) OR VARBMZ) OR VARCMZ),C,O,2,0),COLOR0000BB;STICKLINE((((((((((((VAR1MZ OR VAR2MZ) OR VAR3MZ) OR VAR4MZ) OR VAR5MZ) OR VAR6MZ) OR VAR7MZ) OR VAR8MZ) OR VAR9MZ) OR VARAMZ) OR VARBMZ) OR VARCMZ),C,O,1,0),COLOR0000DD;VARDMZ:=((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,2)));VAREMZ:=((REF(VARDMZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <=REF(CLOSE,2)));VARFMZ:=((REF(VAREMZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >=REF(CLOSE,2)));VAR10MZ:=((REF(VARFMZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <=REF(CLOSE,2)));VAR11MZ:=((REF(VAR10MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >=REF(CLOSE,2)));VAR12MZ:=((REF(VAR11MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <=REF(CLOSE,2)));VAR13MZ:=((REF(VAR12MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >=REF(CLOSE,2)));VAR14MZ:=((REF(VAR13MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <=REF(CLOSE,2)));VAR15MZ:=((REF(VAR14MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >=REF(CLOSE,2)));VAR16MZ:=((REF(VAR15MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <=REF(CLOSE,2)));VAR17MZ:=((REF(VAR16MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >=REF(CLOSE,2)));VAR18MZ:=((REF(VAR17MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <=REF(CLOSE,2)));{绿K}STICKLINE((((((((((((VARDMZ OR VAREMZ) OR VARFMZ) OR VAR10MZ) OR VAR11MZ) OR VAR12MZ) OR VAR13MZ) OR VAR14MZ) OR VAR15MZ) OR VAR16MZ) OR VAR17MZ) OR VAR18MZ),C,O,3 ,0 ),COLOR00BB00;STICKLINE((((((((((((VARDMZ OR VAREMZ) OR VARFMZ) OR VAR10MZ) OR VAR11MZ) OR VAR12MZ) OR VAR13MZ) OR VAR14MZ) OR VAR15MZ) OR VAR16MZ) OR VAR17MZ) ORVAR18MZ),C,O,2 ,0 ),COLOR00DD00;STICKLINE((((((((((((VARDMZ OR VAREMZ) OR VARFMZ) OR VAR10MZ) OR VAR11MZ) OR VAR12MZ) OR VAR13MZ) OR VAR14MZ) OR VAR15MZ) OR VAR16MZ) OR VAR17MZ) OR VAR18MZ),C,O,1,0 ),COLOR00FF00;VAR19MZ:=(REF((((((((((((VARDMZ OR VAREMZ) OR VARFMZ) OR VAR10MZ) ORVAR11MZ) OR VAR12MZ) OR VAR13MZ) OR VAR14MZ) OR VAR15MZ) OR VAR16MZ) OR VAR17MZ) OR VAR18MZ),1) AND VAR1MZ);VAR1AMZ:=(REF((((((((((((VAR1MZ OR VAR2MZ) OR VAR3MZ) OR VAR4MZ) OR VAR5MZ) OR VAR6MZ) OR VAR7MZ) OR VAR8MZ) OR VAR9MZ) OR VARAMZ) OR VARBMZ) OR VARCMZ),1) AND VARDMZ);{粉红}CAX:=MAX(REF(CLOSE,2),REF(CLOSE,1));STICKLINE(VAR19MZ,CAX,O,3 ,0 ),COLORBB11BB;STICKLINE(VAR19MZ,CAX,O,2 ,0 ),COLORDD44DD;STICKLINE(VAR19MZ,CAX,O,1 ,0 ),COLORFF66FF;{黄色}CIN:=MIN(REF(CLOSE,2),REF(CLOSE,1));STICKLINE(VAR1AMZ,CIN,O,3,0),COLOR00AAFF;STICKLINE(VAR1AMZ,CIN,O,2,0),COLOR00CCFF;STICKLINE(VAR1AMZ,CIN,O,1,0),COLOR00EEFF;牛节点:=CROSS(EMA(C,5),EMA(C,30))AND CROSS(EMA(C,10),EMA(C,20)); DRAWICON(牛节点,L*0.99,13);CSAR:=SAR(10,2,20);持股:=IF(CSAR<=L,CSAR,0),CIRCLEDOT,COLORRED{持股};短期趋势:=EMA(SLOPE(C,21)*20+C,42),POINTDOT,LINETHICK1,COLORYELLOW; STICKLINE(1,短期趋势,短期趋势,1,0),COLORYELLOW;止损:=EMA(C,5),COLORYELLOW,LINETHICK1;菩提B:=XMA(H,20);参买:=IF(止损>=REF(止损,1),止损,DRAWNULL),LINETHICK2,COLORRED; DRAWICON(CROSS(L,CSAR) AND 参买>0 AND H<菩提B AND 持股>0AND H>长期趋势,(LOW*0.99),5);VVAR1D:=((((OPEN + LOW) + HIGH) + CLOSE) / 4);短底:=EMA(VVAR1D,5);支撑:=HHV(短底,60);MAN:=(SMA(HIGH,21,2) * 1.05);下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100);中D:=(((((3 * CLOSE) + HIGH) + LOW) + OPEN) / 6);X1D:=EMA(中D,10);RSVD:=SMA(下档线,3,1);K大:=SMA(RSVD,3,1);D大:=((3 * RSVD) - (2 * K大));J12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);RSV24:=SMA(J12,3,1);K24:=SMA(RSV24,3,1);D24:=((3 * RSV24) - (2 * K24));压力位:=IF(CROSS(D24,D大),HIGH,REF(HIGH,BARSLAST(CROSS(D24,D大)))),COLORFFFFFF;牛浮面:=CROSS(CLOSE,MA20) AND HIGH < 压力位AND OPEN < MA20AND HIGH < 支撑AND MAN - REF(MAN,1) > 0 AND X1D - REF(X1D,1)>0 ANDD大< 63 AND MA20 - REF(MA20,1) > 0,COLORWHITE;DRAWTEXT(牛浮面,L,'●牛浮面'),COLORWHITE;全绿K2:=C>卖出OR (H>卖出AND O>C);STICKLINE(全绿K2,C,O,3,0),COLOR00BB00;STICKLINE(全绿K2,C,O,2,0),COLOR00DD00;STICKLINE(全绿K2,C,O,1,0),COLOR00FF00;STICKLINE(C>=O,C,H,0,0),COLOR0000FF;STICKLINE(C>=O,O,L,0,0),COLOR0000FF;STICKLINE(C<O,O,H,0,0),COLOR00FF00;STICKLINE(C<O,C,L,0,0),COLOR00FF00;{关键价位&支撑}STICKLINE(ISLASTBAR,ZC1,ZC1,120,0),LINETHICK1,COLORGREEN;DRAWTEXT(CURRBARSCOUNT=15,ZC1*1.02,'关键价位'),COLORGREEN; DRAWNUMBER(ISLASTBAR,ZC1*1.02,ZC1+000),COLORGREEN;STICKLINE(ISLASTBAR,ZC2,ZC2,120,0),LINETHICK1,COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=15,ZC2*0.99,'支撑价位'),COLORYELLOW; DRAWNUMBER(ISLASTBAR,ZC2*0.99,ZC2+000),COLORYELLOW;决策:=IF(ISLASTBAR,压力位,DRAWNULL),COLORMAGENTA;STICKLINE(ISLASTBAR ,决策,决策,60,1),LINETHICK3,COLORFFFFFF;底部:=LLV(HIGH,30),COLOR00FF00;超跌:=IF(ISLASTBAR,底部,DRAWNULL),COLORRED;STICKLINE(ISLASTBAR ,超跌,超跌,60,1),LINETHICK3,COLORRED;STICKLINE(ISLASTBAR,REF(今重心,1),REF(今重心,1),10,0),COLORGREEN;T1:=IF(FINDSTR(EXTERNSTR(0,13),'万元'),STRCAT('敢死队席位:',EXTERNSTR(0,13)),''); T2:=IF(FINDSTR(EXTERNSTR(0,12),'。
通达信操盘专用系统主图指标(源码附图)
通达信操盘专用系统主图指标(源码附图)通达信操盘专用系统主图指标(源码附图)喜欢的朋友可以下载学习。
参数:显示仪表盘1 0 1 1短线5日:EMA(C,5),COLOR00FF00,LINETHICK1;红升5:IF(短线5日>REF(短线5日,1),短线5日,DRAWNULL),COLORFFFFFF,LINETHICK2;绿降5:IF(短线5日<REF(短线5日,1),短线5日,DRAWNULL)DOTLINE,COLORFFFFFF,LINETHICK1;短线13日:EMA(C,13),COLOR00FF00,LINETHICK1;升:IF(短线13日>REF(短线13日,1),短线13日,DRAWNULL),COLOR00E8E8,LINETHICK2;降:IF(短线13日<REF(短线13日,1),短线13日,DRAWNULL)DOTLINE,COLOR00FFFF,LINETHICK1;操作线21日:EMA(C,21),COLOR00FF00,LINETHICK1;红升:IF(操作线21日>REF(操作线21日,1),操作线21日,DRAWNULL),COLOR0000FF,LINETHICK3;绿降:IF(操作线21日<REF(操作线21日,1),操作线21日,DRAWNULL)DOTLINE,COLOR00FF00,LINETHICK3;生命线62日:EMA(C,62),COLORYELLOW,LINETHICK1,NODRAW;红升4:IF(生命线62日>REF(生命线62日,1),生命线62日,DRAWNULL),COLORFF00FF,LINETHICK2;绿降4:IF(生命线62日<REF(生命线62日,1),生命线62日,DRAWNULL),COLORFF00FF,DOTLINE;趋势线半年:EMA(C,120),COLORYELLOW,LINETHICK1,NODRAW;半年红升:IF(趋势线半年>REF(趋势线半年,1),趋势线半年,DRAWNULL)POINTDOT,COLOR0000BF,LINETHICK4;半年绿降:IF(趋势线半年<REF(趋势线半年,1),趋势线半年,DRAWNULL),COLOR0000BF,POINTDOT;年线:EMA(C,250),COLORYELLOW,LINETHICK1,NODRAW;年红升:IF(年线>REF(年线,1),年线,DRAWNULL),COLORFF0000,LINETHICK1;年绿降:IF(年线<REF(年线,1),年线,DRAWNULL),COLORFF0000,DOTLINE,LINETHICK1;R1:=(C+L+H)/3;R2:=EMA(R1,6);R3:=EMA(R2,5);N:=5;M1:=6;M2:=6;M3:=8;R:=IF(DATE<1910612,1,0);EE:=(H+MAX(C,O))/2;EE1:=MA(EE,3);EE2:=(L+MIN(C,O))/2;EE3:=MA(EE2,3);超短线3日:MA(EE,3),COLOR00FF00;红升1:IF(超短线3日>REF(超短线3日,1),超短线3日,DRAWNULL),COLOR8EB3FF,LINETHICK2;绿降1:IF(超短线3日<REF(超短线3日,1),超短线3日,DRAWNULL),COLOR8EB3FF,LINETHICK1,DOTLINE;FF:=(H+L+C+O)/4,COLORWHITE;FF1:=MA(FF,3),COLORGREEN;FF3:=REF((C+O)/2,1)>REF((C+O)/2,2) AND REF(MIN(C,O),1)>REF(MAX(C,O),2);实际乖离:=(MAX(FF,FF1)-MIN(FF,FF1))/MIN(FF,FF1)*100,LINETHICK;FF4:=(((FF1-(REF(FF1,1)-FF1))-L)/L)*100;FF5:=(((EE1+(EE1-REF(EE1,1)))-L)/L)*100;FF6:=FF1-(REF(FF1,1)-FF1);FF7:=EE1+(EE1-REF(EE1,1));期望获利率:=IF(FF3,FF5,FF4),LINETHICK;YY1:=REF(EVERY(C>=O,4),1) AND REF(EVERY((C+O)/2>FF1,4),1) AND (C+O)/2<FF1;YY2:=NOT(YY1) AND (FF1-O)/O*1000>5 AND O<REF(MIN(C,O),1);A:=SMA(L,4,3);B:=SMA(H,4,3);BB:=SMA(MIN(C,O),4,3);BB1:=REF(L,1)-HHV((MAX(REF(L,2),REF(L,1))-MIN(REF(L,2),REF(L,1))),2);BB2:=REF((C+O)/2,1)>REF((C+O)/2,2);BB3:=L<=BB1+BB1*0.01 AND O>REF(O,2) AND O>=REF(L,3) AND COUNT(C>O,7)>3;BB6:=(BB1-L)/L*100;BB7:=(REF(L,1)-BB1)/BB1*100;A1:=(A-L)/L>N/1000 ;A8:=A1;A9:=(REF(H,1)-O)/O*100-(REF(MAX(C,O),2)-REF(MAX(C,O),1))/REF(MAX(C,O),1)*100;A10:=IF(BB2,BB6,A9);BB4:=BB6+A10>2;BB5:=IF(BB2,BB3,BB4) AND 期望获利率>2;D5:=R AND A8 AND BB5;STICKLINE(D5,A*0.995,A*0.992,3,0)COLOR00FFFF;DRAWICON(R AND (REF((D5),1)) AND (L<REF((L/0.995),1)),L*0.97,23);STICKLINE(C>=O,C,O,3.4,0),COLOR0000AA;STICKLINE(C>=O,C,O,3.0,0),COLOR0000BB ;STICKLINE(C>=O,C,O,2.4,0),COLOR0000CC;STICKLINE(C>=O,C,O,2.0,0),COLOR0000DD ;STICKLINE(C>=O,C,O,1.6,0),COLOR0000EE;STICKLINE(C>=O,C,O,1.2,0),COLOR0000FF;STICKLINE(C>=O,C,O,0.6,0),COLOR0000FF;STICKLINE(C>=O,H,L,0,0),COLORRED;STICKLINE(C<=O,C,O,3.4,0),COLORAAAA00;STICKLINE(C<=O,C,O,3.0,0),COLORBBBB00;STICKLINE(C<=O,C,O,2.4,0),COLORCCCC00;STICKLINE(C<=O,C,O,2.0,0),COLORDDDD00;STICKLINE(C<=O,C,O,1.6,0),COLOREEEE00;STICKLINE(C<=O,C,O,1.2,0),COLORFFFF00;STICKLINE(C<=O,C,O,0.6,0),COLORFFFF00;STICKLINE(C<=O,H,L,0,0),COLORFFFF00;{====================================== ================}范围高A:=REFDATE(HHV(H,120),DATE)*1.05;范围低A:=REFDATE(LLV(L,120),DATE)*0.95;MA5:=MA(C,5),COLORCYAN,LINETHICK2;MA24:=MA(C,24),COLORGREEN,LINETHICK2;MA72:=MA(C,72),COLORRED,LINETHICK2;MA200:=IF((MA(C,200)<=范围高A AND MA(C,200)>=范围低A) OR C>=MA(C,200),MA(C,200),DRAWNULL),COLORBLUE,LINETHICK2;{=======================仪表盘=========================}主升浪:=ISLASTBAR AND MA5>MA24 AND MA24>MA72 AND MA72>IF(MA200=DRAWNULL,0,MA200);主浪回调:=ISLASTBAR AND MA24>MA5 AND MA5>MA72 AND MA72>IF(MA200=DRAWNULL,0,MA200);主浪深调:=ISLASTBAR AND MA24>MA72 AND MA72>MA5 AND MA5>IF(MA200=DRAWNULL,0,MA200);初升浪:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MAX(MA24,MA72) AND MA5>MA24 AND MA24>MA72;底部反弹:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MA72 AND MA72>MA24 AND MA5>MA24;探底阶段:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MA72 AND MA72>MA24 AND MA24>MA5;观望:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24>MA72 AND C<MA72,MA72>MA200 AND C<MA200);有牛:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24<MA72 AND C>=MA72,MA72<MA200 AND C>=MA200);放弃:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24<MA72 AND C<MA72,MA72<MA200 AND C<MA200);DRAWGBK(显示仪表盘1=1 AND 主升浪=0 AND 主浪回调=0 AND 主浪深调=0 AND 初升浪=0 AND 底部反弹=0 AND 探底阶段=0 AND 观望=0 AND 有牛=0 AND 放弃=0,0,0,0,'观望',0)COLOR00BF00;DRAWGBK(显示仪表盘1=1 AND 主升浪,0,0,0,'主升浪',0)COLORFF00FF;DRAWGBK(显示仪表盘1=1 AND 主浪回调,0,0,0,'主浪回调',0)COLORFF8080;DRAWGBK(显示仪表盘1=1 AND 主浪深调,0,0,0,'主浪深调',0)COLOR009500;DRAWGBK(显示仪表盘1=1 AND 初升浪,0,0,0,'初升浪',0)COLOR00FFFF;DRAWGBK(显示仪表盘1=1 AND 底部反弹,0,0,0,'底部反弹',0)COLORFFFF00;DRAWGBK(显示仪表盘1=1 AND 探底阶段,0,0,0,'探底阶段',0);DRAWGBK(显示仪表盘1=1 AND 观望,0,0,0,'观望',0)COLORFFFF00;DRAWGBK(显示仪表盘1=1 AND 有牛,0,0,0,'有牛',0)COLOR00FFFF;DRAWGBK(显示仪表盘1=1 AND 放弃,0,0,0,'放弃',0)COLOR00BF00;引差:=REF(C,1)-LOW,LINETHICK1,NODRAW;引跌幅:IF((REF(C,1)-LOW)/REF(C,1)*100>0,(REF(C,1)-LOW)/REF(C,1)*100,0),LINETHICK1,NODRAW;三日均跌:MA(引跌幅,3),COLORWHITE,NODRAW;今最高:HIGH,LINETHICK1,COLORRED,NODRAW;今最低:LOW,LINETHICK1,COLORGREEN,NODRAW;Z0T:=C/REF(C,1)>1.097;XH:=FILTER(Z0T,13);BH:=BARSLAST(Z0T);CZ:=REF(H,BH)-REF(L,BH);STICKLINE(Z0T,REF(O,BH),REF(C,BH),5,0),COLORYELLOW;DRAWTEXT(Z0T,L*0.98,'★涨停'),COLORFFFFFF;AAA:=CONST(HHV(H,50));PL5:=HHV(H,45);F:=100*(C-REF(C,1))/REF(C,1);博尔:=IF(C<REF(O,1) AND F<0,1,0);P1:=博尔;量化:=IF(C<REF(O,2) AND F<0,1,0);P2:=量化;STICKLINE(P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1,OPEN,CLOSE,3,0),COLORFF09FF;ME2:=EMA(CLOSE,6);五天:=EXPMA(CLOSE,5),COLORRED;超短线:=EMA(ME2,11),COLORGREEN; LJL07:=(3*C+L+O+H)/6;牛线:=(20*LJL07+19*REF(LJL07,1)+18*REF(LJL07,2)+17*REF(LJL07, 3)+16*REF(LJL07,4)+15*REF(LJL07,5)+14*REF(LJL07,6)+13*REF(L JL07,7)+12*REF(LJL07,8)+11*REF(LJL07,9)+10*REF(LJL07,10)+9* REF(LJL07,11)+8*REF(LJL07,12)+7*REF(LJL07,13)+6*REF(LJL07,1 4)+5*REF(LJL07,15)+4*REF(LJL07,16)+3*REF(LJL07,17)+2*REF(LJ L07,18)+REF(LJL07,20))/210,COLORRED;熊线:=MA(牛线,5),COLORYELLOW,LINETHICK4,POINTDOT;持股:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24 ))/4,COLORWHITE;{趋势}赚了:=IF(EMA(CLOSE,3)>超短线,超短线,DRAWNULL),COLORRED;持股角度:=ATAN((持股/REF(持股,1)-1)*100)*180/3.1416,COLORRED,NODRAW;月线:=EMA(持股,30),COLORYELLOW,DOTLINE;双月线:=EMA(持股,60),COLORCYAN,DOTLINE;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ('DMI.PDI'>'DMI.MDI') AND UPNDAY('DMI.ADXR',1) AND ('DMI.ADX'>'DMI.ADXR'),0.460,0.26,0,'DMI 火箭升空'),COLOR8080FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ('DMI.PDI'<'DMI.MDI') AND UPNDAY('DMI.ADXR',1) AND ('DMI.ADX'>'DMI.ADXR'),0.460,0.26,0,'DMI 空中炸弹'),COLORGREEN;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ('DMI.PDI'>'DMI.MDI'),0.460,0.21,0,'DMI 多头趋势'),COLOR8080FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ('DMI.PDI'<'DMI.MDI'),0.460,0.21,0,'DMI 空头趋势'),COLORGREEN;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND CROSS('KDJ.J','KDJ.K'),0.460,0.31,0,'K D J 金叉'),COLOR8080FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND CROSS('KDJ.K','KDJ.J'),0.460,0.31,0,'K D J 死叉'),COLORGREEN;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ('KDJ.J'>'KDJ.K'),0.460,0.36,0,'K D J 多头趋势'),COLOR8080FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ('KDJ.J'<'KDJ.K'),0.460,0.36,0,'K D J 空头趋势'),COLORGREEN;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ('MACD.DIF'>'MACD.DEA') AND 'MACD.MACD'>0,0.460,0.41,0,'MACD 中线看多'),COLOR8080FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ('MACD.DIF'<'MACD.DEA') AND 'MACD.MACD'<0,0.460,0.41,0,'MACD 中线看空'),COLORGREEN;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ('MACD.DIF'>'MACD.DEA'),0.460,0.46,0,'MACD 多头趋势'),COLOR8080FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ('MACD.DIF'<'MACD.DEA'),0.460,0.46,0,'MACD 空头趋势'),COLORGREEN;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND CROSS('MACD.DIF','MACD.DEA'),0.460,0.51,0,'MACD 金叉'),COLOR8080FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 ANDCROSS('MACD.DEA','MACD.DIF'),0.460,0.51,0,'MACD 死叉'),COLORGREEN;上涨:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND UPNDAY(月线,1) AND UPNDAY(超短线,1) AND UPNDAY(持股,1);DRAWTEXT_FIX(CURRBARSCOUNT=1 AND 上涨,0.460,0.15,0,'上涨趋势'),COLORFF00FF;短线上涨:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND UPNDAY(月线,1) AND DOWNNDAY(超短线,1) AND UPNDAY(持股,1);短线上涨0:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND DOWNNDAY(月线,1) AND DOWNNDAY(超短线,1) AND UPNDAY(持股,1);短线上涨1:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND DOWNNDAY(月线,1) AND UPNDAY(超短线,1) AND UPNDAY(持股,1);DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (短线上涨OR 短线上涨0 OR 短线上涨1),0.460,0.15,0,'短线上涨'),COLOR8080FF;短线回调:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND UPNDAY(月线,1) AND UPNDAY(超短线,1) AND DOWNNDAY(持股,1);短线回调0:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND DOWNNDAY(月线,1) AND UPNDAY(超短线,1) AND DOWNNDAY(持股,1);。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
MA(CLOSE,30))) AND (MA(CLOSE,30) > MA(CLOSE,60))); VARA:=(((CLOSE - MA(CLOSE,5)) / MA(CLOSE,5)) * 100); DRAWTEXT((((((VAR6 > (MA(VOL,5) * 2)) AND 短趋势线>REF(短趋势线 ,1)
AND (VAR6 >= VAR7)) AND (VAR6 >= VAR8)) AND (CLOSE > OPEN)) OR ((VOL > (MA(VOL,5) * 3)) AND VARB)) ,L*0.98,'主力介入'),COLORMAGENTA;
中短趋势主图指标 源码 通达信 短趋势线:MA(CLOSE,13),COLORRED,LINETHICK3; 中线:=MA(CLOSE,33),LINETHICK1; 中趋势线:MA(CLOSE,55),LINETHICK1,COLORGRAY; 年线:MA(CLOSE,250),LINETHICK1,COLORLIGRAY,POINTDOT; 涨:IF(短趋势线>REF(短趋势线,1),短趋势 线,DRAWNULL),COLORRED,LINETHICK3; 平:=IF(短趋势线=REF(短趋势线,1),短趋势 线,DRAWNULL),COLOR00FFFF,LINETHICK3; 跌:IF(短趋势线<REF(短趋势线,1),短趋势 线,DRAWNULL),COLORGREEN,LINETHICK3; 上极限:=((C-REF(MA(CLOSE,20),1))/20+短趋势线)*1.20; DRAWTEXT(CROSS(CLOSE,上极限),H*1.02,'减仓'),COLORGREEN; DRAWTEXT(CROSS(CLOSE,MA(C,13)) AND 短趋势线<REF(短趋势线 ,1) AND 短趋势线<中趋势线 ,H*1.02,'减仓'),COLORGREEN; DRAWTEXT(CROSS(短趋势线,C) AND INDEXC>MA(INDEXC,13) AND 短趋势 线>REF(短趋势线 ,1) AND V<REF(V,1) AND 短趋势线>中趋势线 ,L*0.97,'买 入'),COLORRED; STICKLINE(CROSS(短趋势线,C) AND 短趋势线>REF(短趋势线 ,1) AND V<REF(V,1) AND 短趋势线>中趋势线 ,L,L*0.99,2,0),COLORYELLV>REF(V,1) AND FILTER(VAR1<REF(VAR1,1),5),H*1.02,'减仓'),COLORGREEN; DRAWTEXT(VAR1>20 AND FILTER(VAR1<REF(VAR1,1),5),H*1.06,'卖出
'),COLORYELLOW; VAR2:=HHV(VAR1>20,10); DRAWTEXT(FILTER(VAR1<-9 AND VAR1>REF(VAR1,1),18) AND V>REF(V,1),L*0.98,'反弹'),COLORRED; DRAWTEXT(VAR1<-20 AND FILTER(VAR1> REF(VAR1,1),5),L*0.95,'抄底
VAR1:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/ MA(CLOSE,24)*100+(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100)/3; DRAWTEXT(VAR1>9 AND V<REF(V,1) AND FILTER(VAR1<REF(VAR1,1),5),H*1.02,'洗盘'),COLORYELLOW;
'),COLORYELLOW; DRAWTEXT(VAR2 AND CROSS((REF(HIGH,1)+REF(LOW,1))/2,MA(CLOSE,20)+2*STD(CLOSE,20)),H* 1.1,'危险'),COLORYELLOW;
VAR12:=(HIGH - LOW); VAR3:=ABS((OPEN - CLOSE)); VAR4:=(HIGH - IF((CLOSE > OPEN),CLOSE,OPEN)); VAR5:=(IF((CLOSE > OPEN),OPEN,CLOSE) - LOW); VAR6:=((VAR3 / VAR12) * VOL); VAR7:=((VAR4 / VAR12) * VOL); VAR8:=((VAR5 / VAR12) * VOL); VARB:=(((MA(CLOSE,5) > MA(CLOSE,10)) AND (MA(CLOSE,10) >