突破趋势线指标主图源码通达信指标公式源码

合集下载

回调突破主图指标源码通达信指标公式源码

回调突破主图指标源码通达信指标公式源码

B1:=MA(C,1);B2:=SMA(SMA(SMA(B1,2,1),2,1),2,1);SMA2:=MA(B2,3);停损下限:IF(LLV(MA(B2,8),3)<B2,LLV(MA(B2,8),3),B2);IF(B2>SMA2,B2,DRAWNULL),COLORRED,LINETHICK4;IF(B2<SMA2,B2,DRAWNULL),COLORGREEN,LINETHICK4;SNAKEA:HHV(MA(B2,1),13),COLORYELLOW;VAR1A:=(2*CLOSE+HIGH+LOW)/4;VAR2A:=MA(VAR1A,7);VAR3A:=VAR2A-MA(VAR1A,7/2)<0;VAR4A:=VAR2A-MA(VAR1A,7/2)>0;VAR5A:=BARSLAST(VAR3A);VAR6A:=0-BARSLAST(VAR4A);VAR7A:=IF(VAR3A<=0,VAR5A,VAR6A);STICKLINE(SNAKEA>B2 AND B2>SMA2,SNAKEA,B2,0,0),COLORBLUE; STICKLINE(SNAKEA>SMA2 AND B2<SMA2,SNAKEA,SMA2,0,0),COLORBLUE; VAR11A:=(CLOSE*2+HIGH+LOW)/4;VAR21A:=EMA(VAR11A,13)-EMA(VAR11A,34);VAR31A:=EMA(VAR21A,5);{STICKLINE((C>=O),OPEN,LOW,0,0),COLOR0726CA;STICKLINE((C>=O),CLOSE,HIGH,0,0),COLOR0726CA;STICKLINE((C<O),CLOSE,LOW,0,0),COLORDE9100;STICKLINE((C<O),OPEN,HIGH,0,0),COLORDE9100;STICKLINE((C<O),CLOSE,OPEN,2.5,0),COLORFFCC00;STICKLINE((C<O),CLOSE,OPEN,1.5,0),COLORFFFF00;STICKLINE((C>O),CLOSE,OPEN,2,0),COLOR0754E9;STICKLINE((C>O),CLOSE,OPEN,1.5,0),COLOR076EF3;STICKLINE((C>O),CLOSE,OPEN,1,0),COLOR077BF3;}VAR2:=((CLOSE > REF(CLOSE,1)) AND (CLOSE > REF(CLOSE,2)));VAR3:=((REF(VAR2,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2))); VAR4:=((REF(VAR3,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2))); VAR5:=((REF(VAR4,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2))); VAR6:=((REF(VAR5,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2))); VAR7:=((REF(VAR6,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2))); VAR8:=((REF(VAR7,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2))); VAR9:=((REF(VAR8,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2))); VARA:=((REF(VAR9,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2))); VARB:=((REF(VARA,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2))); VARC:=((REF(VARB,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2))); VARD:=((REF(VARC,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2))); VARE:=((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,2)));VARF:=((REF(VARE,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2))); VAR10:=((REF(VARF,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAR11:=((REF(VAR10,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VAR12:=((REF(VAR11,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAR13:=((REF(VAR12,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VAR14:=((REF(VAR13,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAR15:=((REF(VAR14,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VAR16:=((REF(VAR15,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAR17:=((REF(VAR16,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VAR18:=((REF(VAR17,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));VAR19:=((REF(VAR18,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));VAR1B:=(REF((((((((((((VARE OR VARF) OR VAR10) OR VAR11) OR VAR12) OR VAR13) OR VAR14) OR VAR15) OR VAR16) OR VAR17) OR VAR18) OR VAR19),1) AND VAR2); {STICKLINE(VAR1B,O,O+(C-O)/3,3,0),COLOR10D0FF;}STICKLINE(VAR1B,O,O+(C-O)/3,2,0),COLOR10FFFF;STICKLINE(VAR1B,O,O+(C-O)/3,1,0),COLOR00FFFF;AA:=(REF((((((((((((VAR2 OR VAR3) OR VAR4) OR VAR5) OR VAR6) OR VAR7) OR VAR8) OR VAR9) OR VARA) OR VARB) OR VARC) OR VARD),1) AND VARE);{STICKLINE(AA,O,O+(C-O)/3,3,0),COLOR00DD00;}STICKLINE(AA,O,O+(C-O)/3,2,0),COLOR00EE00;STICKLINE(AA,O,O+(C-O)/3,1,0),COLOR00FF00;A13:=EMA(CLOSE,55);A14:=MA(CLOSE,75);A15:=EMA(A14,3);A16:=EMA(A15,3);A17:=(HIGH + LOW) / 5;A18:=(MA(A17,4)) - (MA(A17,34));A19:=CROSS(A18,0);A20:=CROSS(0,A18);A21:=BARSLAST(A19);A22:=BARSLAST(A20);A23:=REF(A19,1);A24:=REF(A20,1);A25:=BARSLAST(A23);A26:=BARSLAST(A24);A27:=IF((A25 < A26),(REF((HHV(HIGH,2)),A25)),(REF((LLV(LOW,2)),A26)));A28:=(((REF(CLOSE,1)) <= (REF(A27,1))) AND (CLOSE > A27)) AND (A21 < A22); A29:=(((REF(CLOSE,1)) >= (REF(A27,1))) AND (CLOSE < A27)) AND (A22 < A21); A30:=A28 AND ((COUNT(A28,A21)) = 1);A31:=A29 AND ((COUNT(A29,A22)) = 1);A32:=A30 AND ((REF(BARSLAST(A31),1)) < (REF(BARSLAST(A30),1)));A33:=A31 AND ((REF(BARSLAST(A31),1)) > (REF(BARSLAST(A30),1))); DRAWTEXT(A32,SMA2*0.99,'←═≒∝'),COLORYELLOW;AC:=AMOUNT/(VOL);YY:=MA(AC,13);LLL:=(C-YY)/YY*100;MIDC := MA(CLOSE,22);UPPERC:= MIDC + 2*STD(C,22);LOWERC:= MIDC - 2*STD(C,22);BBA:=(C-LOWERC)/(UPPERC-LOWERC);BBC:=FORCAST(BBA,3);LIFENGCYC:=(REF(LLL,1)<-15 AND REF(BBA,1)<0 AND LLL>REF(LLL,1));{//STICKLINE(LIFENGCYC,BBC,0.5,6,0);}{/BBD:(UPPER+LOWER)/2*(C-UPPER);}STICKLINE(LIFENGCYC>0,C,O,2,0),COLOR10ABFF;{STICKLINE(LIFENGCYC>0,C,O,1.5,0),COLOR10D0FF;STICKLINE(LIFENGCYC>0,C,O,1,0),COLOR10FFFF;}DRAWTEXT(LIFENGCYC>0,LOW*0.99,'☆'),COLORDD00DD;TJ:=DYNAINFO(4)>0AND HHV(HIGH,10)/LLV(LOW,10)<1.25AND REF(CLOSE,1)<(LLV(LOW,15)+(HHV(HIGH,15)-LLV(LOW,15))*0.85)AND CLOSE>OPENAND CLOSE>=HHV(HIGH,10);STICKLINE(C/REF(C,1)>=1.096 AND H=C,O,C,1,0),COLORYELLOW; 放量突破:TJ,NODRAW,COLORRED;DRAWTEXT(TJ,L-0.3,'放量突破'),COLORRED;W1:=C=HHV(C,20);W2:=BARSLAST(W1);W3:=IF(W2>0,REF(C,W2),REF(C,W2));W4:=CROSS(C,REF(W3,1));回调突破:=W4 AND COUNT(W4,5)=1;DRAWTEXT(回调突破>0,MA(L,3),'*回调突破'),COLORYELLOW;敢死队操作线:MA(C,24),LINETHICK2,COLORLIMAGENTA;。

突破趋势线指标主图源码通达信指标公式源码

突破趋势线指标主图源码通达信指标公式源码

源码:{连结MACD相邻红绿柱区间内高低点画趋势线通达信}DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIFF,9);N1:=BARSLAST(CROSS(DIFF,DEA))+1;{最近一次满足条件DIFF上穿DEA的K线到当前的距离}N2:=BARSLAST(CROSS(DEA,DIFF))+1;{最近一次满足条件DIFF下穿DEA的K线到当前的距离}{当前是DIFF>DEA的状态,连结最近两个DIFF>DEA区间(不包含当前区间)内最高点的趋势线}A1:=BACKSET(ISLASTBAR &&N1<N2,REF(REF(HHVBARS(H,N1)+1,N2),N2)+REF(N2,N2)+N2);B1:=BACKSET(ISLASTBAR && N1<N2,REF(HHVBARS(H,N1),N2)+N2+1); DRAWLINE(CROSS(A1,0.5),H,CROSS(B1,0.5),H,1),COLORRED;{当前是DIFF>DEA的状态,连结最近两个DIFF<DEA区间内最低点的趋势线}A2:=BACKSET(ISLASTBAR &&N1<N2,REF(REF(LLVBARS(L,N2)+1,N1),N2)+REF(N1,N2)+N2);B2:=BACKSET(ISLASTBAR && N1<N2,REF(LLVBARS(L,N2)+1,N1)+N1);DRAWLINE(CROSS(A2,0.5),L,CROSS(B2,0.5),L,1),COLORGREEN;{当前是DIFF<DEA的状态,连结最近两个DIFF<DEA区间(不包含当前区间)内最低点的趋势线}A3:=BACKSET(ISLASTBAR &&N1>N2,REF(REF(LLVBARS(L,N2)+1,N1),N1)+REF(N1,N1)+N1);B3:=BACKSET(ISLASTBAR && N1>N2,REF(LLVBARS(L,N2),N1)+N1+1);DRAWLINE(CROSS(A3,0.5),L,CROSS(B3,0.5),L,1),COLORGREEN;{当前是DIFF<DEA的状态,连结最近两个DIFF>DEA区间内最高点的趋势线}A4:=BACKSET(ISLASTBAR &&N1>N2,REF(REF(HHVBARS(H,N1)+1,N2),N1)+REF(N2,N1)+N1);B4:=BACKSET(ISLASTBAR && N1>N2,REF(HHVBARS(H,N1)+1,N2)+N2); DRAWLINE(CROSS(A4,0.5),H,CROSS(B4,0.5),H,1),COLORRED;。

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

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

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

通达信指标公式源码 自动画线主图指标公式

通达信指标公式源码 自动画线主图指标公式

N1:=10;N2:=10;DISP:=2;K:=IF(PERIOD=5,1,{日}IF(PERIOD=6,1,{周}IF(PERIOD=7,1,{月}IF(PERIOD=8,1,{多分钟}IF(PERIOD=9,1,{多日}IF(PERIOD=10,1,{季}IF(PERIOD=11,2,{年}IF(PERIOD=4,1,{60F}IF(PERIOD=3,1,{30F}IF(PERIOD=2,1,{15F}IF(PERIOD=1,1{5F},1{1F})))))))))))/10;P1:=PEAK(1,K*N1,1);P2:=PEAK(1,K*N1,2);WP1:=PEAKBARS(1,K*N1,1);WP2:=PEAKBARS(1,K*N1,2);T1:=TROUGH(2,K*N2,1);T2:=TROUGH(2,K*N2,2);WT1:=TROUGHBARS(2,K*N2,1);WT2:=TROUGHBARS(2,K*N2,2);TJ1:=P1>T1 AND P2>T2 ;ZD:=MAX(T1,T2);ZG:=MIN(P1,P2);LL:=MIN(T1,T2);HH:=MAX(P1,P2);TJ2:=FILTER(ZG>ZD,2);TJ3:=ZG=REF(ZG,BARSLAST(TJ2)) OR ZD=REF(ZD,BARSLAST(TJ2));TJ4:=TJ1&&TJ2&&NOT(TJ3);TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST( TJ4),1)));TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST( TJ4),1)));TJ7:=ZG>REF(ZG,REF(BARSLAST(TJ4),1))&&ZD<REF(ZD,REF(BARSLAST(TJ4 ),1));TJ8:=TJ4&&NOT(TJ5 OR TJ6 OR TJ7);ZSD:=IF(TJ8,ZD,DRAWNULL);ZSG:=IF(TJ8,ZG,DRAWNULL);ZSH:=IF(TJ8,HH,DRAWNULL);ZSL:=IF(TJ8,LL,DRAWNULL);STICKLINE(TJ8,ZSH,ZSL,0,-1),COLORMAGENTA;STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA; DRAWTEXT(DISP=2,ZSH,'中枢'),COLORWHITE;中枢高:=PLOYLINE(DISP=2,REF(ZSD,BARSLAST(TJ8))),CIRCLEDOT,COLORLIRED; 中枢低:=PLOYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CIRCLEDOT,COLORLIGRE EN;{中枢最高:PLOYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,COLORRED;中枢最低:PLOYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,COLORGREEN;} 趋势高:=PLOYLINE(DISP=3,ZIG(1,K*N1)),COLORLIBLUE;趋势低:=PLOYLINE(DISP=3,ZIG(2,K*N2)),COLORLIBLUE;局部低点预选A:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4);局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2);局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0); 局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2);局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0); 缺口判断:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0));距前高天:=BARSLAST(局部高点预选C=1);距前低天:=BARSLAST(局部低点预选C=-1);小值周期:=LOWRANGE(L);大值周期:=TOPRANGE(H);低保留AA:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留AB:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)<REF(LLV(L,距前低天+1),1)),-1,0);低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L<REF(H,距前高天+1),-1,0);预判:=IF((距前低天<4 AND HHV(缺口判断,距前低天)!=1) OR REF(低保留S,距前低天)=0,1,0);判断:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND 预判=1 AND 大值周期>REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);高保留A:=IF(局部高点预选C=1 AND REF(距前低天,1)>REF(距前高天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HHV(缺口判断,距前低天)=1),1,0);高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0);预判A:=IF((距前高天<4 AND HHV(缺口判断,距前高天)!=1) OR REF(高保留,距前高天)=0,1,0);判断A:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND 预判A=1 AND 小值周期>REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND 小值周期>REF(小值周期,距前低天),-1,0);低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留B:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0);低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L<REF(H,距前高天+1),-1,0); 距前高天A:=BARSLAST(高保留=1);距前低天A:=BARSLAST(低保留=-1);预判X:=IF((距前低天A<4 AND HHV(缺口判断,距前低天A)!=1) OR REF(低保留,距前低天A)=0,1,0);判断X:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND 预判X=1 AND 大值周期>REF(小值周期,距前低天A+1) AND 大值周期>REF(小值周期,距前低天A) AND 大值周期>REF(大值周期,距前高天A),1,0); 高保留XA:=IF(局部高点预选C=1 AND REF(距前低天A,1)>REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);高保留XB:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A>=4 OR HHV(缺口判断,距前低天A)=1),1,0);高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND H>REF(L,距前低天A+1),1,0);预判XA:=IF((距前高天A<4 AND HHV(缺口判断,距前高天A)!=1) OR REF(高保留XA,距前高天A)=0,1,0);判断XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND 预判XA=1 AND 小值周期>REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AND 小值周期>REF(小值周期,距前低天A),-1,0); 低保留XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)>REF(距前低天A,1) AND LLV(L,距前高天A+1)<REF(LLV(L,距前高天A+1),1),-1,0);低保留XB:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND (距前高天A>=4 OR LLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0);低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND L<REF(H,距前高天A+1),-1,0);距前高天YA:=BARSLAST(高保留X=1);距前低天YA:=BARSLAST(低保留X=-1);预判YX:=IF((距前低天YA<4 AND HHV(缺口判断,距前低天YA)!=1) OR REF(低保留X,距前低天YA)=0,1,0);判断YX:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND 预判YX=1 AND 大值周期>REF(小值周期,距前低天YA+1) AND 大值周期>REF(小值周期,距前低天YA) AND 大值周期>REF(大值周期,距前高天YA),1,0);高保留YXA:=IF(局部高点预选C=1 AND REF(距前低天YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND REF(低保留X,距前低天YA)=-1 AND (距前低天YA>=4 OR HHV(缺口判断,距前低天YA)=1),1,0);高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) ANDH>REF(L,距前低天YA+1),1,0);预判YXA:=IF((距前高天YA<4 AND HHV(缺口判断,距前高天YA)!=1) ORREF(高保留YXA,距前高天YA)=0,1,0);判断YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND 预判YXA=1 AND 小值周期>REF(大值周期,距前高天YA+1) AND小值周期>REF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0);低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)<REF(LLV(L,距前高天YA+1),1),-1,0);低保留YXB:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND (距前高天YA>=4 OR LLV(缺口判断,距前高天YA)=-1 OR 判断YXA=-1),-1,0);低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND L<REF(H,距前高天YA+1),-1,0);AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L<REF(L,REF(距前低天YA,1)+2),-1,0));极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);局部极点:=IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)) CIRCLEDOT COLORYELLOW;{大折线}A1:=REF(HIGH,10)=HHV(HIGH,2*10+1);B1:=FILTER(A1,10);C1:=BACKSET(B1,10+1);D1:=FILTER(C1,10);{高点}A2:=REF(LOW,10)=LLV(LOW,2*10+1);B2:=FILTER(A2,10);C2:=BACKSET(B2,10+1);D2:=FILTER(C2,10);{低点}E1:=(REF(LLV(LOW,2*10),1)+REF(HHV(HIGH,2*10),1))/2;E2:=(HIGH+LOW)/2;H1:=(D1 AND NOT((D2 AND E1>=E2))) OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;L1:=(D2 AND NOT((D1 AND E1<E2)));H2:=D1 AND NOT((D2 AND E1>=E2));X1:=REF(BARSLAST(H1),1)+1;F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1)); G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I1,1);{过滤后低点}L2:=LD OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));G2:=F2>REF(F2,1);I2:=BACKSET(G2,2);HD:=I2>REF(I2,1);{过滤后高点}DRAWLINE(LD,L,HD,H,0),COLORMAGENTA,DOTLINE,LINETHICK1; DRAWLINE(HD,H,LD,L,0),COLORMAGENTA,DOTLINE,LINETHICK1;J1:=BACKSET(ISLASTBAR ,MIN(BARSLAST(HD),BARSLAST(LD))+1);J2:=J1>REF(J1,1);DRAWLINE(J2,IF(HD,H,L),ISLASTBAR ,IF(BARSLAST(HD)>BARSLAST(LD),H,L ),0),COLORWHITE,LINETHICK1;{趋势线}UU:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);VV:=UU>REF(UU,1);WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);XX:=WW>REF(WW,1);DRAWLINE(XX,L,VV,L,1),COLORRED,LINETHICK2;UU2:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);VV2:=UU2>REF(UU2,1);WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);XX2:=WW2>REF(WW2,1);DRAWLINE(XX2,H,VV2,H,1),COLORGREEN,LINETHICK2;。

