趋势线大底大顶通达信指标公式源码

合集下载

通达信精典趋势线主图指标源码及预警

通达信精典趋势线主图指标源码及预警

通达信精典趋势线主图指标源码及预警E5:=EMA(C,5);E13:=EMA(C,13);DRAWBAND(E5,RGB(200,0,0),E13,RGB(0,200,0));DRAWKLINE(H,O,L,C);平衡:EMA(C,20)COLORYELLOW;上轨:平衡 + 2*STD(C,20),LINETHICK2,COLORMAGENTA;下轨:平衡 - 2*STD(C,20),LINETHICK2,COLORGREEN;IF(平衡>REF(平衡,1),平衡,DRAWNULL),COLORRED;IF(平衡=REF(平衡,1),平衡,DRAWNULL),COLORYELLOW;IF(平衡<REF(平衡,1),平衡,DRAWNULL),COLORGREEN;STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLORFF7700;STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLORFFBB0 0;STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLORFFDD0 0;STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0.5,0 ),COLORFFFF 00;STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR000055;STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR000077;STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000BB;STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.5,0) ,COLOR0000FF;VAR9Q:=C= HHV(C,4)AND (REF(C,1)>=REF(C,2) OR REF(C,1)>=REF(C,3)) OR REF(C,1)=HHV(C,4) AND CLOSE>=REF(C,2) OR REF(C,2)=HHV(C,4) AND REF(C,3)=LLV(C,4) AND C>=REF(C,1) OR REF(C,3)=HHV(C,4) AND C>=REF(C,1) AND C>=REF(C,2);红持:=VAR9Q;STICKLINE(VAR9Q,C,(O+C)/2,3,0),COLOR000055;STICKLINE(VAR9Q,C,(O+C)/2,2,0),COLOR000077;STICKLINE(VAR9Q,C,(O+C)/2,0.5,0),COLOR0000FF;VARAQ:=C=HHV(C,4) AND REF(C,1)=LLV(C,4);粉变:=VARAQ;STICKLINE(VARAQ,C,(O+C)/2,3,0),COLORFF11FF;STICKLINE(VARAQ,C,(O+C)/2,2,0),COLORFF55FF;STICKLINE(VARAQ,C,(O+C)/2,1,0),COLORFF99FF;STICKLINE(VARAQ,C,(O+C)/2,0.5,0),COLORFFDDFF;VARBQ:=C=LLV(C,4) AND (REF(C,1)<REF(C,2) OR REF(C,1)<REF(C,3)) OR REF(C,1)=LLV(C,4) AND C<REF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)!=HHV(C,4) AND C<REF(C,1) OR REF(C,3)=LLV(C,4) AND C<REF(C,1) AND C<REF(C,2);灰跌:=VARBQ;STICKLINE(VARBQ,C,(O+C)/2,3,0),COLOR333333;STICKLINE(VARBQ,C,(O+C)/2,2,0),COLOR777777;STICKLINE(VARBQ,C,(O+C)/2,1,0),COLORBBBBBB;STICKLINE(VARBQ,C,(O+C)/2,0.5,0),COLORFFFFFF;VARCQ:=REF(C,1)=LLV(C,4) AND C>=REF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)<=REF(C,3) AND REF(C,2)<REF(C,4) AND C>=REF(C,1);绿买:=VARCQ;STICKLINE(VARCQ,O,(O+C)/2,3,0),COLOR003300;STICKLINE(VARCQ,O,(O+C)/2,2,0),COLOR007700;STICKLINE(VARCQ,O,(O+C)/2,1,0),COLOR00BB00;STICKLINE(VARCQ,O,(O+C)/2,0.5,0),COLOR00FF00;VARDQ:=REF(C,1)=HHV(C,4) AND C<REF(C,2) OR (REF(C,2)=HHV(C,4) AND REF(C,1)>REF(C,3) OR REF(C,3)=HHV(C,4) AND REF(C,1)>REF(C,2)) AND REF(C,2)>=REF(C,4) AND C<REF(C,1);蓝抛:=VARDQ;STICKLINE(VARDQ,O,(O+C)/2,2,0),COLORFF5500;STICKLINE(VARDQ,O,(O+C)/2,1,0),COLORFF9900;STICKLINE(VARDQ,O,(O+C)/2,0.5,0),COLORFFDD00;Y1:=REF(EMA(DMA((((HIGH + LOW) + (CLOSE * 2)) / 4.15),0.9),3),1);{DRAWTEXT(CROSS(CLOSE,Y1),LOW,'[买进]'),COLORYELLOW;STICKLINE(CROSS(Y1,CLOSE),H*1.05,H,0,0),COLORWHITE;{DRAWTEXT(CROSS(Y1,CLOSE),HIGH*1.05,'[卖出]'),COLORWHITE;{新加}VAR1W:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));VAR2W:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));VAR3W:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));{DRAWTEXT(CROSS(VAR2W,MA(VAR3W,6)),LOW -0.6,'(买)'),COLORFF99FF;DRAWTEXT(CROSS(MA(VAR3W,6),VAR1W),HIGH+0.9,'(卖)'),COLORCCFF13;}VAR3P:=IF(CLOSE/REF(CLOSE,1)>1.050 AND HIGH/CLOSE<1.010 AND IF(CLOSE>REF(CLOSE,1),88,0)>0, 91, 0);STICKLINE(VAR3P>90,L,L*0.92,0,0),COLORFF00FF;DRAWTEXT(VAR3P>90,LOW*0.92,'追涨'),COLORFF00FF;SS:=MA((LOW+HIGH+CLOSE)/3,5)>REF(MA((LOW+HIGH+C LOSE)/3,5),1) AND REF(MA((LOW+HIGH+CLOSE)/3,5),1)<REF(MA((LOW+HIGH+CL OSE)/3,5),2);SC:=L<HHV(MA((LOW+HIGH+CLOSE)/3,5),13) AND H>HHV(MA((LOW+HIGH+CLOSE)/3,5),13) AND C>REF(C,1) ANDC>O;MR:=SC AND COUNT(SS,2);买:=MR AND NOT(REF(MR,1));STICKLINE(买,L,L*0.95,0,0),COLORRED;DRAWTEXT(买,L*0.95, '必涨'),COLORRED;多方:=7*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1)-3*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3,1)-SMA(SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3,1),2,1);STICKLINE(CROSS(78.89,多方),H+0.1,H,0,0),COLOR00FF00;DRAWTEXT(CROSS(78.89,多方),H+0.3,'(逃顶)'),COLOR00FF00;A1:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*1,5,1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*1,5,1);A2:=(EMA(A1,5)-REF(EMA(A1,5),1))/REF(EMA(A1,5),1)*1;A5:=(HHV(H,60)-C)/(HHV(H,60)-LLV(L,60))*1;{DRAWTEXT(CROSS(A1,EMA(A1,5))ANDEMA(A1,5)<A5,L*0.98,'(黑马)'),COLORYELLOW;}VAR1:=(CLOSE-LLV(LOW,24))/(HHV(HIGH,24)-LLV(LOW,24))*1;VAR2:=SMA(VAR1,3,1)*100;趋势线:=SMA((SMA(VAR2,3,1)*VAR1),3,1)*1;VAR9:=CROSS(趋势线,(SMA(VAR2,3,1)*VAR1)) AND (SMA(VAR2,3,1)*VAR1)>8;{DRAWTEXT(VAR9 AND COUNT(VAR9,1)=1,H+0.4,'逃'), LINETHICK2,COLORYELLOW;{新加}DRAWICON(FILTER(CROSS(-"WR.WR1"(14,14),(0 - 81)),10),L-0.2,1);E5:=EMA(C,5);E13:=EMA(C,13);DRAWBAND(E5,RGB(200,0,0),E13,RGB(0,200,0));DRAWKLINE(H,O,L,C);平衡:EMA(C,20)COLORYELLOW;上轨:平衡 + 2*STD(C,20),LINETHICK2,COLORMAGENTA;下轨:平衡 - 2*STD(C,20),LINETHICK2,COLORGREEN;IF(平衡>REF(平衡,1),平衡,DRAWNULL),COLORRED;IF(平衡=REF(平衡,1),平衡,DRAWNULL),COLORYELLOW;IF(平衡<REF(平衡,1),平衡,DRAWNULL),COLORGREEN;STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLORFF7700;STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLORFFBB0 0;STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLORFFDD0 0;STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0.5,0 ),COLORFFFF 00;STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR000055;STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR000077;STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000BB;STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.5,0) ,COLOR0000FF;VAR9Q:=C= HHV(C,4)AND (REF(C,1)>=REF(C,2) OR REF(C,1)>=REF(C,3)) OR REF(C,1)=HHV(C,4) AND CLOSE>=REF(C,2) OR REF(C,2)=HHV(C,4) AND REF(C,3)=LLV(C,4) AND C>=REF(C,1) OR REF(C,3)=HHV(C,4) AND C>=REF(C,1) AND C>=REF(C,2);红持:=VAR9Q;STICKLINE(VAR9Q,C,(O+C)/2,3,0),COLOR000055;STICKLINE(VAR9Q,C,(O+C)/2,2,0),COLOR000077;STICKLINE(VAR9Q,C,(O+C)/2,1,0),COLOR0000BB;STICKLINE(VAR9Q,C,(O+C)/2,0.5,0),COLOR0000FF;VARAQ:=C=HHV(C,4) AND REF(C,1)=LLV(C,4);粉变:=VARAQ;STICKLINE(VARAQ,C,(O+C)/2,3,0),COLORFF11FF;STICKLINE(VARAQ,C,(O+C)/2,2,0),COLORFF55FF;STICKLINE(VARAQ,C,(O+C)/2,1,0),COLORFF99FF;STICKLINE(VARAQ,C,(O+C)/2,0.5,0),COLORFFDDFF;VARBQ:=C=LLV(C,4) AND (REF(C,1)<REF(C,2) OR REF(C,1)<REF(C,3)) OR REF(C,1)=LLV(C,4) AND C<REF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)!=HHV(C,4) AND C<REF(C,1) OR REF(C,3)=LLV(C,4) AND C<REF(C,1) AND C<REF(C,2);灰跌:=VARBQ;STICKLINE(VARBQ,C,(O+C)/2,3,0),COLOR333333;STICKLINE(VARBQ,C,(O+C)/2,2,0),COLOR777777;STICKLINE(VARBQ,C,(O+C)/2,1,0),COLORBBBBBB;STICKLINE(VARBQ,C,(O+C)/2,0.5,0),COLORFFFFFF;VARCQ:=REF(C,1)=LLV(C,4) AND C>=REF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)<=REF(C,3) AND REF(C,2)<REF(C,4) AND C>=REF(C,1);绿买:=VARCQ;STICKLINE(VARCQ,O,(O+C)/2,3,0),COLOR003300;STICKLINE(VARCQ,O,(O+C)/2,2,0),COLOR007700;STICKLINE(VARCQ,O,(O+C)/2,1,0),COLOR00BB00;STICKLINE(VARCQ,O,(O+C)/2,0.5,0),COLOR00FF00;VARDQ:=REF(C,1)=HHV(C,4) AND C<REF(C,2) OR (REF(C,2)=HHV(C,4) AND REF(C,1)>REF(C,3) OR REF(C,3)=HHV(C,4) AND REF(C,1)>REF(C,2)) AND REF(C,2)>=REF(C,4) AND C<REF(C,1);蓝抛:=VARDQ;STICKLINE(VARDQ,O,(O+C)/2,3,0),COLORFF1100;STICKLINE(VARDQ,O,(O+C)/2,2,0),COLORFF5500;STICKLINE(VARDQ,O,(O+C)/2,1,0),COLORFF9900;STICKLINE(VARDQ,O,(O+C)/2,0.5,0),COLORFFDD00;Y1:=REF(EMA(DMA((((HIGH + LOW) + (CLOSE * 2)) / 4.15),0.9),3),1);{DRAWTEXT(CROSS(CLOSE,Y1),LOW,'[买进]'),COLORYELLOW;STICKLINE(CROSS(Y1,CLOSE),H*1.05,H,0,0),COLORWHITE;{DRAWTEXT(CROSS(Y1,CLOSE),HIGH*1.05,'[卖出]'),COLORWHITE;{新加}VAR1W:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));VAR2W:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));VAR3W:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));{DRAWTEXT(CROSS(VAR2W,MA(VAR3W,6)),LOW -0.6,'(买)'),COLORFF99FF;DRAWTEXT(CROSS(MA(VAR3W,6),VAR1W),HIGH+0.9,'(卖)'),COLORCCFF13;}VAR3P:=IF(CLOSE/REF(CLOSE,1)>1.050 AND HIGH/CLOSE<1.010 AND IF(CLOSE>REF(CLOSE,1),88,0)>0, 91, 0);STICKLINE(VAR3P>90,L,L*0.92,0,0),COLORFF00FF;DRAWTEXT(VAR3P>90,LOW*0.92,'追涨'),COLORFF00FF;SS:=MA((LOW+HIGH+CLOSE)/3,5)>REF(MA((LOW+HIGH+C LOSE)/3,5),1) AND REF(MA((LOW+HIGH+CLOSE)/3,5),1)<REF(MA((LOW+HIGH+CL OSE)/3,5),2);SC:=L<HHV(MA((LOW+HIGH+CLOSE)/3,5),13) AND H>HHV(MA((LOW+HIGH+CLOSE)/3,5),13) AND C>REF(C,1) AND C>O;MR:=SC AND COUNT(SS,2);买:=MR AND NOT(REF(MR,1));STICKLINE(买,L,L*0.95,0,0),COLORRED;DRAWTEXT(买,L*0.95, '必涨'),COLORRED;多方:=7*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1)-3*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3,1)-SMA(SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3,1),2,1);STICKLINE(CROSS(78.89,多方),H+0.1,H,0,0),COLOR00FF00;DRAWTEXT(CROSS(78.89,多方),H+0.3,'(逃顶)'),COLOR00FF00;A1:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*1,5,1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*1,5,1);A2:=(EMA(A1,5)-REF(EMA(A1,5),1))/REF(EMA(A1,5),1)*1;A5:=(HHV(H,60)-C)/(HHV(H,60)-LLV(L,60))*1;{DRAWTEXT(CROSS(A1,EMA(A1,5))ANDEMA(A1,5)<A5,L*0.98,'(黑马)'),COLORYELLOW;}VAR1:=(CLOSE-LLV(LOW,24))/(HHV(HIGH,24)-LLV(LOW,24))*1;VAR2:=SMA(VAR1,3,1)*100;趋势线:=SMA((SMA(VAR2,3,1)*VAR1),3,1)*1;VAR9:=CROSS(趋势线,(SMA(VAR2,3,1)*VAR1)) AND (SMA(VAR2,3,1)*VAR1)>8;{DRAWTEXT(VAR9 AND COUNT(VAR9,1)=1,H+0.4,'逃'), LINETHICK2,COLORYELLOW;{新加}DRAWICON(FILTER(CROSS(-"WR.WR1"(14,14),(0 - 81)),10),L-0.2,1);请老师分别做个必涨。

通达信指标公式源码顶底趋势指标

通达信指标公式源码顶底趋势指标

90,COLOR9966FF,LINETHICK2;80,COLOR996699;20,COLORGREEN;10,COLORCC6633,LINETHICK2;长期线:MA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),19)+100,COLOR9900FF; 短期线:-100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14))+100,COLOR888888;中期线:EMA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),4)+100,COLORYELLOW,LINET HICK2;见顶:(REF(中期线,1)>85 AND REF(短期线,1)>85 AND REF(长期线,1)>65) AND CROSS(长期线,短期线) ;顶部区域:(中期线<REF(中期线,1) AND REF(中期线,1)>80) AND (REF(短期线,1)>95 OR REF(短期线,2)>95 ) AND 长期线>60 AND 短期线<83.5AND 短期线<中期线AND 短期线<长期线+4;顶部:=FILTER(顶部区域,4);底部区域:(长期线<12 AND 中期线<8 AND (短期线<7.2 OR REF(短期线,1)<5) AND (中期线>REF(中期线,1) OR 短期线>REF(短期线,1)))OR (长期线<8 AND 中期线<7 AND 短期线<15 AND 短期线>REF(短期线,1)) OR (长期线<10 AND 中期线<7 AND 短期线<1) ;STICKLINE( 顶部,99,103,20,1 ),COLORRED,COLORGREEN;低位金叉:长期线<15 AND REF(长期线,1)<15 AND 中期线<18 AND 短期线>REF(短期线,1) AND CROSS(短期线,长期线) AND 短期线>中期线AND (REF(短期线,1)<5 OR REF(短期线,2)<5 ) AND (中期线>=长期线OR REF( 短期线,1)<1 ); STICKLINE( 低位金叉,0,5,11,0 ),COLORRED;。

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

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

