无未来傻瓜操作MACD,再不赚钱真的不要做股票了通达信指标公式源码
无未来 实战指标通达信指标公式源码
无未来实战指标VAR1:=BARSCOUNT(CLOSE);VAR2:=HHV(HIGH,200);VAR3:=LLV(LOW,200);VAR4:=(VAR2-VAR3)/40;VAR5:=HIGH+VAR4;STICKLINE(VAR1/30=FLOOR(VAR1/30),VAR5,VAR5+3*VAR4,8,0), COLOR0000FF; STICKLINE(VAR1/30=FLOOR(VAR1/30),VAR5,VAR5+2*VAR4,7,0), COLOR0000FF; VAR6:=1;VAR7:=REF(CLOSE-OPEN,2);VAR8:=REF(CLOSE,1);VAR9:=REF(CLOSE,2);VARA:=REF(CLOSE,3);VARB:=REF(CLOSE,4);VARC:=MAX(MAX(MAX(CLOSE,VAR8),VAR9),VARA);VARD:=MIN(MIN(MIN(CLOSE,VAR8),VAR9),VARA);红色持股: STICKLINE((CLOSE=VARC AND (VAR8>=VAR9 OR VAR8>=VARA)OR VAR8=VARC AND (VAR9=VARD OR VARA=VARD) ANDCLOSE>=VAR9 OR VAR9=VARC AND VARA=VARD AND CLOSE>=VAR8OR VARA=VARC AND CLOSE>=VAR8 ANDCLOSE>=VAR9)*VAR6,VAR8,CLOSE,5,1),COLORRED;品红变盘: STICKLINE((CLOSE=VARC ANDVAR8=VARD)*VAR6,VAR9,CLOSE,5,1),COLORYELLOW;黄色下跌: STICKLINE((CLOSE=VARD AND (VAR8<VAR9 OR VAR8<VARA) ORVAR8=VARD AND (VAR9=VARC OR VARA=VARC) AND CLOSE<VAR9 OR VAR9=VARD AND VARA=VARC AND CLOSE<VAR8 OR VARA=VARD AND CLOSE<VAR8 AND CLOSE<VAR9)*VAR6,VAR8,CLOSE,5,0),COLORYELLOW;绿色买: STICKLINE((VAR8=VARC ANDCLOSE=VARD)*VAR6,VAR9,CLOSE,5,0),COLORGREEN;STICKLINE((VAR8=VARD AND CLOSE>=VAR9 OR (VAR9=VARD AND VAR8<=VARA OR VARA=VARD AND VAR8<=VAR9) AND VAR9<VARB ANDCLOSE>=VAR8)*VAR6,VAR8,VAR9,5,0),COLORBLUE;兰色抛售: STICKLINE((VAR8=VARC AND CLOSE<VAR9 OR (VAR9=VARC ANDVAR8>VARA OR VARA=VARC AND VAR8>VAR9) AND VAR9>=VARB ANDCLOSE<VAR8)*VAR6,VAR8,VAR9,5,1),COLORBLUE;VARE:=SAR(5,1,5);VARF:=EMA(CLOSE,30);VAR10:=IF(CLOSE>450,8,IF(CLOSE>=20 AND CLOSE<150,0.2,IF(CLOSE<20 AND CLOSE>=10,0.07,IF(CLOSE<10,0.03,0.07))));变色龙: STICKLINE(CLOSE>VARE,VARF,VARF+VAR10,6,0),COLORWHITE; STICKLINE(CLOSE<VARE,VARF,VARF-VAR10,6,0), COLORCYAN ;STICKLINE(CROSS(CLOSE,VARE),VARF,VARF-VAR10,6,0)COLORMAGENTA; STICKLINE(CROSS(VARE,CLOSE)*VAR6,VARF,VARF+VAR10,6,0),COLORMAGENTA;STICKLINE((RANGE(DAY,6,9) ORRANGE(DAY,27,30))*VAR6,VARF+0.01,VARF-0.01,6,0),COLORMAGENTA; 生命线: FORCAST(CLOSE,30)*VAR6, CIRCLEDOT;支撑: MA(CLOSE,13)*0.955*VAR6;。
通达信指标公式源码强势选股 无未来
强势选股无未来DRAWGBK(CURRBARSCOUNT=1, RGB(110,108,108),RGB(88,30,0),0,'',0);A1:=CROSS("MACD.DIF","MACD.DEA");A2:=CROSS("KDJ.K","KDJ.D") AND "KDJ.K"<30;A3:="I"<-90 AND "I">-100;A4:=CROSS("RSI.RSI1","RSI.RSI2") AND "RSI.RSI1"<50;A5:=REF("WR.WR1",1)>90 AND "WR.WR1"<80;A6:=CROSS("BIAS.BIAS1",-3);A7:=REF("DMI.PDI",1)<REF("DMI.MDI",1) AND REF("DMI.PDI",1)<REF("DMI.ADX",1) AND REF("DMI.PDI",1)<REF("DMI.ADXR",1) AND "DMI.PDI">"DMI.MDI" AND "DMI.PDI">"DMI.ADX" AND "DMI.PDI">"DMI.ADXR";A8:=CROSS("MFI.MFI",20) AND REF("MFI.MFI",1)<20;MTM:=CLOSE-REF(CLOSE,12);MAMTM:=MA(MTM,6);A9:=CROSS(MTM,MAMTM);{OSC:=100*(CLOSE-MA(CLOSE,20));MAOSC:=EXPMEMA(OSC,6);MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;DKX:=(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210;MADKX:=MA(DKX,10);}A10:="ADTM.ADTM"<-0.5;{OR CROSS(OSC,MAOSC) OR CROSS(DKX,MADKX);}AA1:=A1 AND A2 AND A3;AA2:=A1 AND A2 AND A4;AA3:=A1 AND A2 AND A5;AA4:=A1 AND A2 AND A6;AA5:=A1 AND A2 AND A7;AA6:=A1 AND A2 AND A8;AA7:=A1 AND A2 AND A9;AA8:=A1 AND A2 AND A10;AA9:=A1 AND A3 AND A4;AA10:=A1 AND A3 AND A5;AA11:=A1 AND A3 AND A6;AA12:=A1 AND A3 AND A7;AA13:=A1 AND A3 AND A8;AA14:=A1 AND A3 AND A9;AA15:=A1 AND A3 AND A10;AA16:=A1 AND A4 AND A5;AA17:=A1 AND A4 AND A6;AA18:=A1 AND A4 AND A7;AA20:=A1 AND A4 AND A9; AA21:=A1 AND A4 AND A10; AA22:=A1 AND A5 AND A6; AA23:=A1 AND A5 AND A7; AA24:=A1 AND A5 AND A8; AA25:=A1 AND A5 AND A9; AA26:=A1 AND A5 AND A10; AA27:=A1 AND A6 AND A7; AA28:=A1 AND A6 AND A8; AA29:=A1 AND A6 AND A9; AA30:=A1 AND A6 AND A10; AA31:=A1 AND A7 AND A8; AA32:=A1 AND A7 AND A9; AA33:=A1 AND A7 AND A10; AA34:=A1 AND A8 AND A9; AA35:=A1 AND A8 AND A10; AA36:=A1 AND A9 AND A10; AA37:=A2 AND A3 AND A4; AA38:=A2 AND A3 AND A5; AA39:=A2 AND A3 AND A6; AA40:=A2 AND A3 AND A7; AA41:=A2 AND A3 AND A8; AA42:=A2 AND A3 AND A9; AA43:=A2 AND A3 AND A10; AA44:=A2 AND A4 AND A5; AA45:=A2 AND A4 AND A6; AA46:=A2 AND A4 AND A7; AA47:=A2 AND A4 AND A8; AA48:=A2 AND A4 AND A9; AA49:=A2 AND A4 AND A10; AA50:=A2 AND A5 AND A6; AA51:=A2 AND A5 AND A7; AA52:=A2 AND A5 AND A8; AA53:=A2 AND A5 AND A9; AA54:=A2 AND A5 AND A10; AA55:=A2 AND A6 AND A7; AA56:=A2 AND A6 AND A8; AA57:=A2 AND A6 AND A9; AA58:=A2 AND A6 AND A10; AA59:=A2 AND A7 AND A8; AA60:=A2 AND A7 AND A9; AA61:=A2 AND A7 AND A10; AA62:=A2 AND A8 AND A9;AA64:=A2 AND A9 AND A10; AA65:=A3 AND A4 AND A5; AA66:=A3 AND A4 AND A6; AA67:=A3 AND A4 AND A7; AA68:=A3 AND A4 AND A8; AA69:=A3 AND A4 AND A9; AA70:=A3 AND A4 AND A10; AA71:=A3 AND A5 AND A6; AA72:=A3 AND A5 AND A7; AA73:=A3 AND A5 AND A8; AA74:=A3 AND A5 AND A9; AA75:=A3 AND A5 AND A10; AA76:=A3 AND A6 AND A7; AA77:=A3 AND A6 AND A8; AA78:=A3 AND A6 AND A9; AA79:=A3 AND A6 AND A10; AA80:=A3 AND A7 AND A8; AA81:=A3 AND A7 AND A9; AA82:=A3 AND A7 AND A10; AA83:=A3 AND A8 AND A9; AA84:=A3 AND A8 AND A10; AA85:=A3 AND A9 AND A10; AA86:=A4 AND A5 AND A6; AA87:=A4 AND A5 AND A7; AA88:=A4 AND A5 AND A8; AA89:=A4 AND A5 AND A9; AA90:=A4 AND A5 AND A10; AA91:=A4 AND A6 AND A7; AA92:=A4 AND A6 AND A8; AA93:=A4 AND A6 AND A9; AA94:=A4 AND A6 AND A10; AA95:=A4 AND A7 AND A8; AA96:=A4 AND A7 AND A9; AA97:=A4 AND A7 AND A10; AA98:=A4 AND A8 AND A9; AA99:=A4 AND A8 AND A10; AA100:=A4 AND A9 AND A10; AA101:=A5 AND A6 AND A7; AA102:=A5 AND A6 AND A8; AA103:=A5 AND A6 AND A9; AA104:=A5 AND A6 AND A10; AA105:=A5 AND A7 AND A8; AA106:=A5 AND A7 AND A9;AA108:=A5 AND A8 AND A9;AA109:=A5 AND A8 AND A10;AA110:=A5 AND A9 AND A10;AA111:=A6 AND A7 AND A8;AA112:=A6 AND A7 AND A9;AA113:=A6 AND A7 AND A10;AA114:=A6 AND A8 AND A9;AA115:=A6 AND A8 AND A10;AA116:=A6 AND A9 AND A10;AA117:=A7 AND A8 AND A9;AA118:=A7 AND A8 AND A10;AA119:=A7 AND A9 AND A10;AA120:=A8 AND A9 AND A10;XG:=AA1 OR AA2 OR AA3 OR AA4 OR AA5 OR AA6 OR AA7 OR AA8 OR AA9 OR AA10 OR AA11 OR AA12 OR AA13 OR AA14 ORAA15 OR AA16 OR AA17 OR AA18 OR AA19 OR AA20 OR AA21 OR AA22 OR AA23 OR AA24 OR AA25 OR AA26 OR AA27 ORAA28 OR AA29 OR AA30 OR AA31 OR AA32 OR AA33 OR AA34 OR AA35 OR AA36 OR AA37 OR AA38 OR AA39 OR AA40 ORAA41 OR AA42 OR AA43 OR AA44 OR AA45 OR AA46 OR AA47 OR AA48 OR AA49 OR AA50 OR AA51 OR AA52 OR AA53 ORAA54 OR AA55 OR AA56 OR AA57 OR AA58 OR AA59 OR AA60 OR AA61 OR AA62 OR AA63 OR AA64 OR AA65 OR AA66 ORAA67 OR AA68 OR AA69 OR AA70 OR AA71 OR AA72 OR AA73 OR AA74 OR AA75 OR AA76 OR AA77 OR AA78 OR AA79 ORAA80 OR AA81 OR AA82 OR AA83 OR AA84 OR AA85 OR AA86 OR AA87 OR AA88 OR AA89 OR AA90 OR AA91 OR AA92 ORAA93 OR AA94 OR AA95 OR AA96 OR AA97 OR AA98 OR AA99 OR AA100 OR AA102 OR AA103 OR AA104 OR AA105 ORAA106 OR AA107 OR AA108 OR AA109 OR AA110 OR AA112 OR AA113 OR AA114 OR AA115 OR AA116 OR AA117 ORAA118 OR AA119 OR AA120;XG,COLORF0F0F0,LINETHICK3;。
MACD交易系统通达信指标公式源码
1.股价高于平均线,视为强势;股价低于平均线,视为弱势2.平均线向上涨升,具有助涨力道;平均线向下跌降,具有助跌力道;3.二条以上平均线向上交叉时,买进;4.二条以上平均线向下交叉时,卖出;5.移动平均线的信号经常落后股价,若以EXPMA 、VMA 辅助,可以改善。
总涨跌比:=DYNAINFO(60)/(DYNAINFO(60)+DYNAINFO(61))*100,COLORCYAN,NODRAW; DRAWTEXT_FIX(1,0.2,0.0,0,STRCAT('总涨跌比: ',CON2STR(总涨跌比,2))),COLORCYAN; DRAWTEXT_FIX(ISLASTBAR,0.005,0,0,STRCAT('主营同比:',CON2STR(FINANCE(44),2))),COLORGREEN;DRAWTEXT_FIX(ISLASTBAR,0.005,0.06,0,STRCAT('利润同比:',CON2STR(FINANCE(43),2))),COLORGREEN;SBL:= STRCAT(STRCAT(STRCAT(HYBLOCK,DYBLOCK),GNBLOCK),ZDBLOCK); DRAWTEXT_FIX(1,0.4,0,0,SBL),COLOR0090FF;DIF:=EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);DEA:=EMA(DIF,M);MACD:=2*(DIF-DEA);KK:=IF(DIF>DEA,5,-5);JCSC:=(M-1)/(M+1)*DEA/(1-2/(M+1));{计算出金叉死叉时的DIFF值}DD:=(MACD/2+(DEA*(M-1)/(M+1)))/(1-2/(M+1));{计算出明日MACD=MACD时的DIFF 值}DIF拐头价:(DIF*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(L ONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1)))COLORGREEN,LINETHICK1,POINTD OT;金死叉价:(JCSC*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*( LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),NODRAW;柱变向价:=(DD*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*( LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),COLORYELLOW,POINTDOT;黄铢消失见顶:=IF(柱变向价>=DIF拐头价,柱变向价,DRAWNULL),COLORYELLOW,CIRCLEDOT,LINETHICK1;拐头价:IF(DIF拐头价<柱变向价,DIF拐头价,DRAWNULL), COLORRED,LINETHICK4; DRAWNUMBER(DIF<DEA,DIF拐头价,BARSLAST(CROSS(DEA,DIF))+1),COLORCYAN,NODRAW;DRAWNUMBER(DIF>DEA,DIF拐头价,BARSLAST(CROSS(DIF,DEA))+1),COLORWHITE,NODRAW;ZJ:拐头价,COLOR0000FF;HY:=金死叉价,COLORFF00FF;IF(ZJ > REF(ZJ,1),ZJ,DRAWNULL),COLORRED,LINETHICK2;IF(ZJ < REF(ZJ,1),ZJ,DRAWNULL),COLORGREEN,LINETHICK2;IF(HY > REF(HY,1),HY,DRAWNULL),COLORMAGENTA,LINETHICK2,NODRAW;IF(HY < REF(HY,1),HY,DRAWNULL),COLORBLUE,LINETHICK2,NODRAW; STICKLINE(C>ZJ AND C>O,H,C,0,0 ),COLORRED;STICKLINE(C>ZJ AND C>O,L,O,0,0 ),COLORRED;STICKLINE(C>ZJ AND C>O,O,C,2.8,1),COLORRED;STICKLINE(C>ZJ AND C<=O,H,L,0,0 ),COLORRED;STICKLINE(C>ZJ AND C<=O,O,C,2.8,0),COLORRED;STICKLINE(CLOSE = ZJ,H,L,3,0),COLORWHITE;STICKLINE(CLOSE < ZJ,H,L,0,0),COLORYELLOW;STICKLINE(CLOSE < ZJ,O,C,2.5,0),COLORYELLOW;STICKLINE(C<HY AND C>O,H,C,0,0),COLORCYAN;STICKLINE(C<HY AND C>O,O,L,0,0),COLORCYAN;STICKLINE(C<HY AND C>O,O,C,2.8,1),COLORCYAN;STICKLINE(C<HY AND C<=O,H,L,0,0),COLORCYAN;STICKLINE(C<HY AND C<=O,O,C,2.8,0),COLORCYAN;HD0:=CROSS(DIF,DEA);金收:REF(L,BARSLAST(HD0)),COLORYELLOW,DOTLINE;DRAWNUMBER(ISLASTBAR,金收,金收),COLORCYAN;LD0:=CROSS(DEA,DIF);死收:REF(H,BARSLAST(LD0)),COLOR00FF00,DOTLINE;{分时中的收盘标记}IF(HOUR=15,H*1.008,DRAWNULL),POINTDOT,COLORFFFAAA,LINETHICK9; IF(HOUR=15,H*1.008,DRAWNULL),POINTDOT,COLOR000FFF,LINETHICK5; HSL:=V/CAPITAL*100;DRAWNUMBER(CURRBARSCOUNT=1 AND HSL,C,HSL),COLOR00FFFF;分时均价:AMOUNT/VOL/100,COLORWHITE,NODRAW;。
macd解盘的指标公式通达信指标公式源码
DRAWGBK(C>0,RGB(10,160,0),RGB(25,15,0),0,' ',0);DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26),COLORYELLOW,LINETHICK2; DEA1:=EMA(DIFF,9);0.10,POINTDOT;MACD:=2*(DIFF-DEA1),LINETHICK0;SS1:=MACD<REF(MACD,1)AND MACD>0;SS2:=MACD<REF(MACD,1)/2 AND MACD<0;STICKLINE(MACD>=0,MACD,0,3,1),COLORRED;STICKLINE(SS1,0,MACD,3,1),COLOR00FFFF;STICKLINE(SS2,0,MACD,3,0),COLORFFFFFF;STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,3,1),COLORFFFF00; EMA(CLOSE,12) - EMA(CLOSE,26),COLORYELLOW,LINETHICK2;DEA:EMA(DIFF,9),COLORGREEN;IF(DIFF>DEA,DIFF,DRAWNULL),COLORFF11CC,LINETHICK2;IF(DIFF>DEA AND DIFF<0,DIFF,DRAWNULL),COLORRED,LINETHICK2; DRAWICON(CROSS(DIFF,DEA),DIFF-0.1,1);DRAWICON(CROSS(DEA,DIFF),DIFF+0.1,2);MAC:3*DIFF-2*DEA1,LINETHICK1,COLORRED;VAR1:=EMA(CLOSE,34)-EMA(CLOSE,5);VAR2:=EMA(VAR1,5);趋势:=(-3)*(VAR1-VAR2);VAR11:=MA((V/(H-L)),4);VAR33:=ABS(C-O);VAR44:=V/(H-L);TRR :=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),14); HD := HIGH-REF(HIGH,1);LD := REF(LOW,1)-LOW;DMP:= SUM(IF(HD>0 AND HD>LD,HD,0),14);DMM:= SUM(IF(LD>0 AND LD>HD,LD,0),14);PDI:= DMP*100/TR;MDI:= DMM*100/TR;ADX:= MA(ABS(MDI-PDI)/(MDI+PDI)*100,6);ADXR:=(ADX+REF(ADX,6))/2;M周▲:DRAWTEXT(CROSS("MACD.DIF#WEEK" ,"MACD.DEA#WEEK"),DEA1-0.05,'▲M周'),COLORRED;M月个:DRAWTEXT(CROSS("MACD.DIF#MONTH" ,"MACD.DEA#MONTH"),DEA1-0.05,'个M月'),COLORMAGENTA;W1:=CROSS(MA(C,10),MA(C,5)) ;W2:=CROSS(MA(C,5),MA(C,10)) ;W3:=CROSS(MA(V,10),MA(V,5));W4:=CROSS(DEA,DIFF);W11:=C<=MA(C,5) AND C<=MA(C,10) ;W22:=O>MA(C,5) AND O>MA(C,10) ;W33:=MA(V,5)<=MA(V,10);W44:=DIFF<DEA;W5:=VOL/CAPITAL;DRAWTEXT(W11 AND W22 AND W33 AND W44,DIFF,'#'),COLORFFFF10;LC := REF(CLOSE,1);RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;PSY:=COUNT(CLOSE>REF(CLOSE,1),12)/12*100;AA:=(EMA(C,30)*2+MA(C,60))/3;RA:=(VOL*CLOSE);VL1A:=EMA(RA,13)/EMA(VOL,13);VL2A:=EMA(RA,60)/EMA(VOL,60);VLA:=EMA((VL1A+VL2A)/2,3);分水岭:=MA((AA+VLA)/2,1),LINETHICK0;BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;UPR:=BBI+3*STD(BBI,10);DWN:=BBI-3*STD(BBI,10);VAR55:=(UPR-DWN)/UPR<0.03;VAR56:=(UPR-DWN)/UPR>0.18;VAR57:=(MA(C,60)-MA(C,5))/MA(C,60)>0.15;VAR58:=(MA(C,5)-MA(C,60))/MA(C,5)>0.15;S1:=趋势>0; S2:=趋势<0; S3:=CROSS(趋势,0); S4:=CROSS(0,趋势);S5:=CROSS(PDI,MDI); S6:=CROSS(MDI,PDI); S7:=ADX>REF(ADX,1); S8:=W11 AND W22;S9:=W1; S10:=W3; S11:=W4; S12:=W11 AND W22 AND W33 AND W44;S13:=W11 AND W33 AND W44; S14:=W5>0.075; S15:=RSI1>85; S16:=RSI1>80;S17:=RSI1<15; S18:=CROSS(RSI1,15); S19:=CROSS(RSI1,85); S20:=CLOSE>分水岭; S21:=CLOSE<分水岭; S22:=VAR55; S23:=VAR57 AND VAR56;SS:=CONST((S1+S2+S3+S4+S5+S6+S7+S8+S9+S10+S11+S12+S13+S14+S15+S16+ S17+S18+S19+S20+S21+S22+S23)*110),NODRAW;DRAWRECTREL(0,0,270,SS,RGB(0,120,0));E1:=IF(S1=1 ,-0.08,-0.08);E2:=IF(S2=1,E1+0.1,E1);E3:=IF(S3=1,E2+0.1,E2);E4:=IF(S4=1,E3+0.1,E3);E5:=IF(S5=1,E4+0.1,E4);E6:=IF(S6=1,E5+0.1,E5);E7:=IF(S7=1,E6+0.1,E6);E8:=IF(S8=1,E7+0.1,E7);E9:=IF(S9=1,E8+0.1,E8);E10:=IF(S10=1,E9+0.1,E9);E11:=IF(S11=1,E10+0.1,E10);E12:=IF(S12=1,E11+0.1,E11);E13:=IF(S13=1,E12+0.1,E12);E14:=IF(S14=1,E13+0.1,E13);E15:=IF(S15=1,E14+0.1,E14);E16:=IF(S16=1,E15+0.1,E15);E17:=IF(S17=1,E16+0.1,E16);E18:=IF(S18=1,E17+0.1,E17);E19:=IF(S19=1,E18+0.1,E18);E20:=IF(S20=1,E19+0.1,E19);E21:=IF(S21=1,E20+0.1,E20);E22:=IF(S22=1,E21+0.1,E21);E23:=IF(S23=1,E22+0.1,E22);DRAWTEXT_FIX(ISLASTBAR AND S1=1,0,E1,0,'Z线趋势上升中');DRAWTEXT_FIX(ISLASTBAR AND S2=1,0,E2,0,'Z线趋势下降中');DRAWTEXT_FIX(ISLASTBAR AND S3=1,0,E3,0,'Z线考虑买入');DRAWTEXT_FIX(ISLASTBAR AND S4=1,0,E4,0,'Z线考虑卖出');DRAWTEXT_FIX(ISLASTBAR AND S5=1,0,E5,0,'PDI突破MDI,有新多进场'); DRAWTEXT_FIX(ISLASTBAR AND S6=1,0,E6,0,'PDI跌破MDI,有新空进场'); DRAWTEXT_FIX(ISLASTBAR AND S7=1,0,E7,0,'ADX高于前一日,维持原趋势'); DRAWTEXT_FIX(ISLASTBAR AND S8=1,0,E8,0,'断头铡刀:,卖出'),COLORGREEN; DRAWTEXT_FIX(ISLASTBAR AND S9=1,0,E9,0,'5日死叉10均线,短线卖出'); DRAWTEXT_FIX(ISLASTBAR AND S10=1,0,E10,0,'5日死叉10日均量,卖出'); DRAWTEXT_FIX(ISLASTBAR AND S11=1,0,E11,0,'DIFF下穿DEA,空头形成,卖出'); DRAWTEXT_FIX(ISLASTBAR AND S12=1,0,E12,0,'三死叉见顶,卖出'),COLORFF00FF; DRAWTEXT_FIX(ISLASTBAR AND S13=1,0,E13,0,'多方溃败,卖出'),COLORGREEN; DRAWTEXT_FIX(ISLASTBAR AND S14=1,0,E14,0,'换手过大,小心主力出逃'); DRAWTEXT_FIX(ISLASTBAR AND S15=1,0,E15,0,'6日RSI超买,防止回挡'); DRAWTEXT_FIX(ISLASTBAR AND S16=1,0,E16,0,'6日RSI向上突破85,超买'); DRAWTEXT_FIX(ISLASTBAR AND S17=1,0,E17,0,'6日RSI超卖,有可能反弹'); DRAWTEXT_FIX(ISLASTBAR AND S18=1,0,E18,0,'6日RSI向上突破15,买进信号'); DRAWTEXT_FIX(ISLASTBAR AND S19=1,0,E19,0,'6日RSI向下跌破85,卖出信号'); DRAWTEXT_FIX(ISLASTBAR AND S20=1,0,E20,0,'分水岭之上,多头,可积极做多'); DRAWTEXT_FIX(ISLASTBAR AND S21=1,0,E21,0,'分水岭之下,空头,只能抢反弹'); DRAWTEXT_FIX(ISLASTBAR AND S22=1,0,E22,0,'布林收敛中,有变盘可能'); DRAWTEXT_FIX(ISLASTBAR AND S23=1,0,E23,0,'布林乖离太大,有反弹可能');。
MACD完美波段通达信指标公式源码
MACD完美波段通达信指标公式源码通达信是一种股票分析软件,可以对股票进行技术分析,并提供一些指标来判断股票的走势。
MACD(Moving Average Convergence Divergence)是一种常用的股票技术指标,用于确定股票价格的趋势和可能的转折点。
以下是通达信中计算MACD指标的公式源码。
#定义MACD函数def MACD(close, fastPeriod=12, slowPeriod=26,signalPeriod=9):#计算快速移动平均线ema_fast = EMA(close, fastPeriod)#计算慢速移动平均线ema_slow = EMA(close, slowPeriod)#计算DIF(差离值)dif = ema_fast - ema_slow#计算DEA(信号线)dea = EMA(dif, signalPeriod)#计算MACD(柱状线)macd = (dif - dea) * 2return dif, dea, macd#计算移动平均线def EMA(close, period):ema = [0] * len(close)ema[period-1] = sum(close[:period]) / periodfor i in range(period, len(close)):ema[i] = ((2 / (period + 1)) * close[i]) + ((1 - (2 / (period + 1))) * ema[i-1])return ema#示例用法close = [10, 12, 14, 16, 18, 20, 22, 24, 26, 28]dif, dea, macd = MACD(close)print("DIF:", dif)print("DEA:", dea)print("MACD:", macd)在上面的代码中,我们首先定义了一个MACD函数,接受一个收盘价的列表作为参数,以及可选的快速移动平均线期间、慢速移动平均线期间、信号线期间参数,默认值分别为12、26、9、然后,在MACD函数中,我们调用了一个EMA函数来计算移动平均线的值。
通达信指标公式源码 发一个准确率很高的主图指标(无未来)
EMA13:EMA(C,13),COLORWHITE;EMA21:EMA(C,21),COLORYELLOW;EMA34:EMA(C,34),COLORFF00FF;EMA60:MA(C,60),COLORFFCC66;VAR2:=(2*CLOSE+HIGH+LOW)/4;VAR3:=IF(YEAR>=2099 AND MONTH>2,0,1);VAR4:=LLV(LOW,5);VAR5:=HHV(HIGH,4);散户:=EMA((VAR2-VAR4)/(VAR5-VAR4)*100,4)*VAR3;庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR3;DRAWTEXT(CROSS(散户,庄家) AND 散户<50 AND 29<散户,L-0.05,'短进'),COLORMAGENTA;DRAWTEXT(CROSS(庄家,散户) AND 散户>40 AND 71>散户,H+0.05,'短出'),COLORGREEN;DRAWTEXT(CROSS(散户,庄家) AND 散户<30,L-0.05,'低吸'),COLORWHITE; DRAWTEXT(CROSS(庄家,散户) AND 散户>70,H+0.05,'高减'),COLORYELLOW; DRAWICON(CROSS(散户,庄家) AND 散户<30,L-0.05,1);DRAWICON(CROSS(庄家,散户) AND 散户>70,H+0.05,2);VAR9:=CLOSE-REF(CLOSE,5);VARA:=EMA(EMA(VAR9,5),5)/EMA(EMA(ABS(VAR9),5),5);VARC:=EMA(EMA(VAR9,20),20)/EMA(EMA(ABS(VAR9),20),20);卖出:=IF(VARA>0 AND CROSS(VARC,VARA),90,100);DRAWTEXT(VARA>0 AND CROSS(VARC,VARA),H+0.05,'中线逃!'),COLORYELLOW; DRAWICON(卖出<0,H+0.05,2);买线:=EMA(CLOSE,2);卖线:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);B1:IF(CROSS(买线,卖线),L-0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORMAGENTA; S1:IF(CROSS(80,RSI)*30,H+0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW; VC:=((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;S2:IF(VC>20 AND FILTER(VC< REF(VC,1),5),H+0.02,DRAWNULL),CIRCLEDOT,LINETHICK3,COLORGREEN;。
通达信指标公式源码牛启动 无未来
DRAWGBK(CURRBARSCOUNT=1, RGB(110,108,108),RGB(88,30,0),0,'',0);VA1:=HHV(HIGH,9)-LLV(LOW,9);VA2:=HHV(HIGH,9)-CLOSE;VA3:=CLOSE-LLV(LOW,9);VA4:=VA2/VA1*100-70;VA5:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;VA6:=(CLOSE+HIGH+LOW)/3;VA7:=SMA(VA3/VA1*100,3,1);VA8:=LLV(LOW,34);VA9:=SMA(VA7,3,1)-SMA(VA4,9,1);VARA:=IF(VA9>100,VA9-100,0);VARB:=HHV(HIGH,34);VARC:=EMA((VA6-VA8)/(VARB-VA8)*100,13);VARD:=EMA(0.667*REF(VARC,1)+0.333*VARC,2);VARE:=SMA(MAX(CLOSE-REF(CLOSE,1),0)/CLOSE,8,1)/SMA(ABS(INDEXC-REF(INDEXC,1 ))/INDEXC,8,1)*100-25;VARF:=MA(VARE,3);VAR1:=HHV(HIGH,9)-LLV(LOW,9);VAR2:=HHV(HIGH,9)-CLOSE;VAR3:=CLOSE-LLV(LOW,9);VAR4:=((VAR2)/(VAR1))*(100)-70;VAR5:=((CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60)))*(100);VAR6:=((2)*(CLOSE)+HIGH+LOW)/(4);VAR7:=SMA(((VAR3)/(VAR1))*(100),3,1);VAR8:=LLV(LOW,34);VAR9:=SMA(VAR7,3,1)-SMA(VAR4,9,1);VAR10:=IF((VAR9>100),VAR9-100,0);VAR11:=HHV(HIGH,34);B1:=EMA(((VAR6-VAR8)/(VAR11-VAR8))*(100),8);DRAWKLINE(EMA(B1,5),EMA(B1,5),B1+1,B1);领先:EMA(B1,5),COLORCYAN;生命线:EMA(VARD,1),COLORYELLOW;V1:=MA(C,5)=HHV(MA(C,5),20);V2:=MA(C,5)>MA(C,10);V3:=MA(V,5)>MA(V,40)*1.01;V4:=COUNT(MA(C,1)>REF(C,1),2)=2;VV:=V1 AND V2 AND V3 AND V4;A1:=EMA(CLOSE,8);A2:=EMA(A1,20);A3:=CROSS(A1,A2);A4:=A1<EMA(CLOSE,120);STICKLINE((A3 AND A4)OR(V1 AND V2 AND V3 AND V4),B1*1.03,B1*1.120,1,0),COLORYELLOW;A5:=3*SMA((CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100,21,1)-2*SMA(SMA((CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100,20,1),8,1),CIRCLED OT ,COLORFF9900 ;安全位:=20;低位转强:IF(CROSS(A5,安全位),50,0),STICK,COLORMAGENTA,LINETHICK2;开始拉升:IF(CROSS(VARC,生命线) AND VARC>VARD AND VARC<55 AND C>O,50,0), COLORLIRED,POINTDOT;A6:=LLV(C,500)=LLV(C,5) AND C/REF(C,1)>(1+9.8/100);极地上涨:IF(A6,领先,0),COLORGREEN,LINETHICK2;STICKLINE(开始拉升>0,15,开始拉升*1.01,1,0),COLORBLUE;STICKLINE((开始拉升>0 AND 开始拉升<400) OR (极地上涨>0 AND 极地上涨<400) OR (低位转强>0 AND 低位转强<400) OR (低位转强>0),30,开始拉升,1,0),COLORRED; STICKLINE(开始拉升>0,15,开始拉升*0.6,3,0),COLORBLUE;STICKLINE(开始拉升>0,15,开始拉升*0.4,3,0),COLOR00FF00;STICKLINE(开始拉升>0,15,开始拉升*0.2,3,0),COLOR0099CC;STICKLINE(低位转强>0,15,低位转强*1.01,1,0),COLORMAGENTA;STICKLINE((低位转强>0)OR(极地上涨>0),15,低位转强*0.4,3,0),COLORYELLOW; STICKLINE(低位转强>0,15,低位转强*0.2,3,0),COLORFFCC66;STICKLINE(极地上涨>0,15,极地上涨*1.01,1,0),COLORYELLOW;。
无未来通达信指标公式黄金MACD
无未来通达信指标公式黄金MACD{参数设置:N1:1,99,12 N2:1,99,26 N3:1,99,9}DIFF:=(EMA(CLOSE,N1) - EMA(CLOSE,N2));DEA:=EMA(DIFF,N3);MACD2:=(2 * (DIFF - DEA));DU0:=CROSS(DIFF,0);UD0:=CROSS(0,DIFF);TDU0:=BARSLAST(DU0);TUD0:=BARSLAST(UD0);DU3:=REF(DU0,1);UD3:=REF(UD0,1);TDU3:=BARSLAST(DU3);TUD3:=BARSLAST(UD3);UDGLINE:=IF((TDU3 <TUD3),REF(HHV(HIGH,2),TDU3),REF(LLV(LOW,2),TUD3)); JDU0:=(((REF(CLOSE,1) <= REF(UDGLINE,1)) AND (CLOSE > UDGLINE)) AND (TDU0 < TUD0));JUD0:=(((REF(CLOSE,1) >= REF(UDGLINE,1)) AND (CLOSE < UDGLINE)) AND (TUD0 < TDU0));JDU1:=(JDU0 AND (COUNT(JDU0,TDU0) = 1));JUD1:=(JUD0 AND (COUNT(JUD0,TUD0) = 1));JDU2:=(JDU1 AND (REF(BARSLAST(JUD1),1) <REF(BARSLAST(JDU1),1)));JUD2:=(JUD1 AND (REF(BARSLAST(JUD1),1) >REF(BARSLAST(JDU1),1)));JDU3:=(JDU1 AND (REF(BARSLAST(JUD1),1) >REF(BARSLAST(JDU1),1)));JUD3:=(JUD1 AND (REF(BARSLAST(JUD1),1) <REF(BARSLAST(JDU1),1)));BSLINE:=IF((BARSLAST(JDU2) <BARSLAST(JUD2)),IF(REF(CROSS(0,MACD2),1),LLV(LOW,2),REF(L LV(LOW,2),BARSLAST(REF(CROSS(0,MACD2),1)))),IF(REF(CROSS( MACD2,0),1),HHV(HIGH,2),REF(HHV(HIGH,2),BARSLAST(REF(CRO SS(MACD2,0),1)))));STICKLINE((MACD2>=0),0,MACD2,2,0),COLORFF00FF;STICKLINE(((MACD2>=0) AND (MACD2 <REF(MACD2,1))),0,MACD2,2,1),COLORGREEN;STICKLINE((MACD2<0),0,MACD2,2,0),COLORFFFF00;STICKLINE(((MACD2<0) AND (MACD2 >REF(MACD2,1))),0,MACD2,2,0),COLORYELLOW;DEFUT:=BARSLAST(CROSS(MACD2,0));DEFDT:=BARSLAST(CROSS(0,MACD2));DEFUL:=IF((MACD2 >= 0),HHV(MACD2,(DEFUT1)),REF(HHV(MACD2,(DEFUT 1)),(DEFDT 1)));DEFDL:=IF((MACD2 < 0),LLV(MACD2,(DEFDT1)),REF(LLV(MACD2,(DEFDT 1)),(DEFUT 1)));DEFU2L:=REF(DEFUL,(DEFUT 1));DEFD2L:=REF(DEFDL,(DEFDT 1));A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));底背离:=REF(CLOSE,A1 1)>CLOSE AND DIFF>REF(DIFF,A1 1) AND CROSS(DIFF,DEA);STICKLINE(底背离,0,0.03,4,0),COLOR00FF00;DIF2:EMA(SUM(MACD2,2),3),LINETHICK2,COLORYELLOW;入1:IF(DIF2>REF(DIF2,1),DIF2,DRAWNULL),COLORRED,LINETHICK2; 入2:IF(DIF2<REF(DIF2,1),DIF2,DRAWNULL),COLORGREEN,LINETHICK2;DEA2:MA(DIF2,5),COLORCYAN;DRAWICON(((((LLV(MACD2,4) > 0) AND (MACD2 <REF(MACD2,1))) AND (REF(MACD2,1) > REF(MACD2,2))) AND (REF(MACD2,2) > REF(MACD2,3))),MACD2,14);DRAWICON(((((HHV(MACD2,4) < 0) AND (MACD2 >REF(MACD2,1))) AND (REF(MACD2,1) < REF(MACD2,2))) AND (REF(MACD2,2) < REF(MACD2,3))),MACD2,13);这个是选股公式N1:=12; N2:=26; N3:=9;DIFF:=(EMA(CLOSE,N1) - EMA(CLOSE,N2));DEA:=EMA(DIFF,N3);MACD2:=(2 * (DIFF - DEA));DU0:=CROSS(DIFF,0);UD0:=CROSS(0,DIFF);TDU0:=BARSLAST(DU0);TUD0:=BARSLAST(UD0);DU3:=REF(DU0,1);UD3:=REF(UD0,1);TDU3:=BARSLAST(DU3);TUD3:=BARSLAST(UD3);UDGLINE:=IF((TDU3 <TUD3),REF(HHV(HIGH,2),TDU3),REF(LLV(LOW,2),TUD3));JDU0:=(((REF(CLOSE,1) <= REF(UDGLINE,1)) AND (CLOSE > UDGLINE)) AND (TDU0 < TUD0));JUD0:=(((REF(CLOSE,1) >= REF(UDGLINE,1)) AND (CLOSE < UDGLINE)) AND (TUD0 < TDU0));JDU1:=(JDU0 AND (COUNT(JDU0,TDU0) = 1));JUD1:=(JUD0 AND (COUNT(JUD0,TUD0) = 1));JDU2:=(JDU1 AND (REF(BARSLAST(JUD1),1) <REF(BARSLAST(JDU1),1)));JUD2:=(JUD1 AND (REF(BARSLAST(JUD1),1) >REF(BARSLAST(JDU1),1)));JDU3:=(JDU1 AND (REF(BARSLAST(JUD1),1) >REF(BARSLAST(JDU1),1)));JUD3:=(JUD1 AND (REF(BARSLAST(JUD1),1) <REF(BARSLAST(JDU1),1)));BSLINE:=IF((BARSLAST(JDU2) <BARSLAST(JUD2)),IF(REF(CROSS(0,MACD2),1),LLV(LOW,2),REF(LLV(LOW,2),BARSLAST(REF(CROSS(0,MACD2),1)))),IF(REF(CROSS(MACD2,0),1),HHV(HIGH,2),REF(HHV(HIGH,2),BARSLAST(REF(CROSS(MACD2,0),1)))));DEFUT:=BARSLAST(CROSS(MACD2,0));DEFDT:=BARSLAST(CROSS(0,MACD2));DEFUL:=IF((MACD2 >= 0),HHV(MACD2,(DEFUT1)),REF(HHV(MACD2,(DEFUT 1)),(DEFDT 1)));DEFDL:=IF((MACD2 < 0),LLV(MACD2,(DEFDT1)),REF(LLV(MACD2,(DEFDT 1)),(DEFUT 1)));DEFU2L:=REF(DEFUL,(DEFUT 1));DEFD2L:=REF(DEFDL,(DEFDT 1));A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));底背离:=REF(CLOSE,A1 1)>CLOSE AND DIFF>REF(DIFF,A1 1) ANDCROSS(DIFF,DEA);DIF2:=EMA(SUM(MACD2,2),3),LINETHICK2,COLORYELLOW;入1:=IF(DIF2>REF(DIF2,1),DIF2,DRAWNULL),COLORRED,LINETHICK 2;入2:=IF(DIF2<REF(DIF2,1),DIF2,DRAWNULL),COLORGREEN,LINETHI CK2;DEA2:=MA(DIF2,5),COLORCYAN;{HQXG:((((LLV(MACD2,4) > 0) AND (MACD2 < REF(MACD2,1))) AND (REF(MACD2,1) > REF(MACD2,2))) AND (REF(MACD2,2) > REF(MACD2,3)));}MCXG:((((HHV(MACD2,4) < 0) AND (MACD2 > REF(MACD2,1))) AND (REF(MACD2,1) < REF(MACD2,2))) AND (REF(MACD2,2) < REF(MACD2,3)));上一个是MACD出红点时刻的选股公式上一个是MACD出红点时刻的选股公式,下一个这个是MACD出现金叉的选股公式N1:=12; N2:=26; N3:=9;DIFF:=(EMA(CLOSE,N1) - EMA(CLOSE,N2));DEA:=EMA(DIFF,N3);MACD2:=(2 * (DIFF - DEA));DU0:=CROSS(DIFF,0);UD0:=CROSS(0,DIFF);TDU0:=BARSLAST(DU0);TUD0:=BARSLAST(UD0);DU3:=REF(DU0,1);UD3:=REF(UD0,1);TDU3:=BARSLAST(DU3);TUD3:=BARSLAST(UD3);UDGLINE:=IF((TDU3 <TUD3),REF(HHV(HIGH,2),TDU3),REF(LLV(LOW,2),TUD3));JDU0:=(((REF(CLOSE,1) <= REF(UDGLINE,1)) AND (CLOSE >UDGLINE)) AND (TDU0 < TUD0));JUD0:=(((REF(CLOSE,1) >= REF(UDGLINE,1)) AND (CLOSE < UDGLINE)) AND (TUD0 < TDU0));JDU1:=(JDU0 AND (COUNT(JDU0,TDU0) = 1));JUD1:=(JUD0 AND (COUNT(JUD0,TUD0) = 1));JDU2:=(JDU1 AND (REF(BARSLAST(JUD1),1) <REF(BARSLAST(JDU1),1)));JUD2:=(JUD1 AND (REF(BARSLAST(JUD1),1) >REF(BARSLAST(JDU1),1)));JDU3:=(JDU1 AND (REF(BARSLAST(JUD1),1) >REF(BARSLAST(JDU1),1)));JUD3:=(JUD1 AND (REF(BARSLAST(JUD1),1) <REF(BARSLAST(JDU1),1)));BSLINE:=IF((BARSLAST(JDU2) <BARSLAST(JUD2)),IF(REF(CROSS(0,MACD2),1),LLV(LOW,2),REF(LLV(LOW,2),BARSLAST(REF(CROSS(0,MACD2),1)))),IF(REF(CROSS(MACD2,0),1),HHV(HIGH,2),REF(HHV(HIGH,2),BARSLAST(REF(CROSS(MACD2,0),1)))));DEFUT:=BARSLAST(CROSS(MACD2,0));DEFDT:=BARSLAST(CROSS(0,MACD2));DEFUL:=IF((MACD2 >= 0),HHV(MACD2,(DEFUT1)),REF(HHV(MACD2,(DEFUT 1)),(DEFDT 1)));DEFDL:=IF((MACD2 < 0),LLV(MACD2,(DEFDT1)),REF(LLV(MACD2,(DEFDT 1)),(DEFUT 1)));DEFU2L:=REF(DEFUL,(DEFUT 1));DEFD2L:=REF(DEFDL,(DEFDT 1));A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));底背离:=REF(CLOSE,A1 1)>CLOSE AND DIFF>REF(DIFF,A1 1) ANDCROSS(DIFF,DEA);DIF2:=EMA(SUM(MACD2,2),3),LINETHICK2,COLORYELLOW;入1:=IF(DIF2>REF(DIF2,1),DIF2,DRAWNULL),COLORRED,LINETHICK 2;入2:=IF(DIF2<REF(DIF2,1),DIF2,DRAWNULL),COLORGREEN,LINETHI CK2;DEA2:=MA(DIF2,5),COLORCYAN;CROSS(入1, DEA2);N1赋值:12N2赋值:26N3赋值:9DIFF赋值:(收盘价的N1日指数移动平均- 收盘价的N2日指数移动平均)DEA赋值:DIFF的N3日指数移动平均MACD2赋值:(2 * (DIFF - DEA))DU0赋值:DIFF上穿0UD0赋值:0上穿DIFFTDU0赋值:上次DU0距今天数TUD0赋值:上次UD0距今天数DU3赋值:1日前的DU0UD3赋值:1日前的UD0TDU3赋值:上次DU3距今天数TUD3赋值:上次UD3距今天数UDGLINE赋值:如果(TDU3<TUD3),返回TDU3日前的2日内最高价的最高值,否则返回TUD3日前的2日内最低价的最低值JDU0赋值:(((1日前的收盘价<= 1日前的UDGLINE) AND (收盘价> UDGLINE)) AND (TDU0 < TUD0))JUD0赋值:(((1日前的收盘价>= 1日前的UDGLINE) AND (收盘价< UDGLINE)) AND (TUD0 < TDU0))JDU1赋值:(JDU0 AND (统计TDU0日中满足JDU0的天数= 1))JUD1赋值:(JUD0 AND (统计TUD0日中满足JUD0的天数= 1))JDU2赋值:(JDU1 AND (1日前的上次JUD1距今天数< 1日前的上次JDU1距今天数))JUD2赋值:(JUD1 AND (1日前的上次JUD1距今天数> 1日前的上次JDU1距今天数))JDU3赋值:(JDU1 AND (1日前的上次JUD1距今天数> 1日前的上次JDU1距今天数))JUD3赋值:(JUD1 AND (1日前的上次JUD1距今天数< 1日前的上次JDU1距今天数))BSLINE赋值:如果(上次JDU2距今天数<上次JUD2距今天数),返回如果1日前的0上穿MACD2,返回2日内最低价的最低值,否则返回上次1日前的0上穿MACD2距今天数日前的2日内最低价的最低值,否则返回如果1日前的MACD2上穿0,返回2日内最高价的最高值,否则返回上次1日前的MACD2上穿0距今天数日前的2日内最高价的最高值DEFUT赋值:上次MACD2上穿0距今天数DEFDT赋值:上次0上穿MACD2距今天数DEFUL赋值:如果(MACD2>=0),返回(DEFUT 1)日内MACD2的最高值,否则返回(DEFDT 1)日前的(DEFUT 1)日内MACD2的最高值DEFDL赋值:如果(MACD2<0),返回(DEFDT 1)日内MACD2的最低值,否则返回(DEFUT 1)日前的(DEFDT 1)日内MACD2的最低值DEFU2L赋值:(DEFUT 1)日前的DEFULDEFD2L赋值:(DEFDT 1)日前的DEFDLA1赋值:上次1日前的DIFF上穿DEA距今天数底背离赋值:A1 1日前的收盘价>收盘价AND DIFF>A1 1日前的DIFF AND DIFF上穿DEADIF2赋值:MACD2的2日累和的3日指数移动平均,线宽为2,画黄色入1赋值:如果DIF2>1日前的DIF2,返回DIF2,否则返回无效数,画红色,线宽为2入2赋值:如果DIF2<1日前的DIF2,返回DIF2,否则返回无效数,画绿色,线宽为2DEA2赋值:DIF2的5日简单移动平均,画青色入1上穿DEA2通达信MACD红点时刻的选股通达信注解N1赋值:12N2赋值:26N3赋值:9DIFF赋值:(收盘价的N1日指数移动平均- 收盘价的N2日指数移动平均)DEA赋值:DIFF的N3日指数移动平均MACD2赋值:(2 * (DIFF - DEA))DU0赋值:DIFF上穿0UD0赋值:0上穿DIFFTDU0赋值:上次DU0距今天数TUD0赋值:上次UD0距今天数DU3赋值:1日前的DU0UD3赋值:1日前的UD0TDU3赋值:上次DU3距今天数TUD3赋值:上次UD3距今天数UDGLINE赋值:如果(TDU3<TUD3),返回TDU3日前的2日内最高价的最高值,否则返回TUD3日前的2日内最低价的最低值JDU0赋值:(((1日前的收盘价<= 1日前的UDGLINE) AND (收盘价> UDGLINE)) AND (TDU0 < TUD0))JUD0赋值:(((1日前的收盘价>= 1日前的UDGLINE) AND (收盘价< UDGLINE)) AND (TUD0 < TDU0))JDU1赋值:(JDU0 AND (统计TDU0日中满足JDU0的天数= 1))JUD1赋值:(JUD0 AND (统计TUD0日中满足JUD0的天数= 1))JDU2赋值:(JDU1 AND (1日前的上次JUD1距今天数< 1日前的上次JDU1距今天数))JUD2赋值:(JUD1 AND (1日前的上次JUD1距今天数> 1日前的上次JDU1距今天数))JDU3赋值:(JDU1 AND (1日前的上次JUD1距今天数> 1日前的上次JDU1距今天数))JUD3赋值:(JUD1 AND (1日前的上次JUD1距今天数< 1日前的上次JDU1距今天数))BSLINE赋值:如果(上次JDU2距今天数<上次JUD2距今天数),返回如果1日前的0上穿MACD2,返回2日内最低价的最低值,否则返回上次1日前的0上穿MACD2距今天数日前的2日内最低价的最低值,否则返回如果1日前的MACD2上穿0,返回2日内最高价的最高值,否则返回上次1日前的MACD2上穿0距今天数日前的2日内最高价的最高值DEFUT赋值:上次MACD2上穿0距今天数DEFDT赋值:上次0上穿MACD2距今天数DEFUL赋值:如果(MACD2>=0),返回(DEFUT 1)日内MACD2的最高值,否则返回(DEFDT 1)日前的(DEFUT 1)日内MACD2的最高值DEFDL赋值:如果(MACD2<0),返回(DEFDT 1)日内MACD2的最低值,否则返回(DEFUT 1)日前的(DEFDT 1)日内MACD2的最低值DEFU2L赋值:(DEFUT 1)日前的DEFULDEFD2L赋值:(DEFDT 1)日前的DEFDLA1赋值:上次1日前的DIFF上穿DEA距今天数底背离赋值:A1 1日前的收盘价>收盘价AND DIFF>A1 1日前的DIFF AND DIFF上穿DEADIF2赋值:MACD2的2日累和的3日指数移动平均,线宽为2,画黄色入1赋值:如果DIF2>1日前的DIF2,返回DIF2,否则返回无效数,画红色,线宽为2入2赋值:如果DIF2<1日前的DIF2,返回DIF2,否则返回无效数,画绿色,线宽为2DEA2赋值:DIF2的5日简单移动平均,画青色输出MCXG:((((4日内MACD2的最高值< 0) AND (MACD2 > 1日前的MACD2)) AND (1日前的MACD2 < 2日前的MACD2)) AND (2日前的MACD2 < 3日前的MACD2))。
通达信指标公式源码 每天赚个5% 无未来
KDJ参数:N: 1 100 9M1:1 100 3M2:1 100 3RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;K:=SMA(RSV,M1,1),LINETHICK2,COLORWHITE;D:=SMA(K,M2,1),COLORYELLOW;量能:=3*K-2*D,LINETHICK2;RSIE:=EMA(量能,3);DIFF : EMA(RSIE,12) - EMA(RSIE,26);BBDIFF:=DIFF-REF(DIFF,1);DEA : EMA(DIFF,9);DRAWBAND(DIFF,RGB(255,105,180),DEA,RGB(34,139,34));BBDEA:=DEA-REF(DEA,1);MACD : 2*(DIFF-DEA), COLORSTICK;STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2,0),COLORFFFF00; STICKLINE(MACD<REF(MACD,1)AND MACD<0,0,MACD,2,0),COLOR00FF00; STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2,0),COLOR0099FF; STICKLINE(MACD>REF(MACD,1)AND MACD>0,0,MACD,2,0),COLORRED;0,COLORFF8855,LINETHICK2;IF(DIFF>DEA,DIFF,DRAWNULL),COLORRED,LINETHICK2;IF(DEA>REF(DEA,1),DEA,DRAWNULL),COLORMAGENTA;DRAWICON(CROSS(DIFF,DEA),DEA,1);DRAWICON(CROSS(DEA,DIFF),DEA,2);低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;STICKLINE(低位金叉,0,-1.5,2,0),COLORFFFF00;DRAWTEXT(低位金叉,-1.5,' 低位金叉'),COLORFFFF00;JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1; STICKLINE(二次金叉,0,-1,5,0),COLORFF00FF;DRAWICON(二次金叉,DEA*1.2,11) ;DRAWTEXT(二次金叉,-1,' 二次金叉'),COLORFF00FF;A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA); STICKLINE(底背离,0,1.5,3,0),COLOR00FF00;DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;DRAWTEXT(底背离,2,' 底背离'),COLOR00FF00;A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF); STICKLINE(顶背离,0,2,3,0),COLORFF8855;DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORFF8855,LINETHICK2;DRAWTEXT(顶背离,2,' 顶背离'),COLORFF8855;。
MACD 通达信副图指标 无未来通达信指标公式源码
SQX:=(C-MA(CLOSE,13))*100;DIF:EMA(MA(SQX,7),1),LINETHICK1;DEA:EMA(DIF,7),LINETHICK1;MACD: (DIF-DEA)*2,COLORSTICK;红柱持股:IF(MACD>REF(MACD,1),MACD,DRAWNULL),STICK,COLORRED,LINETHICK3;绿柱持币:IF(MACD<REF(MACD,1),MACD,DRAWNULL),STICK,COLORGREEN,LINETHICK3; 低位金叉:IF(CROSS(DIF,DEA) AND DIF<-0.1,0.3,0),COLORYELLOW,POINTDOT; STICKLINE(低位金叉,0,10,8,1),COLORYELLOW;DRAWICON(低位金叉,0.3,1);JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));二次金叉:IF(CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1,0.2,0),COLORFF00FF,POINTDOT;STICKLINE(二次金叉,25,15,8,1),COLORFF00FF;A1:=BARSLAST(REF(CROSS(DIF,DEA),1));底背离:IF(REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA),0.1,0),COLORRED,POINTDOT;STICKLINE(底背离,40,30,8,1),COLORMAGENTA;DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORMAGENTA,LINETHICK3;A2:=BARSLAST(REF(CROSS(DEA,DIF),1));顶背离:REF(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF),COLORGREEN;DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORBLUE,LINETHICK3;A3:=CROSS(DIF,DEA) AND DEA<0;零下二次金叉:IF(FILTER(COUNT(A3,21)=2,10),0.05,0),COLORWHITE,POINTDOT; STICKLINE(零下二次金叉,45,55,8,1),COLORWHITE;金叉:DRAWICON(CROSS(DIF,DEA),DIF,1); 死叉:DRAWICON(CROSS(DEA,DIF),DIF,2);。
通达信非常好用非常准确无未来的主图指标公式
通达信⾮常好⽤⾮常准确⽆未来的主图指标公式VAR1:=(C+H+O+L)/4;卖出:=XMA(VAR1,20)*(1+80/1000),POINTDOT,COLORGREEN,LINETHICK3;买⼊:=XMA(VAR1,32)*(1-100/1000),POINTDOT,COLORMAGENTA,LINETHICK3;幅度:=100*(卖出-买⼊)/买⼊,NODRAW;菩提:=买⼊+(卖出-买⼊)*2/3;{此函数仅做参考线,为提前趋势预测线,上涨途中向下见顶,下跌途中向上见底};般:=XMA(CLOSE,7);若:=MEMA(CLOSE,3);全绿K:=LONGCROSS(若,般,3) AND H>菩提;RSVL:=(CLOSE-LLV(LOW,12))/(HHV(HIGH,12)-LLV(LOW,12))*100;KL:=SMA(RSVL,3,1);DL:=SMA(KL,3,1);KKL:=SMA(RSVL,3,1);DD:=SMA(KL,3,1);NL:=KKL+DD;买⼊L:=DRAWICON(CROSS(NL,50),50,1),COLORRED;卖出L:=DRAWICON(CROSS(160,NL),160,2),COLORGREEN;卖出K:=CROSS(160,NL);TM:=(CLOSE*1.0+LOW*0.0+HIGH*0.0);T1M:=V;SL1M:=(TM/REF(TM,1)-1)*1000;趋势5:=XMA(XMA(XMA(SL1M,20),20),20),COLORYELLOW;趋势6:=XMA(XMA(XMA(SL1M,10),10),10),COLORMAGENTA;QA9:=趋势6-趋势5;QA10:=EMA(QA9,89);买⼊M:=(QA9-QA10)*2,COLORSTICK;M1:=EMA(C,5);M2:=EMA(C,13);M3:=EMA(C,34),COLORBLUE,LINETHICK2;MC1:=EMA(C,55);MC2:=EMA(C,89);MA4:=EMA(C,144);VAR1A1H:=(REF(CLOSE,1)-REF(ATR,1));买线1:=REF(EMA(C,14),1)COLORWHITE,LINETHICK3;卖线1:=IF(MC1>MAX(MC2,MA4),MC1,IF(MC1<MIN(MC2,MA4),MC2,MA4)),COLORFF00CC,LINETHICK3;⾼1:=REF(HHV(H,150),3);低1:=REF(LLV(L,150),3);STICKLINE(买线1>=卖线1,REFDATE(低1,DATE),REFDATE(低1,DATE)*0.96,6,0)COLOR001050; STICKLINE(买线1<卖线1,REFDATE(低1,DATE),REFDATE(低1,DATE)*0.96,6,0)COLOR404050;STICKLINE(买⼊M>=0,REFDATE(低1,DATE),REFDATE(低1,DATE)*0.98,2,1)COLORRED;STICKLINE(买⼊M<0,REFDATE(低1,DATE),REFDATE(低1,DATE)*0.98,2,1)COLORGREEN;STICKLINE(买⼊L,REFDATE(低1,DATE),REFDATE(低1,DATE)*0.96,2,0)COLORYELLOW;STICKLINE(卖出K AND 买⼊M<0,REFDATE(低1,DATE),REFDATE(低1,DATE)*0.96,2,0)COLORCYAN;多空趋势彩带:DRAWBAND(SMA(C,6.5,1),RGB(255,97,0),SMA(C,13.5,1),RGB(0,128,0));中线:=(卖出+买⼊)/2,POINTDOT,COLORWHITE,LINETHICK4;MA5:=MA(C,5),COLOR000099;MA10:=MA(C,10),COLOR006600;MA20:=MA(C,20),COLOR005555;ZB1:=EMA(C,34);{ 原为55或65 }长期趋势:EMA(ZB1,13),COLORRED,LINETHICK3;{原为34或55}STICKLINE(C>=REF(C,1),O,C,3,1),COLOR000000;STICKLINE(C<REF(C,1),O,C,3,1),COLOR000000;AA3:=EMA(CLOSE,5)>EMA(CLOSE,6) AND EMA(CLOSE,6)>EMA(CLOSE,7) ANDEMA(CLOSE,7)>EMA(CLOSE,8) AND EMA(CLOSE,8)>EMA(CLOSE,9)AND EMA(CLOSE,9)>EMA(CLOSE,10) AND EMA(CLOSE,10)>EMA(CLOSE,11) ANDEMA(CLOSE,11)>EMA(CLOSE,12)AND EMA(CLOSE,12)>EMA(CLOSE,13) AND EMA(CLOSE,13)>EMA(CLOSE,14);AA2:= EMA(CLOSE,14)>EMA(CLOSE,15)AND EMA(CLOSE,15)>EMA(CLOSE,20) AND EMA(CLOSE,20)>EMA(CLOSE,30) ANDEMA(CLOSE,30)>EMA(CLOSE,60) AND EMA(CLOSE,60)>EMA(CLOSE,90)AND EMA(CLOSE,90)>EMA(CLOSE,120) AND EMA(CLOSE,120)>EMA(CLOSE,250);A1:= AA2 AND AA3;A2:=EMA(CLOSE,5)>EMA(CLOSE,6) AND EMA(CLOSE,6)>EMA(CLOSE,7) ANDEMA(CLOSE,7)>EMA(CLOSE,8) AND EMA(CLOSE,8)>EMA(CLOSE,9)AND EMA(CLOSE,9)>EMA(CLOSE,10) AND EMA(CLOSE,10)>EMA(CLOSE,11) ANDEMA(CLOSE,11)>EMA(CLOSE,12)AND EMA(CLOSE,12)>EMA(CLOSE,13) AND EMA(CLOSE,13)>EMA(CLOSE,14);B1:=IF(A1,1,2);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) ORVAR6MZ) OR VAR7MZ) OR VAR8MZ) OR VAR9MZ) OR VARAMZ) OR VARBMZ) OR VARCMZ),L,H,0,0),COLOR0000DD;STICKLINE((((((((((((VAR1MZ OR VAR2MZ) OR VAR3MZ) OR VAR4MZ) OR VAR5MZ) ORVAR6MZ) OR VAR7MZ) OR VAR8MZ) OR VAR9MZ) OR VARAMZ) OR VARBMZ) OR VARCMZ),C,REF(C,1),3,0),COLOR000099;STICKLINE((((((((((((VAR1MZ OR VAR2MZ) OR VAR3MZ) OR VAR4MZ) OR VAR5MZ) ORVAR6MZ) OR VAR7MZ) OR VAR8MZ) OR VAR9MZ) OR VARAMZ) OR VARBMZ) OR VARCMZ),C,REF(C,1),2,0),COLOR0000BB;STICKLINE((((((((((((VAR1MZ OR VAR2MZ) OR VAR3MZ) OR VAR4MZ) OR VAR5MZ) ORVAR6MZ) OR VAR7MZ) OR VAR8MZ) OR VAR9MZ) OR VARAMZ) OR VARBMZ) OR VARCMZ),C,REF(C,1),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) ORVAR18MZ),C,REF(C,1),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,REF(C,1),2 ,0 ),COLOR00DD00;STICKLINE((((((((((((VARDMZ OR VAREMZ) OR VARFMZ) OR VAR10MZ) OR VAR11MZ) ORVAR12MZ) OR VAR13MZ) OR VAR14MZ) OR VAR15MZ) OR VAR16MZ) OR VAR17MZ) ORVAR18MZ),C,REF(C,1),1 ,0 ),COLOR00FF00;STICKLINE((((((((((((VARDMZ OR VAREMZ) OR VARFMZ) OR VAR10MZ) OR VAR11MZ) OR VAR12MZ) OR VAR13MZ) OR VAR14MZ) OR VAR15MZ) OR VAR16MZ) OR VAR17MZ) ORVAR18MZ),H,L,0,0 ),COLOR00DD00;VAR19MZ:=(REF((((((((((((VARDMZ OR VAREMZ) OR VARFMZ) OR VAR10MZ) OR VAR11MZ) OR VAR12MZ) OR VAR13MZ) OR VAR14MZ) OR VAR15MZ) OR VAR16MZ) OR VAR17MZ) ORVAR18MZ),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);{粉红}STICKLINE(VAR19MZ,REF(CLOSE,1),REF(CLOSE,2),3 ,0 ),COLORFF11FF;STICKLINE(VAR19MZ,REF(CLOSE,1),REF(CLOSE,2),2 ,0 ),COLORFF44FF;STICKLINE(VAR19MZ,REF(CLOSE,1),REF(CLOSE,2),1 ,0 ),COLORFF66FF;{黄⾊}STICKLINE(VAR1AMZ,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR00AAFF;STICKLINE(VAR1AMZ,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR00CCFF;STICKLINE(VAR1AMZ,REF(CLOSE,1),REF(CLOSE,2),1,0),COLOR00EEFF;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) ANDREF(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)) ORREF(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) ANDREF(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) ANDREF(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) ANDCROSS(VAR09,MA(VAR09,2)))=1,5);VAR12:=FILTER((HHV(VAR09,2)=HHV(VAR09,7) AND COUNT(VAR09>50,2) ANDCROSS(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) ANDREF(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) ANDREF(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) ANDREF(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);ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,⾛强2),0);DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,⾛弱2),0);DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,⾛弱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;W18:=EXIST(XGQ,1);DRAWTEXT(XGQ,L-0.1,'●放⼼买'),COLORRED;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) AND DIFF<-0.1) ,L-0.2,DRAWNULL),COLORMAGENTA,LINETHICK9,CROSSDOT;低位⾦叉:=IF(CROSS(DIFF,DEA) AND DIFF<-0.1,15,DRAWNULL),COLORMAGENTA,LINETHICK9,CROSSDOT;IF(CROSS(DIFF,DEA) AND DIFF<-0.1,L-0.2,DRAWNULL),COLORYELLOW,LINETHICK4,POINTDOT;{再上N均线 N 10 1 100 1}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.2,'●有⾏情'),COLORGREEN;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) AND REF(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) ANDREF(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) ANDREF(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) ANDREF(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) ANDREF(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) ANDREF(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) ANDREF(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) ANDREF(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;⽜节点:=CROSS(EMA(C,5),EMA(C,30))AND CROSS(EMA(C,10),EMA(C,20));DRAWICON(⽜节点,L-0.1,13);CSAR:=SAR(10,2,20);持币:=IF(CSAR>=H,CSAR,0),CIRCLEDOT,COLORGREEN{持币};持股:=IF(CSAR<=L,CSAR,0),CIRCLEDOT,COLORRED{持股};⽣命线2:=EMA(SLOPE(C,21)*20+C,42),LINETHICK2,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.1),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 < MA20。
通达信指标公式源码 主图源码 说明 无未来
PT:=REF(HIGH,1)-REF(LOW,1);CDP:=(HIGH + LOW + CLOSE)/3;买1:CDP+PT,COLORBLUE,DOTLINE;买2:CDP-PT,COLORFF00FF,DOTLINE;卖1:2*CDP-LOW,COLORYELLOW,DOTLINE;卖2:2*CDP-HIGH,DOTLINE;近高值:=IF(买1>卖1,卖1,买1);近低值:=IF(买2<卖2,卖2,买2);DRAWTEXT(ISLASTBAR,H,'近高值'),COLORRED ; DRAWNUMBER(ISLASTBAR,C,近高值),COLORGREEN; DRAWTEXT(ISLASTBAR,L,'近低值'),COLORRED ; DRAWNUMBER(ISLASTBAR,O,近低值),COLORYELLOW; AA:=(C-REF(C,1))/REF(C,1)*100;DRAWTEXT(AA<-5,H,'★'),COLORWHITE; DRAWNUMBER(AA<-5,O,L)COLORFF00FF;VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2); VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2);VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2);VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2);VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2);VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2);VARA:=REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2);VARB:=REF(VARA,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2);VARC:=REF(VARB,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2);VARD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);VARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2);VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2);VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2);VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2);VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2);VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2);VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2);VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2);VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2);VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2);VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2);VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 ORVAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;VAR1A:=REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 ORVAR8 OR VAR9 OR VARA OR VARB OR VARC,1) AND VARD;STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR00FFFF;{黄色} STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),2,0),COLORFF00FF;{粉红色} DRAWICON(VAR19,REF(CLOSE,1)*0.99,1);DRAWICON(VAR1A,REF(CLOSE,1)*1.01,2);DRAWTEXT_FIX(CURRBARSCOUNT=1,0.02,0.01,0,'===¥短线利器,低吸高抛¥==='),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.02,0.08,0,'===¥聚沙成塔,绝无深套¥==='),COLORFF6EC7;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.02,0.8,0,'【爱你=爱我温馨提示】===¥在黄色价位附近低吸?¥==='),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.02,0.85,0,'【爱你=爱我温馨提示】===¥在绿色价位附近高抛?¥==='),COLORGREEN;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.02,0.9,0,'【爱你=爱我温馨提示】===¥在粉红色价位附近逃命?¥==='),COLORFF00FF;。
通达信公式源码指标软件绝对没有未来函数
绝对没有未来函数说明;一、在底部参数为20下方出现信号为抄底谨慎进入!二、在20至50之间出现信号为拉升可以进入!三、在50至65之间出现信号为强势可以持股!四、在65至80之间出现信号为持股不再进入!五、大于80 为出货此指标做小波段极为好用爱做小波段的朋友可以试试!参数;N,2,90,9 M,2,30,3LOWV:=LLV(LOW,9);HIGHV:=HHV(HIGH,9);RSV:=EMA((CLOSE-LOWV)/(HIGHV-LOWV)*100,3);K:EMA(RSV,3)COLORRED;D:MA(K,3);AB:=C>O;AB1:=O>C AND C/REF(C,1)>1.015;AAA:=AB OR AB1;AA:=C>REF(C,1)AND C>REF(O,1)AND VOL>=REF(VOL,1)/1.04 AND K<80 AND K>50 AND CROSS(K,D) AND AAA ;AA1:=C>REF(C,1)AND C>REF(O,1)AND VOL>=REF(VOL,1)/1.04 AND K<50 AND CROSS(K,D) AND AAA ;DRAWICON(AA,D,17);DRAWICON(AA1,D,26);DRAWTEXT(AA,D-0.38,'↖加仓'),COLORYELLOW;A:80,COLORRED,LINETHICK2;B:20,COLORGREEN,LINETHICK2;T:65,COLORMAGENTA,DOTLINE,LINETHICK1;E:50,COLORYELLOW,LINETHICK2;。