通达信指标公式源码平台突破主图指标公式

通达信指标公式源码平台突破主图指标公式

通达信平台突破主图指标公式DRAWGBK(OPEN>0,RGB(33,47,58),RGB(0,0,0),0,'02',0);{标缺口}LL:=REF(L,1);HH:=REF(H,1);上跳:=L>HH;下跳:=H<LL;STICKLINE(L>REF(H,1),L,REF(H,1),3.1,-1),COLORRED;STICKLINE(REF(L,1)>H,REF(L,1),H,3.1,-1),COLORGREEN;{K线}A19:=1;{灰色}STICKLINE((OPEN >= (CLOSE * A19)),HIGH,LOW,0,0),COLOR909090; STICKLINE((OPEN >= (CLOSE * A19)),CLOSE,OPEN,3.1,0),COLOR606060; STICKLINE((OPEN >= (CLOSE * A19)),CLOSE,OPEN,2.1,0),COLOR707070; STICKLINE((OPEN >= (CLOSE * A19)),CLOSE,OPEN,1.2,0),COLOR808080; STICKLINE((OPEN >= (CLOSE * A19)),CLOSE,OPEN,0.2,0),COLOR909090; STICKLINE((OPEN <= (CLOSE * A19)),HIGH,LOW,0,0),COLOR666B6F; STICKLINE((CLOSE > (OPEN * A19)),CLOSE,OPEN,3.1,1),COLOR666B6F; {涨停-红色}ZDF:=(C-REF(C,1))/REF(C,1)*100;STICKLINE(ZDF>9.5,C,O,3.1,0),COLOR0000CC;STICKLINE(ZDF>9.5,C,O,2.1,0),COLOR0000DD;STICKLINE(ZDF>9.5,C,O,1.2,0),COLOR0000EE;STICKLINE(ZDF>9.5,C,O,0.2,0),COLOR0000FF;STICKLINE(ZDF>9.5,HIGH,LOW,0 ,0),COLOR0000FF;{跌停-绿色}STICKLINE(ZDF<-9.9,O,C,3.1,0),COLOR66CC66;STICKLINE(ZDF<-9.9,O,C,2.1,0),COLOR77DD77;STICKLINE(ZDF<-9.9,O,C,1.2,0),COLOR88EE88;STICKLINE(ZDF<-9.9,O,C,0.2,0),COLOR99FF99;STICKLINE(ZDF<-9.9,HIGH,LOW,0 ,0),COLOR99FF99;{ST或非ST涨跌停}{ST涨停-红色}STICKLINE((NAMELIKE('S') OR NAMELIKE('*')) AND ZDF>=4.945 ANDC=H,O,C,3.1,0),COLOR0000CC;STICKLINE((NAMELIKE('S') OR NAMELIKE('*')) AND ZDF>=4.945 ANDC=H,O,C,2.1,0),COLOR0000DD;STICKLINE((NAMELIKE('S') OR NAMELIKE('*')) AND ZDF>=4.945 ANDC=H,O,C,1.2,0),COLOR0000EE;STICKLINE((NAMELIKE('S') OR NAMELIKE('*')) AND ZDF>=4.945 ANDC=H,O,C,0.2,0),COLOR0000FF;STICKLINE((NAMELIKE('S') OR NAMELIKE('*')) AND ZDF>=4.945 ANDC=H,HIGH,LOW,0 ,0),COLOR0000FF;{ST跌停-绿色}STICKLINE((NAMELIKE('S') OR NAMELIKE('*')) AND ZDF<=-4.945 ANDC=C,O,C,3.1,0),COLOR66CC66;STICKLINE((NAMELIKE('S') OR NAMELIKE('*')) AND ZDF<=-4.945 ANDC=C,O,C,2.1,0),COLOR77DD77;STICKLINE((NAMELIKE('S') OR NAMELIKE('*')) AND ZDF<=-4.945 ANDC=C,O,C,1.2,0),COLOR88EE88;STICKLINE((NAMELIKE('S') OR NAMELIKE('*')) AND ZDF<=-4.945 ANDC=C,O,C,0.2,0),COLOR99FF99;STICKLINE((NAMELIKE('S') OR NAMELIKE('*')) AND ZDF<=-4.945 ANDC=C,HIGH,LOW,0 ,0),COLOR99FF99;DRAWTEXT_FIX(1,0.6,0.02,0,'【名称】:'),COLORGREEN; DRAWTEXT_FIX(1,0.675,0.02,0,STKNAME),COLORYELLOW; DRAWTEXT_FIX(1,0.6,0.07,0,'【代码】:'),COLORGREEN; DRAWTEXT_FIX(1,0.675,0.07,0,CODE),COLOR0080FF;新价:CONST(C),COLORCYAN,DOTLINE;DRAWTEXT_FIX(1,0.6,0.12,0,'【现价】:'),COLORGREEN; DRAWNUMBER_FIX(1,0.675,0.12,0,新价),COLORCYAN;{即时显示当天均价位}DRAWTEXT_FIX(1,0.6,0.17,0,'【均价】:'),COLORGREEN; DRAWNUMBER_FIX(1,0.675,0.17,0,DYNAINFO(11)),COLORWHITE;{以上没有未来}{平台突破画线-有未来-若不需要可自行删除}HD:=FILTER(BACKSET(FILTER(REF(H,10)=HHV(H,2*10+1),10),10+1),10); LD:=FILTER(BACKSET(FILTER(REF(L,10)=LLV(L,2*10+1),10),10+1),10); A:=REF(H,BARSLAST(HD));B:=REF(L,BARSLAST(LD));T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD);T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);波顶:IF(T1,A,A),COLORWHITE,POINTDOT,LINETHICK2;波底:IF(T2,B,B),COLORWHITE,POINTDOT,LINETHICK2;。