{开始---主力趋势指标}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);。

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

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

{N(1,,100,6)}CC:IF(CURRBARSCOUNT<18,CONST(REF(C,1)),DRAWNULL),COLOR000000; 止赢:1.05*CC,COLORFFFFFF,LINETHICK2;止损:0.97*CC,COLORFFFFFF,LINETHICK2;{LOOW:BBI - 2.58*STD(BBI,10),COLOR000099,LINETHICK0};SAT:=IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100>100,100,(AMOU NT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100);AA10:MA(CLOSE,8),COLOR0000FF;AA12:MA(CLOSE,12),COLOR0000FF;BB10:=((ATAN((AA10 - REF(AA10,1))) * 3.1416) * 10);BB12:=((ATAN((AA12 - REF(AA12,1))) * 3.1416) * 10);MA13:=MA(CLOSE,13);DRAWBAND(AA10,RGB(150,0,100),AA12,RGB(256,96,96));X1:=(C+L+H)/3;BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;EMA8:=EMA(C,8);DRAWTEXT(FILTER(BB13>1 AND EMA(X1,13)>REF(EMA(X1,8),1),10),EMA8,'∠45上升'),COLORWHITE;压力:=MA(REF(HHV(C,30),1),2),COLOR9DFFFF;支撑:=MA(REF(LLV(C,30),1),2),COLORABFF46;AA1:=AMOUNT/V;BB1:=L<AA1*0.9;CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;DD1:=L<MA(C,5)*0.921;EE1:=V<MA(V,5)*1.5;FF1:=BB1 AND CC1 AND DD1 AND EE1;DRAWTEXT(FF1,(LOW* 0.99),'★老鼠仓'),COLOR4080FF;A51:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L ,55))/(HHV(H,55)-LLV(L,55))*100,5,1);黑码线:=EMA(A51,5);A54:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;趋势线:=(MA(3*SMA(A54,6,1)-2*SMA(SMA(A54,5,1),5,1),2));DRAWTEXT(CROSS(趋势线,0)AND 黑码线<40,(HIGH* 0.97),'★大黑码'),COLORYELLOW;LC:=REF(CLOSE,1);RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100); FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);DRAWTEXT(CROSS(FF,MA15),(LOW * 0.98),'★底背离'),COLOR00FFFF; DRAWTEXT(CROSS(88,RSI),(HIGH * 1.02),'☆顶背离'),COLORFFFF00;VAR2:=LLV(LOW,27);VAR3:=HHV(HIGH,34);VAR4:=EMA((CLOSE-VAR2)/(VAR3-VAR2)*4,4)*25;注意买:=IF((VAR4<10),80,100);RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;超跌:=IF(J<0,10,0);BDDD:=LLV(J,2)=LLV(J,8);买入:=IF(CROSS(J,REF(J+0.01,1)) AND BDDD AND J<20,30,0); DRAWTEXT(买入AND 注意买=100 AND 超跌=0,LOW,'★短买'),COLORFFFFFF;MTM:=C-REF(C,1);DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);买:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) ANDCROSS(DX,MA(DX,2)),1,0);DRAWTEXT(FILTER(买=1,5),LOW-0.09,'★拉升'),COLOR00FFFF;A7:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,21)+EMA((OPEN+HIGH+LOW+CL OSE)/4,34)+EMA((OPEN+HIGH+LOW+CLOSE)/4,68))/3;VAR7:=FORCAST(A7,6);{MA3K:VAR7,COLORRED,LINETHICK0;MA5K:VAR7,COLORYELLOW,LINETHICK0;}STICKLINE(CLOSE> REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORRED; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR000055; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR000077; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR000099; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLOR0000BB; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLOR0000DD; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLOR0000FF; STICKLINE(CLOSE= REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORWHITE; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR555555; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR777777; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR999999; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORBBBBBB; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORDDDDDD; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORFFFFFF; STICKLINE(CLOSE< REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORCYAN;STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR990000; STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLORCC0000; STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLORFF4400; STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORFF8800; STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORFFCC00; STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORCYAN;趋势射线3X: DRAWLINE(L=LLV(L,3),L,C=HHV(C,3),L,0),COLOR9A90FF;趋势射线7: DRAWLINE(H=HHV(H,7),H,L=LLV(L,7),L,0),COLOR9AFF89;射线7X: DRAWLINE(L=LLV(L,7),L,H=HHV(H,7),L,0),COLOR9AFF89;趋势射线21: DRAWLINE(H=HHV(H,21),H,L=LLV(L,21),L,0),COLORC100FF; 射线21X: DRAWLINE(L=LLV(L,21),L,H=HHV(H,21),L,0),COLORC100FF;趋势射线35: DRAWLINE(H=HHV(H,35),H,L=LLV(L,35),L,0),COLORC1005B; 射线35X: DRAWLINE(L=LLV(L,35),L,H=HHV(H,35),L,0),COLORC1005B;趋势射线49: DRAWLINE(H=HHV(H,49),H,L=LLV(L,49),L,0),COLORYELLOW; 射线49X: DRAWLINE(L=LLV(L,49),L,H=HHV(H,49),L,0),COLORYELLOW; AA:=(REF(CLOSE,1)+REF(CLOSE,2)+OPEN)/3;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.8,0.05,1,'今日保护价'),LINETHICK2,COLOR00FFFF;DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.84,0.05,1,AA);DRAWTEXT_FIX(CURRBARSCOUNT=1,0.86,0.05,1,'元');重心:(2*C+H+L)/4,COLOR00FFFF,LINETHICK0;SJ:=WMA((重心-LLV(L,5))/(HHV(H,5)-LLV(L,5))*100,2);ZJ:=WMA(0.618*REF(SJ,1)+0.382*SJ,2);DRAWTEXT(CROSS(SJ,ZJ) AND SJ<30,L-0.3,'★'),COLOR00FFFF; DRAWTEXT(CROSS(ZJ,SJ) AND SJ>70,H+0.2,'★'),COLORFFFF00;A1:=EMA(C,14),COLORA2A200,LINETHICK1;A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW;突破:REF(EMA(C,14),1),NODRAW;距离:(C-突破)/突破*100,NODRAW;出击:IF(A1X>=0,REF(EMA(C,14),BARSLAST(CROSS(A1X,0))+1),DRAWNULL),CO LORB000B0,LINETHICK1;休假:IF(A1X<0,REF(EMA(C,14),BARSLAST(CROSS(0,A1X))+1),DRAWNULL),COL ORFFFF00,LINETHICK1;涨幅:IF(A1X>=0,(C-出击)/出击*100,DRAWNULL)NODRAW;跌幅:IF(A1X<0,(C-休假)/休假*100,DRAWNULL)NODRAW;♂10%:IF(H>=出击*1.1,出击*1.1,DRAWNULL),COLORRED,DOTLINE,LINETHICK1;♂20%:IF(H>=出击*1.2,出击*1.2,DRAWNULL),COLORRED,DOTLINE,LINETHICK1;♂30%:IF(H>=出击*1.3,出击*1.3,DRAWNULL),COLORRED,DOTLINE,LINETHICK1;♀Ⅰ:IF(L<休假*0.9,休假*0.9,DRAWNULL),COLORGREEN,DOTLINE,LINETHICK1;♀Ⅱ:IF(L<休假*0.8,休假*0.8,DRAWNULL),COLORGREEN,DOTLINE,LINETHICK1;♀Ⅲ:IF(L<休假*0.7,休假*0.7,DRAWNULL),COLORGREEN,DOTLINE,LINETHICK1;STICKLINE(CROSS(A1X,0),C,O,2,0),COLOR00FFFF;STICKLINE(CROSS(0,A1X),C,O,2,0),COLOR606000;STICKLINE(CROSS(A1X,0)ORCROSS(0,A1X),REF(EMA(C,14),1),REF(EMA(C,14),1)*0.998,3,0),COLOR3C3C3 C;STICKLINE(ISLASTBAR,REF(EMA(C,14),1),REF(EMA(C,14),1)*0.998,3,0),COL OR00FFFF;A11:DRAWLINE(HIGH>=HHV(HIGH,5),HIGH,LOW<=LLV(LOW,5),LOW,0),CO LORA2A200;B1:DRAWLINE(LOW<=LLV(LOW,5),LOW,HIGH>=HHV(HIGH,5),HIGH,0),COL OR0000FF;A2:DRAWLINE(HIGH>=HHV(HIGH,13),HIGH,LOW<=LLV(LOW,13),LOW,0),C OLORA2A200;B2:DRAWLINE(LOW<=LLV(LOW,13),LOW,HIGH>=HHV(HIGH,13),HIGH,0),C OLOR0000FF;A3:DRAWLINE(HIGH>=HHV(HIGH,34),HIGH,LOW<=LLV(LOW,34),LOW,0),C OLORA2A200;B3:DRAWLINE(LOW<=LLV(LOW,34),LOW,HIGH>=HHV(HIGH,34),HIGH,0),C OLOR0000FF;A4:DRAWLINE(HIGH>=HHV(HIGH,55),HIGH,LOW<=LLV(LOW,55),LOW,0),C OLORA2A200;B4:DRAWLINE(LOW<=LLV(LOW,55),LOW,HIGH>=HHV(HIGH,55),HIGH,0),C OLOR0000FF;{MTM:=C-REF(C,1);}ZLGJ:=100*EMA(EMA(MTM,N1),N1)/EMA(EMA(ABS(MTM),N1),N1);买1:=IF(LLV(ZLGJ,2)=LLV(ZLGJ,7) AND COUNT(ZLGJ<0,2) ANDCROSS(ZLGJ,MA(ZLGJ,2)),1,0);卖1:=IF(HHV(ZLGJ,2)=HHV(ZLGJ,7) AND COUNT(ZLGJ>50,2) AND CROSS(MA(ZLGJ,2),ZLGJ),1,0);DRAWICON(FILTER(买1=1,5),LOW*0.96,34),COLORRED;STICKLINE(FILTER(买1=1,5),C,O,1,0),COLORRED;DRAWICON(FILTER(卖1=1,1),H*1.03,35),COLOR646400;STICKLINE(FILTER(卖1=1,1),C,O,1,0),COLOR646400;{RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;}BDGD:=HHV(J,2)=HHV(J,8) AND J>80;注意:=IF(CROSS(REF(J-0.01,1),J) AND REF(BDGD,1),1,0);DRAWTEXT(注意AND 卖1<1,HIGH*1.01,'★'),COLORFFFF00,LINETHICK3; STICKLINE(注意AND 卖1<1,O,CLOSE,1,0),COLOR646400,LINETHICK2;时间窗口01:=FILTER(IF(HHVBARS(HIGH,5),0,H),5),COLORFFFF00; DRAWTEXT(时间窗口01,HIGH*0.99,'5');时间窗口02:=FILTER(IF(LLVBARS(LOW,5),0,L),5),COLOR00FFFF; DRAWTEXT(时间窗口02,LOW*0.99,'5');时间窗口1:=FILTER(IF(HHVBARS(HIGH,13),0,1),13),COLOR00FF00; DRAWTEXT(时间窗口1,HIGH*0.99,'13');时间窗口2:=FILTER(IF(LLVBARS(LOW,13),0,1),13),COLOR0000FF; DRAWTEXT(时间窗口2,LOW*0.99,'13');时间窗口3:=FILTER(IF(HHVBARS(HIGH,34),0,2),34),COLOR55FF55; DRAWTEXT(时间窗口3,HIGH*0.99,'34');时间窗口4:=FILTER(IF(LLVBARS(LOW,34),0,2),34),COLOR5555FF; DRAWTEXT(时间窗口4,LOW*0.99,'34');时间窗口5:=FILTER(IF(HHVBARS(HIGH,55),0,30),55),COLOR99FF99; DRAWTEXT(时间窗口5,HIGH*0.99,'55');时间窗口6:=FILTER(IF(LLVBARS(LOW,55),0,30),55),COLORDD00FF; DRAWTEXT(时间窗口6,LOW*0.99,'55');时间窗口7:=FILTER(IF(HHVBARS(HIGH,89),0,40),89),COLORDDFFDD; DRAWTEXT(时间窗口7,HIGH*0.99,'89');时间窗口8:=FILTER(IF(LLVBARS(LOW,89),0,40),89),COLOR0055FF; DRAWTEXT(时间窗口8,LOW*0.99,'89');时间窗口9:=FILTER(IF(HHVBARS(HIGH,144),0,50),144),COLORDDFF00; DRAWTEXT(时间窗口9,HIGH*0.99,'144');时间窗口10:=FILTER(IF(LLVBARS(LOW,144),0,50),144),COLOR9955FF; DRAWTEXT(时间窗口10,LOW*0.99,'144');时间窗口11:=FILTER(IF(HHVBARS(HIGH,233),0,60),233),COLORDDFFFF; DRAWTEXT(时间窗口11,HIGH*0.99,'233');时间窗口12:=FILTER(IF(LLVBARS(LOW,233),0,60),233),COLORFF55FF; DRAWTEXT(时间窗口12,LOW*0.99,'233');ARE4:=MA(C,20); ARE5:=(C>MA(C,5)); ARE6:=(MA(C,5)>MA(C,10));ARE7:=(C>MA(C,10));ARE8:=(MA(C,5)>MA(C,20)); ARE9:=(C>MA(C,20)); ARE10:=REF(ARE4,1); ARE11:=(ARE4>ARE10);AVX:=(((((IF(ARE5,10,(0-10))+IF(ARE6,10,(0-10)))+IF(ARE7,10,(0-10)))+IF( ARE8,10,(0-10)))+IF(ARE9,10,(0-10)))+IF(ARE11,10,(0-10)));DSLX:=(C/INDEXC); DSLX1:=MA(DSLX,5); DSLX2:=MA(DSLX,10);VRE1:=MA(V,5); VRE2:=MA(V,10);阻力位:=IF((C>200),(C*1.01),(C*1.07)); 阻力位1:=IF((C<10),(C*1.05),阻力位);止损位:=IF((C>200),(C*0.99),(C*0.93)); 止损位1:=IF((C<10),(C*0.95),止损位);TJTS1:=ISLASTBAR AND C<500; TJTS2:=ISLASTBAR AND C>500;KDAT:=REFDATE(HHV(H,45)/1.01,DATE);{解盘位置}解盘1:=CONST(IF(TJTS1 AND ((CROSS(AVX,1) AND (VRE1 >= VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘2:=CONST(IF(TJTS1 AND ((CROSS(AVX,1) AND (VRE1 < VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘3:=CONST(IF(TJTS1 AND ((CROSS(AVX,1) AND (VRE1 > VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘4:=CONST(IF(TJTS1 AND ((CROSS(AVX,1) AND (VRE1 <= VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘5:=CONST(IF(TJTS1 AND ((CROSS(1,AVX) AND (VRE1 >= VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘6:=CONST(IF(TJTS1 AND ((CROSS(1,AVX) AND (VRE1 < VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘7:=CONST(IF(TJTS1 AND ((CROSS(1,AVX) AND (VRE1 >= VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘8:=CONST(IF(TJTS1 AND ((CROSS(1,AVX) AND (VRE1 < VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘9:=CONST(IF(TJTS1 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 >= VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘10:=CONST(IF(TJTS1 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 < VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘11:=CONST(IF(TJTS1 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 >= VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘12:=CONST(IF(TJTS1 AND ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 < VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘13:=CONST(IF(TJTS1 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 >= VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘14:=CONST(IF(TJTS1 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 < VRE2)) AND (DSLX >= DSLX1)) ,1,0));解盘15:=CONST(IF(TJTS1 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 >= VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘16:=CONST(IF(TJTS1 AND ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 < VRE2)) AND (DSLX < DSLX1)) ,1,0));解盘17:=CONST(IF(TJTS2 AND (CROSS(AVX,1) AND (VRE1 >= VRE2)) ,1,0)); 解盘18:=CONST(IF(TJTS2 AND (CROSS(AVX,1) AND (VRE1 >= VRE2)) ,1,0)); 解盘19:=CONST(IF(TJTS2 AND (CROSS(AVX,1) AND (VRE1 < VRE2)) ,1,0)); 解盘20:=CONST(IF(TJTS2 AND (CROSS(AVX,1) AND (VRE1 < VRE2)) ,1,0)); 解盘21:=CONST(IF(TJTS2 AND (CROSS(1,AVX) AND (VRE1 >= VRE2)) ,1,0)); 解盘22:=CONST(IF(TJTS2 AND (CROSS(1,AVX) AND (VRE1 < VRE2)) ,1,0)); 解盘23:=CONST(IF(TJTS2 AND (((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 >= VRE2)) ,1,0));解盘24:=CONST(IF(TJTS2 AND (((AVX >= 1) AND (REF(AVX,1) > 0)) AND (VRE1 < VRE2)) ,1,0));解盘25:=CONST(IF(TJTS2 AND (((AVX < 1) AND (REF(AVX,1) < 0)) AND(VRE1 >= VRE2)) ,1,0));解盘26:=CONST(IF(TJTS2 AND (((AVX < 1) AND (REF(AVX,1) < 0)) AND (VRE1 < VRE2)) ,1,0));解盘文字1:=IF(解盘1=1,'该股的量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3左右',IF(解盘2=1,'该股虽然走势趋强,但量能还显不足,可以考虑短线进场,仓位在1/2左右',IF(解盘3=1,'该股量价配合良好,但相对其它股票并没有明显走强,可以考虑短线进场,仓位1/2左右',IF(解盘4=1,'该股形态尚可,但量能不足,股票也未完全走强,可以短线参与,仓位1/3左右',IF(解盘5=1,'该股形态变坏,但走势相对其它股票尚可,重仓者减持大半,清仓者可以观望',IF(解盘6=1,'该股随大盘一起下跌,程明显缩量走势,考虑到大盘风险,减持或清仓',IF(解盘7=1,'该股放量下跌,走势明显偏弱,离场观望',IF(解盘8=1,'该股缩量下跌,走势偏弱,离场观望',IF(解盘9=1,'该股形态良好,强势明显,量能充足,可以继续持有',IF(解盘10=1,'该股上行趋势不变,强势依然,但量能开始转弱,注意风险',IF(解盘11=1,'该股仍然具备上涨潜力,但股性偏弱,可考虑减仓',IF(解盘12=1,'该股走势趋弱,量能不足,减持大部分筹码',IF(解盘13=1,'该股形态不佳,注意成交量的变化,但目前不适合参与',IF(解盘14=1,'该股趋势不明,股价偏弱,注意量能变化,目前不宜参与',IF(解盘15=1,'该股有走强迹象,但量能不足,趋势不明,不适合操作',IF(解盘17=1,'大盘量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3左右',IF(解盘19=1,'大盘虽然走势趋强,但量能还显不足,如果前期经过一轮下跌', IF(解盘21=1,'大盘形态走坏,重仓者可以减去大部分仓位',IF(解盘22=1,'大盘缩量调整,注意风险,短线清仓观望',IF(解盘23=1,'大盘走势良好,量能理想,可以继续持有强势股',IF(解盘24=1,'大盘形态良好,但量能稍显不足,随时准备减仓',IF(解盘25=1,'大盘趋势不明,注意成交量变化,目前不适宜进场',IF(解盘26=1,'大盘趋势向下,量能萎缩,不适合进场',DRAWNULL)))))))))))))))))))))));解盘文字2:=IF(解盘16=1,'该股走势太弱,没有参与价值',IF(解盘18=1,' 如前期经过一轮下跌,此时为最佳买点,但如果前期有过一段涨幅则介入需谨慎', IF(解盘20=1,' 可以考虑短线进场,仓位在1/2左右,一旦量能放大可以加仓买入',DRAWNULL)));DRAWTEXT(CURRBARSCOUNT=60{位置} AND (解盘1=1 OR 解盘2=1 OR 解盘3=1 OR 解盘4=1 OR 解盘5=1 OR 解盘6=1 OR 解盘7=1 OR解盘8=1 OR 解盘9=1 OR 解盘10=1 OR 解盘11=1 OR 解盘12=1 OR 解盘13=1 OR 解盘14=1 OR 解盘15=1 OR 解盘17=1 OR解盘19=1 OR 解盘21=1 OR 解盘22=1 OR 解盘23=1 OR 解盘24=1 OR 解盘25=1 OR 解盘26=1),(KDAT*0.99),解盘文字1),COLOR00FFFF;DRAWTEXT(CURRBARSCOUNT=60{位置} AND (解盘16=1 OR 解盘18=1 OR 解盘20=1),IF(解盘18=1 OR 解盘20=1,KDAT*0.98,KDAT*0.96),解盘文字2),COLOR00FFFF;{A1:=REF(HIGH,3)=HHV(HIGH,2*3+1);B1:=FILTER(A1,3);}C1:=BACKSET(B1,3+1);D1:=FILTER(C1,3);{高点}}{A2:=REF(LOW,3)=LLV(LOW,2*3+1);B2:=FILTER(A2,3);}C2:=BACKSET(B2,3+1);D2:=FILTER(C2,3);{低点}E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2;E2:=(HIGH+LOW)/2;{高低点出现在同一K线上时可作取舍}H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR ORBARSCOUNT(CLOSE)=1;H2:=D1 AND NOT(D2 AND E1>=E2);L1:=D2 AND NOT(D1 AND E1=E2);{X1:=REF(BARSLAST(H1),1)+1; }F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1)); G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I1,1);{过滤后低点}L2:=LD OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));G2:=F2>REF(F2,1);I2:=BACKSET(G2,2);HD:=I2>REF(I2,1);{过滤后高点}J1:=BACKSET(ISLASTBAR,MIN(BARSLAST(HD),BARSLAST(LD))+1);J2:=J1>REF(J1,1);{A3:=H;B3:=REF(H,REF(BARSLAST(HD),1)+1)>REF(H,REF(BARSLAST(HD),1)+2+REF (BARSLAST(HD),REF(BARSLAST(HD),1)+2));}D3:=A3 AND B3 AND HD;E3:=BACKSET(D3,REF(BARSLAST(HD),1)+2);HH:=E3>REF(E3,1);{找出全部长期高点}{A4:=L>REF(L,REF(BARSLAST(LD),1)+1);B4:=REF(L,REF(BARSLAST(LD),1)+1);}D4:=A4 AND B4 AND LD;E4:=BACKSET(D4,REF(BARSLAST(LD),1)+2); LL:=E4>REF(E4,1);{找出全部长期低点}DRAWICON(HH,H*1.01,8);DRAWICON(LL,L*0.999,7);H3:=HH OR ISLASTBAR OR BARSCOUNT(C)=1; {后面进行过滤,方法同前。

通达信指标公式源码趋势系列 副图源码 无未来

通达信指标公式源码趋势系列 副图源码 无未来

VAR2:=LLV(LOW,10);VAR3:=HHV(HIGH,25);阶段卖出: 3.2,COLORC6C600;3.5,COLOR0088FF;清仓卖出: 3.5,COLORFF75FF;动力线:= EMA((CLOSE-VAR2)/(VAR3-VAR2)*4,4);STICKLINE(动力线>REF(动力线,1) ,动力线,REF(动力线,1),3 ,1),COLORRED; STICKLINE(动力线<=REF(动力线,1) ,动力线,REF(动力线,1),3 ,1),COLOR00FF00;底部:0.2,COLOR70DB93;关注:0.5,COLORYELLOW;DRAWICON( FILTER(CROSS(动力线,关注),20),动力线+0.02 ,1); DRAWICON( FILTER(CROSS(清仓卖出,动力线),20),动力线+0.02,2); DRAWICON( FILTER(CROSS(动力线,底部),20),动力线+0.02 ,1); DRAWICON( FILTER(CROSS(阶段卖出,动力线),20),动力线+0.02,2);趋势趋势:5*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-3*SM A(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1)-S MA(SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1) ,3,1),2,1),LINETHICK0,COLOR7F52AF;趋势1: EMA(MA(趋势,5),3),LINETHICK0,COLORA6B8C1;STICKLINE(趋势>=趋势1,趋势,趋势1,5,0),COLOR7F52AF;STICKLINE(趋势<趋势1,趋势,趋势1,5,0),COLORA6B8C1;STICKLINE(趋势>108 AND 趋势>=趋势1,趋势,108,5,0),COLORFF0000; STICKLINE(趋势1>108 AND 趋势<趋势1,趋势1,108,5,0),COLORFFFFFF; STICKLINE(趋势<0 AND 趋势<趋势1,趋势,0,5,0),COLORF00FF0; STICKLINE(趋势1<0 AND 趋势>趋势1,趋势1,0,5,0),COLORF0F000;V1:= MA(CLOSE,5)=HHV(MA(CLOSE,5),20);V2:= MA(CLOSE,5)>MA(CLOSE,20);V3:= COUNT(MA(CLOSE,1)>REF(CLOSE,1),3)=3;风险: IF(V1 AND V2 AND V3,30,0),LINETHICK0,STICK,COLOR00FF00;V11:= MA(CLOSE,5)=HHV(MA(CLOSE,5),120);V21:= MA(CLOSE,5)>MA(CLOSE,120);V31:= COUNT(MA(CLOSE,1)>REF(CLOSE,1),3)=3;风险1: IF(V11 AND V21 AND V31,60,0),LINETHICK0,STICK,COLORF0F000; 底部: 5,LINETHICK0,COLOR00FFFF;抄底: IF(CROSS(趋势,底部),60,0),LINETHICK2,STICK,COLOR00FFFF; DRAWTEXT(抄底,50,'抄底'),COLOR0000FF;天线: 108,LINETHICK0,COLORFF9D00;逃顶: IF(CROSS(天线,趋势),1,0),LINETHICK0,STICK,COLORFF9D00; STICKLINE(CROSS(天线,趋势),90,108,3,0),COLORFF9D00;DRAWTEXT(CROSS(天线,趋势),85,'逃顶'),COLORFF9D00;VAR1:=(CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100;操盘线:SMA(VAR1,5,1),LINETHICK2,COLORRED;趋势线:SMA(操盘线,3,1),LINETHICK2,COLORYELLOW;买入航标:IF(CROSS(操盘线,趋势线) AND 趋势线<25,50,0) ,LINETHICK2,COLORRED;DRAWTEXT(买入航标>0,50,'买入'),COLORRED;卖出时间:IF(CROSS(趋势线,操盘线)AND 操盘线>70,80,100),COLORGREEN; DRAWTEXT(卖出时间<100,80,'卖出'),COLOR00FF00;强弱趋势RSV1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;RSV2:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;J1:=SMA(RSV1,3,1);J2:=SMA(J1,3,1);趋势线:3*SMA(RSV2,5,1)-2*SMA(SMA(RSV2,5,1),3,1),LINETHICK2,COLORFF84FF; K:SMA(RSV2,3,1),LINETHICK2,COLORWHITE;D:SMA(K,3,1),LINETHICK2,COLORF408F4;{见顶信号:100,COLORCCFF00;}买点准备:IF(趋势线<=10,30,0),LINETHICK2,COLORYELLOW;卖点准备: IF(CROSS(J2,J1) AND J2>85,70,100),LINETHICK2,COLOR00FF00; 强弱界线:49,POINTDOT,LINETHICK3,COLOR99AACC;{以下设置副图显示方式}STICKLINE(趋势线>88,100,趋势线,4,1),COLORGREEN;STICKLINE(趋势线<=10,0,趋势线,4,1),COLORYELLOW;STICKLINE(COUNT(趋势线<REF(趋势线,1) AND 趋势线<10,2)=2,0,20,4,0),COLORRED;STICKLINE(CROSS(J2,J1) AND J2>85,100,80,4,0),COLORGREEN; DRAWICON(CROSS(趋势线,49),趋势线,1),COLORRED;DRAWICON(FILTER(CROSS(D,K) AND D>81,10),D*1.05,2);DRAWTEXT(CROSS(趋势线,49),47,'转强'),COLORRED;DRAWTEXT(CROSS(49,趋势线),52,'转弱'),COLORGREEN;。

通达信指标公式源码90%概率【趋势线 判断】

通达信指标公式源码90%概率【趋势线 判断】

90%概率【趋势线判断】该公式主要是用来筛选出可能成为黑马的股票,因为几乎所有的黑马在启动的起始段DIFF:(EMA(CLOSE,10)-EMA(CLOSE,20))*0.7,LINETHICK1,COLORRED;DEAF:EMA(DIFF,8),LINETHICK1,COLORGREEN;MACD1:=(DIFF-DEAF),COLORSTICK; DRAWBAND(DIFF,RGB(250,10,10),DEAF,RGB(0,0,0));SHORT:=5;LONG:=26;MID:=2;DIF:(EMA(CLOSE,SHORT)-EMA(CLOSE,LONG)),LINETHICK1,COLOR0000FF;DEA:EMA(DIF,MID);DRAWBAND(DIF,RGB(500,180,280),DEA,RGB(380,280,180));MACD:=(DIF-DEA)*2,COLORSTICK;向下:=IF(DIF<REF(DIF,1),DIF,DRAWNULL),COLORGREEN,LINETHICK2; DRAWICON(CROSS(DIF,DEA) AND DIF>REF(DIF,1) AND DEA<0,DIF,0);趋势线:=MACD1,LINETHICK2,COLORCYAN;判断:=(SMA(((C+L)/2-LLV(L,21))/(HHV((H+C)/2,21)-LLV(L,21))*100,2,1)-8); STICKLINE(FILTER(CROSS(判断,趋势线)=1 OR 判断>REF(判断,1),10) AND 判断<25 ,0,0.02,4,0),COLORRED;STICKLINE(FILTER(判断<REF(判断,1)AND 判断>65,5),0,0.02,4,0),COLORGREEN;MA5:=EMA(C,3);MA13:=EMA(C,13);UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS (MA13,MA5))+1),H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROS S(MA5,MA13))+1),0),COLOR0000FF;DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CR OSS(MA5,MA13))+1),L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS (MA13,MA5))+1),0),COLOR00FF00;HR:=HHV(HIGH,55);HRY:=LLV(LOW,55);HRY11:=HR*HRY;HRY33:=SQRT(HRY11);TJ2:=REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HRY33; STICKLINE(TJ2,0,0.02,5,0),COLOR008888;STICKLINE(TJ2,0,0.02,2,0),COLOR00AAAA;STICKLINE(TJ2,0,0.02,1,0),COLOR00CCCC;STICKLINE(TJ2,0,0.03,0.2,0),COLOR00FFFF;DRAWTEXT(TJ2,-0.01,'大牛'),COLOR00FFFF;0;。

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

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

顶底趋势主图画线指标N:=3;A1:=REF(H,N)=HHV(H,2*N+1);B1:=FILTER(A1,N);C1:=BACKSET(B1,N+1);D1:=FILTER(C1,N);{高点}A2:=REF(L,N)=LLV(L,2*N+1);B2:=FILTER(A2,N);C2:=BACKSET(B2,N+1);D2:=FILTER(C2,N);{低点}E1:=(REF(LLV(L,2*N),1)+REF(HHV(H,2*N),1))/2;E2:=(H+L)/2;{高低点出现在同一K线上时可作取舍}H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(C)=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,L,10000),X1));G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I1,1),LINETHICK0;{过滤后低点}L2:=LD OR ISLASTBAR OR BARSCOUNT(C)=1;X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,H,0),X2));G2:=F2>REF(F2,1);I2:=BACKSET(G2,2);HD:=I2>REF(I2,1),LINETHICK0;{过滤后高点}R1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);S1:=R1>REF(R1,1);{前一高}T1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);U1:=T1>REF(T1,1);{前一低}R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2);S2:=R2>REF(R2,1);{前二高}T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);U2:=T2>REF(T2,1);{前二低}T3:=BACKSET(U2,REF(BARSLAST(LD),1)+2);U3:=T3>REF(T3,1);{前三低}T4:=BACKSET(U3,REF(BARSLAST(LD),1)+2);U4:=T4>REF(T4,1);{前四低}R3:=BACKSET(S2,REF(BARSLAST(HD),1)+2);S3:=R3>REF(R3,1);{前三高}R4:=BACKSET(S3,REF(BARSLAST(HD),1)+2);S4:=R4>REF(R4,1);{前四高}★压力1:DRAWLINE(S2,H,S1,H,1),COLORMAGENTA,LINETHICK1; ★支撑1:DRAWLINE(U2,L,U1,L,1),COLOR8FBC8F,LINETHICK1;★压力2:DRAWLINE(S3,H,S2,H,1),COLORFF8000;★支撑2:DRAWLINE(U3,L,U2,L,1),COLOR99CC32;★压力3:DRAWLINE(S4,H,S3,H,1),COLOR0000FF;★支撑3:DRAWLINE(U4,L,U3,L,1),COLOR00FF7F; DRAWICON(S2,H*1.01,10);DRAWICON(S3,H*1.01,10);DRAWNUMBER(S2,H*1.02,H),COLORCFB53B; DRAWNUMBER(S1,H*1.02,H),COLORCFB53B; DRAWNUMBER(S3,H*1.02,H),COLORCFB53B;DRAWICON(U1,L*0.99,11);DRAWICON(U2,L*0.99,11);DRAWICON(U3,L*0.99,11);DRAWICON(U4,L*0.99,11);DRAWNUMBER(U1,L*0.98,L),COLORCYAN;DRAWNUMBER(U2,L*0.98,L),COLORCYAN;DRAWNUMBER(U3,L*0.98,L),COLORCYAN;DRAWNUMBER(U4,L*0.98,L),COLORCYAN;。

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

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

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

通达信指标公式源码 自动趋势线

通达信指标公式源码 自动趋势线

M1:=5;M2:=10;HIGHN:=10;LOWN:=10;HIGHDISPLAY:=0;LOWDISPLAY:=0;ZGDISPLAY:=0;MADISPLAY: =0;AA:=REF(H,HIGHN)=HHV(H,2*HIGHN+1);QY:=BACKSET(AA,HIGHN+1);CC:=FILTER(QY,HIGHN) AND H=HHV(H,HIGHN+1);DRAWICON(CC,H*1.02,2);DDD:=BARSLAST(CC);GDTS:=IF(CC,CURRBARSCOUNT,0);DINGBU:=IF(DDD,REF(H,DDD),H);DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);DINGBU1:=REF(DINGBU,DDD+1);GDCS1:=CONST(DINGBUTS);DINGBUTS1:=REF(DINGBUTS,DDD+1);GDCS2:=CONST(DINGBUTS1);DINGBU2:=REF(DINGBU1,DDD+1);MM:=IF(CURRBARSCOUNT>GDCS2,0,1);高点压力:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1),COLORGRE EN,LINETHICK1;局部低点预选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);AAAD:=IF(高保留=1 AND 低保留=-1 AND H>REF(H,REF(距前高天,1)+2),1,IF(高保留=1 AND 低保留=-1 AND L<REF(L,REF(距前低天,1)+2),-1,0));极点保留:=IF(AAAD=0,高保留+低保留,AAAD);局部极点:=IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)) CIRCLEDOT COLORYELLOW; 局部极点A:DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0)COLORLIRED;局部极点B:DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0)COLORYELLOW; DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLOR0055FF; DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLORYELLOW; AA1:=REF(L,LOWN)=LLV(L,2*LOWN+1);QY1:=BACKSET(AA1,LOWN+1);CC1:=FILTER(QY1,LOWN) AND L=LLV(L,LOWN+1);DRAWICON(CC1,L*0.98,1);DD1:=BARSLAST(CC1);DDTS:=IF(CC1,CURRBARSCOUNT,0);YDB:=IF(DD1,REF(L,DD1),L);DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);DDCS1:=CONST(DDTS1);ZDB:=REF(YDB,DD1+1);DDTS2:=REF(DDTS1,DD1+1);DDCS2:=CONST(DDTS2);低点支撑:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1) COLORRED,LINETHICK2;MA1:=MA(CLOSE,M1);MA2:=MA(CLOSE,M2);。

趋势线大底大顶通达信指标公式源码

趋势线大底大顶通达信指标公式源码

趋势线大底大顶通达信指标公式源码(一)趋势线大底大顶通达信指标公式
{趋势线大底大顶通达信指标公式,源码}
A1:=EMA(C,7);
A4:EMA(EMA(EMA(EMA(C,13),13),13),13);
HIGHV:=HHV(A4,160);
LOWV:=LLV(A4,160);
A2:=(A4-LOWV)/(HIGHV-LOWV)*100;
A3:=(A4-LOWV)/(HIGHV-LOWV)*100;
A5:=EMA(A3,2);
A6:=(A2-A3)/A3*100;
A7:=SMA(A6,2,1);
A8:=A6-A7;
{趋势线大底大顶}通达信指标公式:A8,COLORRED,LINETHICK3;
(二)趋势线大底大顶通达信指标公式解析
1、趋势线大底大顶通达信指标公式是一种以趋势底部和顶部的价格趋势计算当前价格趋势的技术指标,以有效区分趋势走势的高低。

2、该指标常用于衡量趋势的强弱,能够为投资者提供有效的信息,以便做长期投资。

3、该指标由两部分组成:趋势线和大底大顶线。

趋势线是一条考虑
过去13根K线的指数平滑移动平均线(EMA),而趋势大底大顶线是一条
衡量当前价格与上一周期趋势的百分比指标,用以衡量一段时间内趋势的
变化。

4、当趋势线出现双底、双顶或拐点时,表明趋势的转变,如果当前
价格与上一周期趋势比值非常高,即市场走势较强,可以考虑买入;反之,如果当前价格与上一周期趋势比值较低,即市场走势较弱,可以考虑卖出。

(三)趋势线大底大顶通达信指标公式的使用方法。

通达信指标公式源码超级精准布林线

通达信指标公式源码超级精准布林线

公式源码:S:=2;P:=0;VARA:=(((CLOSE - EMA(CLOSE,13)) / EMA(CLOSE,13)) * (0 - 100));趋势线:=EMA(((VARA/10)+EMA(CLOSE,10)),3);VARB:=(OPEN+HIGH+LOW)/3;VARC:=EMA(VARB,4);行情线:=VARC;BUY11:=IF(CROSS(行情线,趋势线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线>趋势线),1,0);DRAWTEXT(CROSS(行情线,趋势线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线>趋势线),LOW*0.98,'▲'),COLOR0000FF;趋势线),LOW*0.97,'∣'),COLOR0000FF;DRAWTEXT(CROSS(行情线,趋势线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线>趋势线),LOW*0.975,'‖'),COLOR0000FF;DRAWTEXT(CROSS(行情线,趋势线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线>趋势线),LOW*0.96,'∣'),COLOR0000FF;DRAWTEXT(CROSS(行情线,趋势线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线>趋势线),LOW*0.97,'‖'),COLOR0000FF;DRAWTEXT(CROSS(行情线,趋势线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线>趋势线),LOW*0.95,'∣'),COLOR0000FF;DRAWTEXT(CROSS(行情线,趋势线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线>趋势线),LOW*0.965,'‖'),COLOR0000FF;DRAWTEXT(CROSS(趋势线,行情线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线<趋势线),HIGH*1.02,'▼'),COLOR00FF00;DRAWTEXT(CROSS(趋势线,行情线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线<趋势线),HIGH*1.030,'∣'),COLOR00FF00;DRAWTEXT(CROSS(趋势线,行情线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线<趋势线),HIGH*1.025,'‖'),COLOR00FF00;DRAWTEXT(CROSS(趋势线,行情线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线<趋势线),HIGH*1.040,'∣'),COLOR00FF00;DRAWTEXT(CROSS(趋势线,行情线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线<趋势线),HIGH*1.03,'‖'),COLOR00FF00;趋势线),HIGH*1.050,'∣'),COLOR00FF00;DRAWTEXT(CROSS(趋势线,行情线) OR (REF(行情线,1)=REF(趋势线,1) AND 行情线<趋势线),HIGH*1.035,'‖'),COLOR00FF00;FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);FA:=IF(CROSS(FF,MA15),1,0);TR1:=MAX(MAX((HIGH - LOW),ABS(REF(CLOSE,1) - HIGH)),ABS(REF(CLOSE,1) - LOW));ATR:=MA(TR1,14);AA:=(HHV(HIGH,20) - (2 * ATR));BB:=CROSS(CLOSE,REF(HHV(HIGH,55),1));SSS:=CROSS(MIN(MA(CLOSE,13),AA),CLOSE);BBB:=BARSLAST(BB);SSSB:=BARSLAST(SSS);B1:=((BBB = 0) AND (REF(SSSB,1) < REF(BBB,1)));B1B:=BARSLAST(B1);B2:=((((BB = 1) AND (B1B < SSSB)) AND (B1B > 0)) AND (COUNT(BB,SSSB) < 3));B2B:=BARSLAST(B2);B3:=((((BB = 1) AND (B2B < B1B)) AND (COUNT(BB,SSSB) < 4)) AND(COUNT(BB,SSSB) > 2));DRAWTEXT((B1=1 AND 行情线>=趋势线AND BUY11=0) OR (B2=1 AND 行情线>=趋势线AND BUY11=0),LOW*0.98,'▲'),COLORFF00FF;A:=(3*CLOSE+LOW+OPEN+HIGH)/6;X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8* REF(A,12)+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+REF(A,20))/210;Y:=EMA(X,13);加仓A:=SMA(EMA((C-REF(C,1))/REF(C,1),5)*100,3,1)*10;DRAWTEXT(FILTER((CROSS(加仓A,0) OR CROSS(CLOSE,Y)) AND 行情线>=趋势线AND BUY11=0 AND FA=0,3),LOW*0.98,'▲'),COLORFF00FF;加仓:=(B1=1 AND 行情线>=趋势线AND BUY11=0) OR (B2=1 AND 行情线>=趋势线AND BUY11=0) OR FILTER((CROSS(加仓A,0) OR CROSS(CLOSE,Y)) AND 行情线>=趋势线AND BUY11=0 AND FA=0,3);STICKLINE(加仓,C,O,6,1),COLORFF00FF;STICKLINE(加仓,OPEN,CLOSE,4.5,1),COLORFF0099;STICKLINE(加仓,OPEN,CLOSE,3,0),COLORFF00CC;STICKLINE(加仓,OPEN,CLOSE,2,0),COLORFF00FF;VARJ1:=REF(CLOSE,1);VARJ2:=((SMA(MAX(CLOSE-VARJ1,0),6,1))/(SMA(ABS(CLOSE-VARJ1),6,1)))*(100);减仓A:=CROSS(85,VARJ2);DRAWTEXT(减仓A AND 行情线>=趋势线,HIGH*1.02,'▼'),COLORYELLOW;MTM:=C-REF(C,1);DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);DY:=HHV(DX,2)=HHV(DX,7) AND COUNT(DX>50,2) AND CROSS(MA(DX,2),DX); LC:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;减仓B:=FILTER(CROSS(84,RSI) OR DY,5);DRAWTEXT(减仓B AND 行情线>=趋势线,H*1.02,'▼'),COLORYELLOW;减仓:=减仓A OR 减仓B;DRAWTEXT(FA AND BUY11=0,(LOW * 0.98),'□□'),COLOR0099FF;底背离:=FA AND BUY11=0;{TY:=C;HD:=FILTER(BACKSET(FILTER(REF(TY,10)=HHV(TY,2*10+1),10),10+1),10);LD:=FILTER(BACKSET(FILTER(REF(TY,10)=LLV(TY,2*10+1),10),10+1),10);A2:=REF(C,BARSLAST(HD));B2A:=REF(C,BARSLAST(LD));T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD) ;T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);顶:IF(T1,A2,A2),COLOR00FF00,POINTDOT,LINETHICK2;STICKLINE(T1,A2,A2,9,0),COLOR00FF00;底:IF(T2,B2A,B2A),COLORFF00FF,POINTDOT,LINETHICK2;STICKLINE(T2,B2A,B2A,9,0),COLORFF00FF;}VAR2:=(C+L+O+H)/4;多头线:=(20*VAR2+19*REF(VAR2,1)+18*REF(VAR2,2)+17*REF(VAR2,3)+16*REF(VAR2,4) +15*REF(VAR2,5)+14*REF(VAR2,6)+13*REF(VAR2,7)+12*REF(VAR2,8)+11*REF(VAR 2,9)+10*REF(VAR2,10)+9*REF(VAR2,11)+8*REF(VAR2,12)+7*REF(VAR2,13)+6*REF( VAR2,14)+5*REF(VAR2,15)+4*REF(VAR2,16)+3*REF(VAR2,17)+2*REF(VAR2,18)+RE F(VAR2,19))/210;空头线:=EMA(多头线,4);STICKLINE(多头线>空头线,多头线,空头线,4,1),COLORYELLOW;STICKLINE(多头线<空头线,多头线,空头线,4,1),COLORCCCCCC;压制:DRAWLINE(C=HHV(C,60),HHV(H,3),C=HHV(C,30) ANDC<HHV(C,45),HHV(HIGH,1),P),COLORYELLOW;依托:DRAWLINE(L=LLV(L,60),LLV(L,3),L=LLV(L,30) ANDL>LLV(L,45),LLV(L,3),P),COLORGREEN;E:=(REF(H,S-1)+REF(L,S-1)+REF(C,S-1))/3;CRTP:=2*E+(REF(H,S-1)-2*REF(L,S-1));CRZL:=2*E-REF(L,S-1);CRZC:=2*E-REF(H,S-1);CRFZ:=2*E-(2*REF(H,S-1)-REF(L,S-1));高:=CONST(CRTP),COLORRED;阻:=CONST(CRZL),COLORC7C9FF;平:=CONST(E),COLORBLUE;支:=CONST(CRZC),COLOR7C9CFF;反:=CONST(CRFZ),COLORDD00DD;AH:DRAWLINE(S>1&&CURRBARSCOUNT=S+1,高,ISLASTBAR,高,1),COLORRED; STICKLINE(ISLASTBAR AND C>(高+阻)*0.5,高,高,22,0),COLORRED;NH:DRAWLINE(S>1&&CURRBARSCOUNT=S,阻,ISLASTBAR,阻,1),COLORC7C9FF; STICKLINE(ISLASTBAR AND C>(支+平)*0.5,阻,阻,18,0),COLORC7C9FF;CDP:DRAWLINE(S>1&&CURRBARSCOUNT=S+3,平,ISLASTBAR,平,1),COLORBLUE; STICKLINE(ISLASTBAR,平,平,27,0),COLORBLUE;NL:DRAWLINE(S>1 &&CURRBARSCOUNT=S,支,ISLASTBAR,支,1),COLOR7C9CFF; STICKLINE(ISLASTBAR AND C<(阻+平)*0.5 ,支,支,18,0),COLOR7C9CFF;AL:DRAWLINE(S>1&&CURRBARSCOUNT=S+1,反,ISLASTBAR,反,1),COLORDD00DD; STICKLINE(ISLASTBAR AND C<(反+支)*0.5,反,反,22,0),COLORDD00DD;TBP:2*REF(C,S)-REF(C,(S+2)),COLORYELLOW,NODRAW;TXR:=MAX(MAX((REF(H,S-1)-REF(L,S-1)),ABS(REF(C,S-1)-REF(H,S))),ABS(REF(C,S-1) - REF(L,S))),NODRAW;TPS:=CONST(E-TXR),NODRAW;TMB:=CONST(E+TXR),NODRAW;PS:DRAWLINE(S>1&&CURRBARSCOUNT=S+2,TPS,ISLASTBAR,TPS,S),COLORLICY AN;STICKLINE(ISLASTBAR AND C<平,TPS,TPS,25,0),COLORLICYAN;MB:DRAWLINE(S>1&&CURRBARSCOUNT=S+2,TMB,ISLASTBAR,TMB,S),COLORLIG RAY;STICKLINE(ISLASTBAR AND C>平,TMB,TMB,25,0),COLORLIGRAY;RMB:=CONST(BBI),NODRAW;RR:DRAWLINE(S>1&&CURRBARSCOUNT=2+2,RMB,ISLASTBAR,RMB,1),COLORLIR ED,CIRCLEDOT;强D:=HHV(((HIGH + REF(C,1)+REF(LOW,1))/3),17),COLORRED,{NODRAW};强K:=HHV(((HIGH+C+REF(LOW,1))/3),17),COLORYELLOW,POINTDOT{MAX(强DNODRAW};QD50:=((强D+强K)*0.5+MAX(强D,强K))*0.5;DRAWBAND(强D,RGB(0,153,0),QD50,RGB(255,0,0));弱D:=LLV(((REF(HIGH,1)+REF(C,1)+LOW)/3),17*(P+1)),COLORGREEN;弱K:=LLV(((HIGH+C+REF(LOW,1))/3),17*(P+1)),COLORYELLOW,POINTDOT;RD50:=((弱D+弱K)*0.5+MIN(弱D,弱K))*0.5;XO:=(强D+弱D)*0.5,COLORMAGENTA;DRAWBAND(弱D,RGB(255,255,53),RD50,RGB(0,102,255));。

抄底逃顶 趋势顶底通达信指标公式源码

抄底逃顶 趋势顶底通达信指标公式源码

80,COLOR996699;20,COLORGREEN;10,COLORCC6633,LINETHICK2;90,COLOR9966FF,LINETHICK2;{50,COLORRED;FILLRGN(1,20,80),COLOR222222;FILLRGN(1,90,100),COLOR000068;FILLRGN(1,79,90),COLOR663366;FILLRGN(1,10,20),COLOR666600;FILLRGN(1, 0,10),COLOR663300;}A:=MA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),19),COLORRED; B:=-100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14));D:=EMA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),4),LINETHICK2;长期线:A+100,COLOR9900FF;短期线:B+100,COLOR888888;中期线:D+100,COLORYELLOW,LINETHICK2;{见顶:(长期线>85 OR REF(长期线,1)>85 ) AND (CROSS(中期线,短期线) OR CROSS(REF(中期线,1),REF(短期线,1)) )AND CROSS(长期线,短期线);}见顶:(REF(中期线,1)>85 AND REF(短期线,1)>85 AND REF(长期线,1)>65) AND CROSS(长期线,短期线) ;顶部区域:(中期线<REF(中期线,1) AND REF(中期线,1)>80) AND (REF(短期线,1)>95 OR REF(短期线,2)>95 ) AND 长期线>60 AND 短期线<83.5AND 短期线<中期线AND 短期线<长期线+4;顶部:=FILTER(顶部区域,4);{DRAWICON( 见顶, 108, 2 );}底部区域:(长期线<12 AND 中期线<8 AND (短期线<7.2 OR REF(短期线,1)<5) AND (中期线>REF(中期线,1) OR 短期线>REF(短期线,1)))OR (长期线<8 AND 中期线<7 AND 短期线<15 AND 短期线>REF(短期线,1)) OR (长期线<10 AND 中期线<7 AND 短期线<1) ;STICKLINE( {见顶OR} 顶部,99,103,20,1 ),COLORRED,LINETHICK2;STICKLINE( 底部区域,-4,0,22,0 ),COLORGREEN;低位金叉:长期线<15 AND REF(长期线,1)<15 AND 中期线<18 AND 短期线>REF(短期线,1) AND CROSS(短期线,长期线) AND 短期线>中期线AND (REF(短期线,1)<5 OR REF(短期线,2)<5 ) AND (中期线>=长期线OR REF( 短期线,1)<1 );STICKLINE( 低位金叉,0,5,11,0 ),COLORRED;。