天下无敌趋势画线主图通达信指标公式源码

天下无敌趋势画线主图通达信指标公式源码

天下⽆敌趋势画线主图通达信指标公式源码RC1:=REF(C,1);AA:=REF(H,8)=HHV(H,2*8+1);AA1:=REF(L,8)=LLV(L,2*8+1);QY:=BACKSET(AA,8+1);QY1:=BACKSET(AA1,8+1);CC2:=FILTER(QY,8) AND H=HHV(H,8+1);CC1:=FILTER(QY1,8) AND L=LLV(L,8+1);DDD:=BARSLAST(CC2);DD1:=BARSLAST(CC1);GDTS:=IF(CC2,CURRBARSCOUNT,0);DDTS:=IF(CC1,CURRBARSCOUNT,0); DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS); DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);GDCS1:=CONST(DINGBUTS);DDCS1:=CONST(DDTS1);GDCS13:=CONST(REF(H,GDCS1-1));DDCS13:=CONST(REF(L,DDCS1-1));DINGBUTS1:=REF(DINGBUTS,DDD+1);DDTS2:=REF(DDTS1,DD1+1);GDCS2:=CONST(DINGBUTS1);DDCS2:=CONST(DDTS2);GDCS23:=CONST(REF(H,DINGBUTS1-1));DDCS23:=CONST(REF(L,DDTS2-1));XG1:=BACKSET(ISLASTBAR,GDCS1);XD1:=BACKSET(ISLASTBAR,DDCS1);XG2:=BACKSET(ISLASTBAR,DINGBUTS1);XD2:=BACKSET(ISLASTBAR,DDTS2);M:=INTPART(3*8/5);AAA:=REF(H,M)=HHV(H,2*M+1);QYY:=BACKSET(AAA,M+1);CCC:=FILTER(QYY,M) AND H=HHV(H,M+1); DDDD:=BARSLAST(CCC),NODRAW;GDTSS:=IF(CCC,CURRBARSCOUNT,0); DINGBUTSS:=IF(DDDD,REF(GDTSS,DDDD),GDTSS); GDCS11:=CONST(DINGBUTSS);DINGBUTS11:=REF(DINGBUTSS,DDDD+1);GDCS22:=CONST(DINGBUTS11);AA11:=REF(L,M)=LLV(L,2*M+1);QY11:=BACKSET(AA11,M+1);CC11:=FILTER(QY11,M) AND L=LLV(L,M+1);DD11:=BARSLAST(CC11);DDTSS:=IF(CC11,CURRBARSCOUNT,0);DDTS11:=IF(DD11,REF(DDTSS,DD11),DDTSS);DDCS11:=CONST(DDTS11);DDTS22:=REF(DDTS11,DD11+1);DDCS22:=CONST(DDTS22);AA1F:=REF(H,5)=HHV(H,2*5+1);B1:=FILTER(AA1F,5);CH:=BACKSET(B1,5+1);D1:=FILTER(CH,5);R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);S11:=R11>REF(R11,1);AA2:=REF(L,5)=LLV(L,2*5+1);B2:=FILTER(AA2,5);C12:=BACKSET(B2,5+1);D2:=FILTER(C12,5);T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);U11:=T11>REF(T11,1);HIGHN:=10;LOWN:=10;AAR:=REF(H,HIGHN)=HHV(H,2*HIGHN+1);QYQ:=BACKSET(AAR,HIGHN+1);CCQ:=FILTER(QYQ,HIGHN) AND H=HHV(H,HIGHN+1);DDDQQ:=BARSLAST(CCQ);GDTSQ:=IF(CCQ,CURRBARSCOUNT,0);DINGBUTSQ:=IF(DDDQQ,REF(GDTSQ,DDDQQ),GDTSQ);GDCS1Q:=CONST(DINGBUTSQ);DINGBUTS1Q:=REF(DINGBUTSQ,DDDQQ+1);GDCS2Q:=CONST(DINGBUTS1Q);AA1Q:=REF(L,LOWN)=LLV(L,2*LOWN+1);QY1Q:=BACKSET(AA1Q,LOWN+1);CC1Q:=FILTER(QY1Q,LOWN) AND L=LLV(L,LOWN+1);DD1Q:=BARSLAST(CC1Q);DDTSQ:=IF(CC1Q,CURRBARSCOUNT,0);DDTS1Q:=IF(DD1Q,REF(DDTSQ,DD1Q),DDTSQ);DDCS1Q:=CONST(DDTS1Q);DDTS2Q:=REF(DDTS1Q,DD1Q+1);DDCS2Q:=CONST(DDTS2Q);TJ2:=BACKSET(ISLASTBAR,SUMBARS(V,CAPITAL));TJ3:=TJ2>REF(TJ2,1);上:DRAWLINE(CURRBARSCOUNT=GDCS22,H,CURRBARSCOUNT=GDCS11,H,1),COLORGRAY,LINETHICK1;下:DRAWLINE(CURRBARSCOUNT=DDCS22,L,CURRBARSCOUNT=DDCS11,L,1) COLORGRAY,LINETHICK1;IF(XG2,GDCS23,DRAWNULL),COLORC0C0C0,POINTDOT;IF(XG1,GDCS13,DRAWNULL),COLORC0C0C0,POINTDOT;IF(XD2,DDCS23,DRAWNULL),COLORC0C0C0,POINTDOT;IF(XD1,DDCS13,DRAWNULL),COLORC0C0C0,POINTDOT;短压:DRAWLINE(D1,H,S11,H,1),COLOR808000;短撑:DRAWLINE(D2,L,U11,L,1),COLOR808000;⾼压:DRAWLINE(CURRBARSCOUNT=GDCS2Q,H,CURRBARSCOUNT=GDCS1Q,H,1) COLORMAGENTA,LINETHICK1;低撑:DRAWLINE(CURRBARSCOUNT=DDCS2Q,L,CURRBARSCOUNT=DDCS1Q,L,1),COLORM AGENTA,LINETHICK1; {以上为趋势线⾃动划线}Z1:=STRCAT(HYBLOCK,' ');Z2:=STRCAT(Z1,DYBLOCK);Z3:=STRCAT(Z2,' ');DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLORLIRED;DRAWTEXT_FIX(ISLASTBAR,0,0.03,0,EXTERNSTR(0,3)),COLORWHITE;DRAWTEXT_FIX(ISLASTBAR,0,0.06,0,EXTERNSTR(0,6)),COLORLIBLUE;DRAWTEXT_FIX(ISLASTBAR,0,0.09,0,EXTERNSTR(0,12)),COLORLIGREEN;{⽼王}DRAWTEXT_FIX(ISLASTBAR,0,0.15,0,FGBLOCK),COLORLIMAGENTA;DRAWTEXT_FIX(ISLASTBAR,0,0.12,0,EXTERNSTR(0,1)),COLORYELLOW;{融胜}主⼒成本线:EMA(COST(9),250),COLORBROWN,DOTLINE;{⽜马线买点公式升级版}MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;⽜线:WMA(MID,20),COLORRED;马线:MA(⽜线,5),COLORWHITE;DRAWICON( FILTER(CROSS(⽜线,马线),20),马线-0.002 ,1);DRAWTEXT(CROSS(⽜线,马线),LOW*0.984,'买'),COLORRED,LINETHICK2;⽌损价:H*0.95,LINETHICK0.5,COLORRED;庄家:⽜线,COLORRED;IF(庄家>=REF(庄家,1),庄家,DRAWNULL),COLORRED,LINETHICK4;IF(庄家<=REF(庄家,1),庄家,DRAWNULL),COLORGREEN,LINETHICK2;DRAWBAND(⽜线,RGB(255,87,22),马线,RGB(0,30,255));N1:=10;TK:=CONST(HHVBARS(V,10)),COLOR0000FF,LINETHICK1;量能平台:IF(CURRBARSCOUNT<=N1+3,CONST(IF(TK=0,C,REF(C,TK))),DRAWNULL),COLORGR AY,LINETHICK2; {NOTEXT_新量能点:IF(CURRBARSCOUNT=TK+1,量能平台,DRAWNULL),CIRCLEDOT,COLORFFFFFF,LINETHICK5;} DRAWTEXT(ISLASTBAR,量能平台,'量能平台'),COLORGRAY;红轨道:=MA(MA(CLOSE,3),1),LINETHICK1,COLORYELLOW;轨道:MA(MA(CLOSE,3),3),COLOR32CD32,LINETHICK2;NOTEXT_升:IF(红轨道>=轨道,轨道,DRAWNULL),COLORMAGENTA,LINETHICK2;机构:(L2_VOL(0,0) - L2_VOL(0,1))*10000/FINANCE(7),NODRAW,COLORRED;⼤户:(L2_VOL(1,0) - L2_VOL(1,1))*10000/FINANCE(7),NODRAW,COLORMAGENTA; 主⼒:机构+⼤户,NODRAW,COLORYELLOW;STICKLINE(主⼒>0,O,C,1.5,1),COLORRED;STICKLINE(主⼒<0,O,C,1.5,1),COLORCYAN;STICKLINE(⼤户>0,O,C,1,0),COLORMAGENTA;STICKLINE(⼤户<0,O,C,1,0),COLORGREEN;STICKLINE(机构>0 AND ⼤户>0,O,(O+C)/2,1,0),COLORRED;STICKLINE(机构<0 AND ⼤户>0,C,(O+C)/2,1,0),COLORCYAN;STICKLINE(机构>0 AND ⼤户<0,O,(O+C)/2,1,0)COLORMAGENTA;STICKLINE(机构<0 AND ⼤户<0,C,O,1,0)COLORLICYAN;累计:=SUM(主⼒,30),COLORMAGENTA;均值:=EMA(累计,MIN(10,30)),COLORWHITE;{红}STICKLINE(CROSS(累计,均值),H,L,0,0),COLORRED,LINETHICK1;STICKLINE(CROSS(累计,均值),CLOSE,OPEN,1.4,0),COLOR000088;STICKLINE(CROSS(累计,均值),CLOSE,OPEN,1,0),COLOR0000BB;STICKLINE(CROSS(累计,均值),CLOSE,OPEN,0.6,0),COLOR0000DD; STICKLINE(CROSS(累计,均值),CLOSE,OPEN,0,0),COLOR0000FF;{蓝}STICKLINE(CROSS(均值,累计),H,L,0,0),COLORFF8800,LINETHICK1; STICKLINE(CROSS(均值,累计),CLOSE,OPEN,1.4,0),COLORBB4400;STICKLINE(CROSS(均值,累计),CLOSE,OPEN,1,0),COLORCC5500;STICKLINE(CROSS(均值,累计),CLOSE,OPEN,0.6,0),COLORDD6600;STICKLINE(CROSS(均值,累计),CLOSE,OPEN,0,0),COLOREE7700;{⾼低点定位}G0:=(XMA(XMA(H,30),30)-XMA(XMA(L,30),30))+XMA(XMA(H,30),30);D0:=XMA(XMA(L,30),30)-(XMA(XMA(H,30),30)-XMA(XMA(L,30),30));G01:=(XMA(XMA(H,30),30)-XMA(XMA(L,30),30))*0.5+XMA(XMA(H,30),30);D01:=XMA(XMA(L,30),30)-(XMA(XMA(H,30),30)-XMA(XMA(L,30),30))*0.5;GO0:=(XMA(XMA(H,60),60)-XMA(XMA(L,60),60))*3+XMA(XMA(H,60),60);DO0:=XMA(XMA(L,60),60)-(XMA(XMA(H,60),60)-XMA(XMA(L,60),60))*3;STICKLINE(CURRBARSCOUNT=1,G0,G0,100,5),COLORGREEN;STICKLINE(CURRBARSCOUNT=1,D0,D0,100,5),COLORMAGENTA;STICKLINE(CURRBARSCOUNT=1,GO0,GO0,100,5),COLORLIBLUE;STICKLINE(CURRBARSCOUNT=1,DO0,DO0,100,5),COLORRED;DRAWTEXT(ISLASTBAR,G0,'卖'),COLORGREEN;DRAWTEXT(ISLASTBAR,D0,'买'),COLORMAGENTA;DRAWTEXT(ISLASTBAR,GO0,'顶'),COLORLIBLUE;DRAWTEXT(ISLASTBAR,DO0,'底'),COLORRED;Q_1:=C-REF(C,1);Q_2:=100*EMA(EMA(Q_1,6),6)/EMA(EMA(ABS(Q_1),6),6);Q_3:=CROSS(EMA(C,19),EMA(C,7));Q_4:=CROSS(EMA(C,7),EMA(C,19));ZD1:=L=LLV(L,BARSLAST(Q_3)+1);ZD2:=LLV(L,BARSLAST(Q_3)+1);ZD3:=H=HHV(H,BARSLAST(Q_4)+1);ZD4:=HHV(H,BARSLAST(Q_4)+1);Q_A:=DRAWLINE(ZD1,ZD2,ZD3,ZD4,0);U1:=H=HHV(H,BARSLAST(Q_4)+1);U2:=HHV(H,BARSLAST(Q_4)+1);U3:=L=LLV(L,BARSLAST(Q_3)+1);U4:=LLV(L,BARSLAST(Q_3)+1);Q_B:=DRAWLINE(U1,U2,U3,U4,0);TJ:=IF(Q_BBB:=REF(TJ,1)=0 AND TJ>=1 ;DRAWTEXT(BB,L*0.99,'▲'),COLORYELLOW;{绿▲见底标志}SS:=REF(Q_ADRAWTEXT(SS,H*1.01,'X'),COLORGREEN;{X图标卖出标志}{私募公式}AAE:= WINNER(CLOSE+CLOSE*15/100)*100;BBE:= WINNER(CLOSE+CLOSE*0/100)*100;CCE:= AAE-BBE;DDE:= (WINNER(CLOSE-CLOSE*0.1/100)-WINNER(CLOSE-CLOSE*15/100))*100; EEE:= CCE<3 AND DDE<0.5 AND OPEN>LOW;AE1:= DYNAINFO(6);AE2:= IF(LOW>AE1,0,IF(HIGHAE4:= REF(HHV(CLOSE,120),1);AE5:= REF(LLV(CLOSE,120),1);AE6:= 100*(CLOSE-AE5)/(AE4-AE5);AE7:= AE2>0 OR AE2=1;AE8:= AE7 AND AE3/REF(AE3,3)>=3 AND AE6<80;AE9:= REF(AE8,1) OR REF(AE8,2) OR REF(AE8,3) OR REF(AE8,4);AE10:= AE8 AND AE9;AE11:= IF(FILTER(AE8,3),5,0);AE12:= FILTER(IF(FILTER(AE10,3) OR EEE,10,0),3);DRAWTEXT(AE12,L*0.99,'▲'),COLORLIRED;{红▲见底标志}{伏击涨停}T1:=MA(C,21)>REF(MA(C,21),1);T2:=EXIST(C>REF(C,1)*1.093,21);T3:=CT5:=EVERY(VT6:=MA(C,5)>MA(C,21);DRAWTEXT(T1 AND T2 AND T3 AND T5 AND T6,L*0.985,'↖伏击涨停');{红底绿顶}低:=REF(LLV(L,150),3);近期底:=REFDATE(低,DATE);最底:=REFDATE(近期底,DATE);⼊:=最底=L AND ((C+L)<(O+C) OR (O+L)<(C+O));STICKLINE(⼊,O,(C+O)/2,3,0),COLORRED;STICKLINE(⼊,H,L,0.2,0),COLORRED;DRAWTEXT(⼊,L*1.0021,'↖红底'),COLORLIMAGENTA;⾼:=REF(HHV(H,150),3);近期顶:=REFDATE(⾼,DATE);最顶:=REFDATE(近期顶,DATE),NODRAW;出:=最顶=H AND ((C-L)<(O-C) OR (O-L)<(C-O)),NODRAW;STICKLINE(出,O,(C+O)/2,3,0),COLORBLUE;STICKLINE(出,H,L,0.2,0),COLORBLUE;DRAWTEXT(出,H*0.998,'↙蓝顶'),COLORGREEN;A2:=REF(MA(C,20),1);J1:=(MA(C,20)-A2)/A2*100;MJ1:=MA(J1,3);乖离2:=(MA(C,20)-MA(C,30))/MA(C,30)*100;VAC1:=IF(BETWEEN(乖离2,-2,5),2,0);XL1:=((LLV(LOW,3) = LLV(LOW,60)) AND ((CLOSE / REF(CLOSE,1)) >= 1.04)); XL2:=(((CLOSE - EMA(CLOSE,21)) / EMA(CLOSE,21)) * 100);XL3:=CROSS(XL2,(0 - 20));DRAWTEXT(FILTER(((XL1 > 0) AND LOW),5),(LOW*0.996),'↖买'); DRAWICON(XL3 > 0 ,LOW*0.99,1);{绝对底部}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);DRAWTEXT(X9,(HIGH * 0.9989),'↙出货'),COLORGREEN;{⾦⽜启动}年:=MA(CLOSE,240);涨幅%:=(C-REF(C,1))/REF(C,1)*100;RSVV:=(CLOSE-LLV(LOW,10))/(HHV(HIGH,10)-LLV(LOW,10))*100;VARB2:=(RSVV/2+22)*1;量:=EMA(VOL,13);资⾦:=EMA(AMOUNT,13);过滤:=((资⾦/量) / 100);提纯:=(((CLOSE -过滤) / 过滤) * 100);黄⾦:=((提纯< (0)) AND ZXNH);买:=IF(黄⾦AND RSVV0 AND C<年; DRAWTEXT(买>0,L-0.0013,'↖⽜'),COLORFFFFFF;AA05:=MA(C,5),COLOR0099CC;五⽇乖离率:=(C-AA05)/AA05*100;BB05:=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;AA10:=MA(C,10);AA20:=MA(C,20);BB10:=ATAN((AA10/REF(AA10,1)-1)*100)*180/3.1416;AA30:=MA(C,30);三拾⽇乖离率:=(C-AA30)/AA30*100;VAR11:=(AA20-AA30)>REF((AA20-AA30),1)AND AA20>REF(AA20,1) AND AA30>REF(AA30,1);VAR22:=(AA30-AA20)AA30BB30:=ATAN((AA30/REF(AA30,1)-1)*100)*180/3.1416;强势狙击:=FILTER(BB30>30 AND BB10>45 ANDCROSS(BB05,60),10);加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 ANDAA05>REF(AA05,1) AND 三拾⽇乖离率>REF(三拾⽇乖离率,1) AND AA10>REF(AA10,1) AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1) ,10) ;清仓:=FILTER(COUNT(CROSS(30,BB05),5)>=1 AND (C>AA30 OR O>AA30) AND AA05DRAWICON(加仓,LOW*0.994,7);{B红⾊标志}DRAWICON(清仓,HIGH*1.005,2);{↓标志}DRAWICON(强势狙击,LOW*0.993,41);{●黄⾊标志}{洗盘杀⼊线源码:}TT11:=CONST(LLVBARS(LOW,10));T11HIGH:=CONST(REF(HIGH,TT11));CCC1:=CONST(CURRBARSCOUNT);T22:=CONST(BARSLAST(CURRBARSCOUNT>CCC1+TT11 AND H>T11HIGH));T22HIGH:=CONST(REF(HIGH,T22));T33:=CONST(BARSLAST(CURRBARSCOUNT>CCC1+T22 AND HIGH>T22HIGH));T33HIGH:=CONST(REF(HIGH,T33));{C>=T33HIGH AND REF(C,1)2;}N:=10;T1K:=CONST(LLVBARS(LOW,N));T1HIGH:=CONST(REF(HIGH,T1K));CC:=CONST(CURRBARSCOUNT);T2K:=CONST(BARSLAST((CURRBARSCOUNT >(CC+T1K)) AND (HIGH>T1HIGH)));T2HIGH:=CONST(REF(HIGH,T2K));T3K:=CONST(BARSLAST((CURRBARSCOUNT >(CC+T2K)) AND (HIGH>T2HIGH)));T3HIGH:=CONST(REF(HIGH,T3K));洗盘杀⼊线:DRAWLINE(CURRBARSCOUNT=10+1,T3HIGH,ISLASTBAR, T3HIGH,1),LINETHICK1,COLORLIRED; DRAWTEXT(ISLASTBAR, T3HIGH,'杀⼊线')LINETHICK1,COLORLIRED;{有庄控盘}VAW1:=EMA(EMA(CLOSE,13),13);控盘:=(VAW1-REF(VAW1,1))/REF(VAW1,1)*1000;⽆庄控盘:=控盘<0;有庄控盘:=控盘>REF(控盘,1) AND 控盘>0;{分时价格原码}JJ:=DYNAINFO(11);{波段买卖原码}P:=21;S:=8;M1:=3;财:=(EMA(CLOSE,S)-EMA(CLOSE,P))*50;神:=EMA(财,M1);{股价与均线偏离买卖条件}BTJ1:=(C-JJ)/JJ<-0.03;BTJ11:=(C-JJ)/JJ<-0.03;BTJ12:=LAST(JJ>=REF(JJ,1),5,1) AND (C-JJ)/JJ<0.005;STJ1:=(C-JJ)/JJ>0.005;{控盘买卖条件}STJ01:=控盘0.5;STJ02:=控盘>0;BTJ2:=控盘>REF(控盘,1) AND 控盘<-0.2;BTJ22:=控盘>REF(控盘,1) AND 控盘<0 ;{波段买卖条件}BTJ3:=CROSS(财,神) AND 财<-0.3;BTJ32:=CROSS(财,神) AND 财<-0.1;STJ31:=CROSS(神,财);STJ32:=CROSS(神,财) AND 财>1.618;{以下为信号};BTJ81:=FILTER(BTJ1 AND BTJ2 AND BTJ3,13);BTJ811:=FILTER(BTJ11 AND BTJ2 AND BTJ3,13);BTJ82:=FILTER(BTJ12 AND BTJ22 AND BTJ32,13);STJ81:=FILTER(STJ1 AND STJ01 AND STJ31,13);STJ82:=FILTER(STJ02 AND STJ32 ,13);STJ83:=STJ81 AND STJ82;{DRAWTEXT(STJ83,H*1.002,'↙庄出'),COLORGREEN;}DRAWICON(STJ83,H*1.005,37);庄:= BTJ11 AND BTJ2 AND BTJ3;有庄:=FILTER(庄,30);DRAWTEXT(有庄,L-0.0011,'↖庄进'),COLORYELLOW;{⽜熊轨道上抓启爆点适合抓爆涨股}AHC1:=CLOSE*VOL;AHC22:=EMA((EXPMA(AHC1,27)/EXPMA(VOL,27)+EXPMA(AHC1,54)/EXPMA(VOL,54)+EX PMA(AHC1,108)/EXPMA(VOL,108)+EXPMA(AHC1,316)/EXPMA(VOL,316))/4,34);上轨:=1.06*AHC22;下轨:=AHC22*0.94;ZT:=REF(C,1)*1.1-C<0.01 AND H=C;启爆:=CROSS(C,上轨) OR CROSS(C,下轨) AND ZT;DRAWTEXT(启爆,L,'↖启爆'),COLORCYAN;{STYLE:抄底钻⽯王--可以⽤于选股预警,也可以放到附图}YY:=(REF(H,4)-REF(L,1))/C*100>10;{4天前的最⾼到昨天最低跌幅为10个点}YY1:=(REF(L,1)-L)/C*100>=0;{昨天的最低价跟今天最低价相平或收下影线}YY2:=REF(CO;{昨天收阴,今天收阳线}YY3:= CLOSE>REF(CLOSE,1)*1.03 ;{股价3个点预警}YY4:=(H-C)/C*100<1.5;{上影线少于1.5个点}YY5:=V<=LLV(V,5) OR V>=HHV(V,5);{成交量是五天最低或五天最⾼}DRAWICON(YY AND YY1 AND YY2 AND YY3 AND YY4 AND YY5,L*0.988,26);{满⾜所有条件}; DRAWTEXT(YY AND YY1 AND YY2 AND YY3 AND YY4 AND YY5,L*0.988,'↖钻'),COLORRED;。

通达信主图临界突破(附源码)

通达信主图临界突破(附源码)
平台目前更新的有关公式源码会有收费捡漏勿扰该主图为孤品66元可得全部支持电脑手机使用过程中若有不懂可以及时联系我们பைடு நூலகம்边帮忙处理喜欢加关注感谢点赞支持后市若有可期希望越来越好
通达信主图临界突破(附源码)
通达信主图临界突破(附源码)
CBJX1:EMA(COST(90),10),COLORFFFFCC,LINETHICK2;
CBJX2:EMA(COST(34),10),COLOR00FFFF,LINETHICK2;
DRAWICON(CROSS(PWINNER(14,CLOSE),0.915) AND LWINNER(5,CLOSE)>0.9 ,CLOSE,5);
注:平台目前更新的有关公式源码,(会有收费,捡漏勿扰,该主图为孤品66元可得)(全部支持电脑手机),使用过程中,若有不懂,可以及时联系我们这边,帮忙处理,,喜欢加关注,感谢点赞支持,后市若有可期,希望越来越好!

通达信指标公式源码 黄龙主图 源码

通达信指标公式源码 黄龙主图 源码

参数N=10{杠上开花,N:1,200,8}趋势线:EMA(((SLOPE(CLOSE,21) * 20) + CLOSE),42),POINTDOT,COLORFF00FF,LINETHICK4; A1:=REF(H,N)=HHV(H,2*N+1);B1:=FILTER(A1,N);C1:=BACKSET(B1,N+1);D1:=FILTER(C1,N);{高点}R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);S11:=R11>REF(R11,1);DRAWLINE(D1,H,S11,H,1),COLORFF00FF;A2:=REF(L,N)=LLV(L,2*N+1);B2:=FILTER(A2,N);C2:=BACKSET(B2,N+1);D2:=FILTER(C2,N);{低点}T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);U11:=T11>REF(T11,1);DRAWLINE(D2,L,U11,L,1),COLORFF00FF;M:=INTPART(3*N/5);A12:=REF(H,M)=HHV(H,2*M+1);B12:=FILTER(A12,M);C12:=BACKSET(B12,M+1);D12:=FILTER(C12,M);{高点}R112:=BACKSET(ISLASTBAR,BARSLAST(D12)+1); S112:=R112>REF(R112,1);DRAWLINE(D12,H,S112,H,1),COLOR0000FF;A22:=REF(L,M)=LLV(L,2*M+1);B22:=FILTER(A22,M);C22:=BACKSET(B22,M+1);D22:=FILTER(C22,M);{低点}T112:=BACKSET(ISLASTBAR,BARSLAST(D22)+1);U112:=T112>REF(T112,1);DRAWLINE(D22,L,U112,L,1),COLOR0000FF;VAR1111:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);VAR2222:=CROSS(VAR1111,0.9);VAR3333:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);VAR4444:=CROSS(VAR3333,0.9);压力:= REF(HIGH,BARSLAST(VAR2222));STICKLINE(CLOSE,REF(HIGH,BARSLAST(VAR2222)),REF(HIGH,BARSLAST(VAR2222)),0.5,1),COLOREA91B5,LINETHICK3;支撑:= REF(LOW,BARSLAST(VAR4444));STICKLINE(CLOSE,REF(LOW,BARSLAST(VAR4444)),REF(LOW,BARSLAST (VAR4444)),0.5,1),COLOR00B4FF,LINETHICK3;下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100); RRRSV:=SMA(下档线,3,1);KKK:=SMA(RRRSV,3,1);DDD:=((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,DDD),HIGH,REF(HIGH,BARSLAST(CROSS(D24,DDD)))),CO LORFFFFFF;压力位:=IF(ISLASTBAR,压力2,DRAWNULL);STICKLINE(ISLASTBAR ,压力位,压力位,120,0),LINETHICK4,COLORFFFFFF;底部:=LLV(HIGH,30),COLOR00FF00;底部位:=IF(ISLASTBAR,底部,DRAWNULL);STICKLINE(ISLASTBAR ,底部位,底部位,100,0),LINETHICK4,COLOR00FF00; AA05:=MA(C,5),COLOR0099CC;五日乖离率:=(C-AA05)/AA05*100;BB05:=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;AA10:=MA(C,10);AA20:=MA(C,20);BB10:=ATAN((AA10/REF(AA10,1)-1)*100)*180/3.1416; AA30:=MA(C,30);三拾日乖离率:=(C-AA30)/AA30*100;VAR11:=(AA20-AA30)>REF((AA20-AA30),1)AND AA20>REF(AA20,1) AND AA30>REF(AA30,1);VAR22:=(AA30-AA20)<REF((AA30-AA20),1) AND AA20<REF(AA20,1) AND AA30<REF(AA30,1);BB30:=ATAN((AA30/REF(AA30,1)-1)*100)*180/3.1416;强势狙击:=FILTER(BB30>30 AND BB10>45 ANDCROSS(BB05,60),10);加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 ANDAA05>REF(AA05,1) AND 三拾日乖离率>REF(三拾日乖离率,1) ANDAA10>REF(AA10,1)AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1) ,10) ;清仓:=FILTER(COUNT(CROSS(30,BB05),5)>=1 AND (C>AA30 OR O>AA30) ANDAA05<REF(AA05,1) AND 三拾日乖离率<REF(三拾日乖离率,1) ANDAA10<REF(AA10,1),10);DRAWICON(加仓,LOW*0.97,23);DRAWICON(清仓,HIGH*1.01,19);DRAWICON(强势狙击,LOW*0.99,13);TYP := (HIGH + LOW + CLOSE)/3;CCI1:=(TYP-MA(TYP,6))/(0.015*AVEDEV(TYP,6));差值1:=ABS(REF(CCI1,1)-CCI1),LINETHICK0;CCI2:=(TYP-MA(TYP,10))/(0.015*AVEDEV(TYP,10));差值2:=ABS(REF(CCI2,1)-CCI2),LINETHICK0;CCI3:=(TYP-MA(TYP,20))/(0.015*AVEDEV(TYP,20));差值3:=ABS(REF(CCI3,1)-CCI3),LINETHICK0;CCI4:=(TYP-MA(TYP,30))/(0.015*AVEDEV(TYP,30));差值4:=ABS(REF(CCI4,1)-CCI4),LINETHICK0;CCI5:=(TYP-MA(TYP,60))/(0.015*AVEDEV(TYP,60));差值5:=ABS(REF(CCI5,1)-CCI5),LINETHICK0;CCI:=CCI1+CCI2+CCI3+CCI4+CCI5;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(255,255,0),中线,RGB(256,200,0));下跌:IF(VAR1=VAR6,VAR6, DRAWNULL),COLORGREEN;TJ1:= CCI1>差值4;立桩量:=FILTER(TJ1,0);TJ2:=IF(BARSLAST(立桩量)=1 ,1,IF(BARSLAST(立桩量)=2 ,1,IF(BARSLAST(立桩量)=3 ,1,0)));成立1:=TJ2;条件成立1:=FILTER(成立1,5);TJ11:= CCI1<-差值4 ;立桩量2:=FILTER(TJ11,0);TJ22:=IF(BARSLAST(立桩量2)=1 AND CLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量2)=2 AND CLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量2)=3 AND CLOSE>REF(HIGH,3),1,0)));成立2:=TJ22;条件成立2:=FILTER(成立2,5);TJ111:=(ABS(CCI1)>CCI AND ABS( 差值1)> ABS(差值5))OR (VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>VAR1);立桩量3:=FILTER(TJ111,5);TJ222:=IF(BARSLAST(立桩量3)=1 ANDCLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量3)=2 ANDCLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量3)=3 ANDCLOSE>REF(HIGH,3),1,0)));突破3:=TJ222=1;STICKLINE(CLOSE AND 下跌!= VAR6,REF(HIGH,BARSLAST(立桩量3)), REF(HIGH,BARSLAST(立桩量3)),10,1),COLORCYAN;STICKLINE(CLOSE AND 下跌!= VAR6,REF(LOW,BARSLAST(立桩量3)),REF(LOW,BARSLAST(立桩量3)),10,1),COLORYELLOW;TJ3:=IF(BARSLAST(立桩量3)=1 AND CLOSE>REF(LOW,1),1,IF(BARSLAST(立桩量3)=2 AND CLOSE>REF(LOW,2),1,IF(BARSLAST(立桩量3)=3 AND CLOSE>REF(LOW,3),1,0)));三天法则:=TJ3=1;成立:=三天法则AND 突破3;条件成立:=FILTER(成立,5);TJ31:=(VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>VAR1); TJ32:=FILTER(TJ31,1);IF(条件成立AND 下跌!= VAR6 ANDAA30>=REF(AA30,1),H*1.03,DRAWNULL),CROSSDOT,LINETHICK6,COLORFF 33FF;IF(条件成立AND 下跌!= VAR6 ANDAA30>=REF(AA30,1),H*1.03,DRAWNULL),POINTDOT,LINETHICK4,COLOR00 CCFF;STICKLINE(C>=O,L,H,0,0),COLORRED;STICKLINE(C<O,L,H,0,0),COLORFFFF00;STICKLINE(C>O,C,O,3.5,0),COLORRED;STICKLINE(1,C,O,2.8,0),COLOR666600;STICKLINE(1,C,O,2,0),COLOR999900;STICKLINE(1,C,O,1.5,0),COLORBBBB00;STICKLINE(1,C,O,1,0),COLORDDDD00;STICKLINE(1,C,O,0.5,0),COLORFFFF00;STICKLINE(立桩量,C,O,2.8,0),COLOR000066;STICKLINE(立桩量,C,O,2,0),COLOR0000BB;STICKLINE(立桩量,C,O,1.5,0),COLOR0000CC; STICKLINE(立桩量,C,O,1,0),COLOR0000DD;STICKLINE(立桩量,C,O,0.3,0),COLOR0000FF; DRAWICON(条件成立1,REF(HIGH,BARSLAST(立桩量3)),12); DRAWICON(条件成立2,REF(LOW,BARSLAST(立桩量3)),11);。