通达信指标公式源码 自动趋势线

通达信指标公式源码 自动趋势线

M1:=5;M2:=10;HIGHN:=10;LOWN:=10;HIGHDISPLAY:=0;LOWDISPLAY:=0;ZGDISPLAY:=0;MADISPLAY: =0;AA:=REF(H,HIGHN)=HHV(H,2*HIGHN+1);QY:=BACKSET(AA,HIGHN+1);CC:=FILTER(QY,HIGHN) AND H=HHV(H,HIGHN+1);DRAWICON(CC,H*1.02,2);DDD:=BARSLAST(CC);GDTS:=IF(CC,CURRBARSCOUNT,0);DINGBU:=IF(DDD,REF(H,DDD),H);DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);DINGBU1:=REF(DINGBU,DDD+1);GDCS1:=CONST(DINGBUTS);DINGBUTS1:=REF(DINGBUTS,DDD+1);GDCS2:=CONST(DINGBUTS1);DINGBU2:=REF(DINGBU1,DDD+1);MM:=IF(CURRBARSCOUNT>GDCS2,0,1);高点压力:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1),COLORGRE EN,LINETHICK1;局部低点预选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);AAAD:=IF(高保留=1 AND 低保留=-1 AND H>REF(H,REF(距前高天,1)+2),1,IF(高保留=1 AND 低保留=-1 AND L<REF(L,REF(距前低天,1)+2),-1,0));极点保留:=IF(AAAD=0,高保留+低保留,AAAD);局部极点:=IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)) CIRCLEDOT COLORYELLOW; 局部极点A:DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0)COLORLIRED;局部极点B:DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0)COLORYELLOW; DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLOR0055FF; DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLORYELLOW; AA1:=REF(L,LOWN)=LLV(L,2*LOWN+1);QY1:=BACKSET(AA1,LOWN+1);CC1:=FILTER(QY1,LOWN) AND L=LLV(L,LOWN+1);DRAWICON(CC1,L*0.98,1);DD1:=BARSLAST(CC1);DDTS:=IF(CC1,CURRBARSCOUNT,0);YDB:=IF(DD1,REF(L,DD1),L);DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);DDCS1:=CONST(DDTS1);ZDB:=REF(YDB,DD1+1);DDTS2:=REF(DDTS1,DD1+1);DDCS2:=CONST(DDTS2);低点支撑:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1) COLORRED,LINETHICK2;MA1:=MA(CLOSE,M1);MA2:=MA(CLOSE,M2);。

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