通达信指标公式源码 :突破瞬间介入 主图源码

通达信指标公式源码 :突破瞬间介入 主图源码

突破瞬间介入源码获利%:WINNER(CLOSE)*100,NODRAW,COLORWHITE;DRAWTEXT_FIX(获利%>=95 AND ISLASTBAR,0.97,0.97,0,'高危'),COLORRED; DRAWTEXT_FIX(获利%>=80 AND 获利%<95 AND ISLASTBAR,0.97,0.97,0,'风险'),COLORYELLOW;DRAWTEXT_FIX(获利%>=50 AND 获利%<80 AND ISLASTBAR,0.97,0.97,0,'安全'),COLORGREEN;DRAWTEXT_FIX(获利%<50 AND ISLASTBAR,0.97,0.97,0,'空头'),COLORBLUE; STICKLINE((C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(C,1)),OPEN,CLOSE,3,0),CO LOR0055FF;STICKLINE((REF(C,1)-C)*100/REF(C,1)>=(10-0.01*100/REF(C,1)),OPEN,CLOSE,3,0),CO LOR00FF00;N:=10;T1:=CONST(HHVBARS(V,N));T0:IF(CURRBARSCOUNT<=N+3,CONST(IF(T1=0,C,REF(C,T1))),DRAWNULL),COLORFF00 FF;IF(CURRBARSCOUNT=T1+1,T0,DRAWNULL),CIRCLEDOT,COLORFF00FF; DRAWTEXT(ISLASTBAR,T0,' 量能平台'),COLORCC00CC;M:=10;Q1:=CONST(REF(HHVBARS(V,M),T1+1)+T1+1);Q0:IF(CURRBARSCOUNT<=T1+M+3 AND CURRBARSCOUNT>=T1+1,CONST(REF(C,Q1)),DRAWNULL),COLOR009900;IF(CURRBARSCOUNT=Q1+1,Q0,DRAWNULL),CIRCLEDOT,COLOR00CC00;M1:=CONST(LLVBARS(V,M));M0:IF(CURRBARSCOUNT<=M+7,CONST(IF(M1=0,O,REF(O,M1))),DRAWNULL);IF(CURRBARSCOUNT=M1+1,M0,DRAWNULL),CIRCLEDOT;DRAWTEXT(ISLASTBAR,M0,' 地量反量能平台');HV:=HHV(V,8)=V OR V/REF(V,1)>=2;FT:=BARSLAST(HV);量能平台:IF(HV,C,REF(C,FT)),COLORYELLOW,LINETHICK2;DP:=IF(C=INDEXC,0,1);GJ:=AMOUNT/V/100;【明日阻力】:L+(GJ-L)+(C-L),COLORRED,NODRAW;【明日支撑】:L+(C-GJ),NODRAW;年:=YEAR,NODRAW;月:=MONTH,NODRAW;星期:=WEEKDAY,NODRAW;日1:=DATETODAY(DATE);上市日:=REF(DATE,TOTALBARSCOUNT-CURRBARSCOUNT);自然日:=日1-DATETODAY(上市日)+1;ZB:=(自然日-REF(自然日,1))!=星期-REF(星期,1)OR TOTALBARSCOUNT-CURRBARSCOUNT=0;本周第几天:=BARSLAST(ZB)+1;本月第几天:=BARSLAST(年*100+月!=REF(年*100+月,1))+1;MA1:=REF(C,本周第几天);MA2:=REF(MA1,本周第几天);MA3:=REF(MA2,本周第几天);MA4:=REF(MA3,本周第几天);MA5:=REF(MA4,本周第几天);MA6:=REF(MA5,本周第几天);MA7:=REF(MA6,本周第几天);MA8:=REF(MA7,本周第几天);MA9:=REF(MA8,本周第几天);十周价:=(C+MA1+MA2+MA3+MA4+MA5+MA6+MA7+MA8+MA9)/10; 决策:REFDATE(十周价,DATE),COLORYELLOW,LINETHICK1; DRAWTEXT(ISLASTBAR,决策,' 决策线'),COLORYELLOW;。

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

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

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

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

源码:
{连结MACD相邻红绿柱区间内高低点画趋势线通达信}
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
N1:=BARSLAST(CROSS(DIFF,DEA))+1;{最近一次满足条件DIFF上穿DEA的K线到当前的距离}
N2:=BARSLAST(CROSS(DEA,DIFF))+1;{最近一次满足条件DIFF下穿DEA的K线到当前的距离}
{当前是DIFF>DEA的状态,连结最近两个DIFF>DEA区间(不包含当前区间)内最高点的趋势线}
A1:=BACKSET(ISLASTBAR &&
N1<N2,REF(REF(HHVBARS(H,N1)+1,N2),N2)+REF(N2,N2)+N2);
B1:=BACKSET(ISLASTBAR && N1<N2,REF(HHVBARS(H,N1),N2)+N2+1); DRAWLINE(CROSS(A1,0.5),H,CROSS(B1,0.5),H,1),COLORRED;
{当前是DIFF>DEA的状态,连结最近两个DIFF<DEA区间内最低点的趋势线}
A2:=BACKSET(ISLASTBAR &&
N1<N2,REF(REF(LLVBARS(L,N2)+1,N1),N2)+REF(N1,N2)+N2);
B2:=BACKSET(ISLASTBAR && N1<N2,REF(LLVBARS(L,N2)+1,N1)+N1);
DRAWLINE(CROSS(A2,0.5),L,CROSS(B2,0.5),L,1),COLORGREEN;
{当前是DIFF<DEA的状态,连结最近两个DIFF<DEA区间(不包含当前区间)内最低点的趋势线}
A3:=BACKSET(ISLASTBAR &&
N1>N2,REF(REF(LLVBARS(L,N2)+1,N1),N1)+REF(N1,N1)+N1);
B3:=BACKSET(ISLASTBAR && N1>N2,REF(LLVBARS(L,N2),N1)+N1+1);
DRAWLINE(CROSS(A3,0.5),L,CROSS(B3,0.5),L,1),COLORGREEN;
{当前是DIFF<DEA的状态,连结最近两个DIFF>DEA区间内最高点的趋势线}
A4:=BACKSET(ISLASTBAR &&
N1>N2,REF(REF(HHVBARS(H,N1)+1,N2),N1)+REF(N2,N1)+N1);
B4:=BACKSET(ISLASTBAR && N1>N2,REF(HHVBARS(H,N1)+1,N2)+N2); DRAWLINE(CROSS(A4,0.5),H,CROSS(B4,0.5),H,1),COLORRED;。

相关文档
最新文档