通达信2指标——趋势线主图(主图)

合集下载

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

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

通达信精典趋势线主图指标源码及预警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);请老师分别做个必涨。

通达信2指标——合成操盘主图(主图)

通达信2指标——合成操盘主图(主图)
黄点出低吸:=IF(初晴,L*0.983,DRAWNULL),POINTDOT,COLOR00FFFF,LINETHICK5;
N1:=BARSCOUNT(5) ;
N:=((N1 - CURRBARSCOUNT ) + 1);
HH:=HHV(HIGH,N);
LL:=LLV(LOW,N);
最高:=HHV(N1,1),POINTDOT;
DRAWTEXT(A,L,'');
AB:=CROSS(满仓,L) AND A;
DRAWICON(AB,L,1);
VAR1A:=DMA(EMA(CLOSE,12),SUM(VOL,5)/3/CAPITAL);
VAR2A:=REF(HIGH,10)/CLOSE>1.35;
VAR3A:=(COST(20)-CLOSE)/CLOSE>0.15;
AA10:=MA(CLOSE,10);
Y:=((LLV(LOW,1) = LLV(LOW,60)) AND ((CLOSE / REF(CLOSE,1)) > 1.04));
WX:=MA(CLOSE,0);
MB5:=(MA(CLOSE,15) * IF((20 < 5),WX,1));
MB7:=(MA(CLOSE,20) * IF((20 < 7),WX,1));
SS:=(MA(CLOSE,8) * 0.998),COLORFFFFFF;
买:=(DDD >= AMA AND BMA >= BMB);
HH1:=FILTER(((DDD >= AMA) AND (BMA >= BMB)),33);
VARR1:=((SMA(MAX((CLOSE - REF(CLOSE,1)),0),12,1) / SMA(ABS((CLOSE - REF(CLOSE,1))),12,1)) * 100);

通达信2指标——30顶(主图)

通达信2指标——30顶(主图)

N:=8;MA1:MA(C,3);MA2:MA(C,10),COLORFF8000;MA3:MA(C,30);MA4:MA(C,60),COLORFFBBCC;TY:=C;A1:=REF(TY,N)=HHV(TY,2*N+1);B1:=FILTER(A1,N);C1:=BACKSET(B1,N+1);HD:=FILTER(C1,N);A2:=REF(TY,N)=LLV(TY,2*N+1);B2:=FILTER(A2,N);C2:=BACKSET(B2,N+1);LD:=FILTER(C2,N);A:=REF(C,BARSLAST(HD));B:=REF(L,BARSLAST(LD));T1:=BARSLAST(HD)T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);顶:IF(T1,A,A),COLORYELLOW,POINTDOT,LINETHICK1;底:IF(T2,B,B),COLORGREEN,POINTDOT;上升:IF(MA3>REF(MA3,1),MA3,DRAWNULL),COLORRED,LINETHICK2; 下降:IF(MA3平:IF(MA(C,30)=REF(MA(C,30),1),MA(C,30),DRAWNULL),COLOR00FFFF,LINETHICK2; BB:=(LMA(C,30)) AND (VO;DRAWICON(BB,L*0.98,1);STICKLINE(BB,O,C,1.5,0),COLORYELLOW;换手:=VOL*100/CAPITAL;STICKLINE(换手>15 AND C>O AND COUNT((CROSS(MA(VOL,3),MA(VOL,34))),3), OPEN,CLOSE,1.5,0),COLORFF6600;{放量蓝色K线信号}YCX:=MA3>=REF(MA3,1);H1:=MAX(MAX(MA1,MA2),MA3);L1:=MIN(MIN(MA1,MA2),MA3);{一阳穿3线}一阳穿线:= H1REF(MA2,1); {穿C线洋红色K线}STICKLINE(一阳穿线,O,C,1.5,1),COLORLIGREEN;{洋红色K线}ZX:=(MA1+MA3)/2;QSXS:=MA1>=MA3 AND MA3>REF(MA3,1);GD:=ZX>=REF(ZX,1) AND REF(ZX,1)YB:=C>REF((O-C)/2+C,2);买:=CROSS(C,ZX) AND (GD OR YB) AND QSXS;DRAWTEXT(买AND BB,L*0.99, '买'),COLORLIBLUE;DRAWTEXT(买AND 一阳穿线,L*0.99, '阳'),COLOR5290FF;ZH1:=MAX(MAX(MA1,MA2),MA2);ZH2:=MIN(MIN(MA1,MA2),MA2);ZH3:=(FILTER((ZH1-ZH2)/ZH2<0.0005 AND C>O AND MA1>REF(MA1,1)AND (LZH1),1));DRAWTEXT(买AND ZH3,L*0.99, '合'),COLORYELLOW;。

通达信2指标——BS买卖主图(主图)

通达信2指标——BS买卖主图(主图)

{BS买卖主图}短趋:EMA((2*CLOSE+HIGH+LOW)/4,5),COLOR00FF00;洗盘:EMA((2*CLOSE+HIGH+LOW)/4,12),COLOR00FF00;中线:EMA((LOW+CLOSE+OPEN)/3,26),COLOR008000,LINETHICK2;牛熊:EMA(LOW,125),POINTDOT,COLOR00FF00,LINETHICK3;V AR10:=MA(CLOSE,80)-MA(CLOSE,10)/3;DRAWTEXT(IF(CLOS< V AR10 AND VOL/240> EMA(VOL,5)/240 AND CLOSE>= REF(CLOSE,1)*1.08 AND CLOSE< MA(CLOSE,13)*1.3,1,0),LOW,'☆'),COLORRED;{布林极限}UPR:=BBI+3*STD(BBI,10);DWN:=BBI-3*STD(BBI,10);XX:=CROSS(MA(C,3),DWN);V AR2SS:=(REF(HIGH,1)+REF(LOW,1))/2;V AR3SS:=MA(CLOSE,20)+2*STD(CLOSE,20);DRAWTEXT(CROSS(V AR2SS,V AR3SS),HIGH*1.02,'卖') ,COLOR008000;LC:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;DRAWTEXT(CROSS(84,RSI) , HIGH,'小心'),COLORWHITE;趋势线:=3*SMA((CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100,5,1)-2*SMA(SMA( (CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);底部:=LLV(CLOSE,30);MA3:=MA(底部,2);X:=MA(CLOSE,26);压力:=HHV(HIGH,30),COLORF8EE00;X1:=(C+L+H)/3;X2:=EMA(X1,6);X3:=EMA(X2,5);GR1:=BARSLAST(BETWEEN("BIAS.BIAS2"(6,13,24),0,5));GR2:=EMA(X1,13)> EMA(X1,21) AND EMA(X1,21)> EMA(X1,34)AND EMA(X1,13)> REF(EMA(X1,13),1);GR3:=COUNT("BIAS.BIAS2"(6,13,24)> 10 AND H= HHV(H,GR1),GR1);GR4:=H=HHV(H,GR1);GR5:="MACD.MACD"(12,26,9)GR6:=GR2 AND GR3 AND GR4;GR7:=GR2 AND GR3 AND GR4 AND GR5;GR8:=GR6 AND GR7;涨家数:INDEXADV,NODRAW,,COLORRED ;跌家数:INDEXDEC,NODRAW,COLORGREEN;RSI6:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;BIAS5:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;换手:=100*V/CAPITAL;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,'加仓'),COLOR00FF00;短趋S:IF(短趋> REF(短趋,1),短趋,DRAWNULL),COLOR0000FF,LINETHICK1;洗盘S:IF(洗盘> REF(洗盘,1),洗盘,DRAWNULL),COLOR0000FF,LINETHICK1;中线S:IF(中线> REF(中线,1),中线,DRAWNULL),COLORMAGENTA,LINETHICK2;牛熊S:IF(牛熊> REF(牛熊,1),牛熊,DRAWNULL),COLOR0000FF,POINTDOT,LINETHICK3; 买线:=EMA(C,2);卖线:=EMA((C+H+L+O)/4,7) ;BU:=CROSS(买线,卖线);SEL:=CROSS(卖线,买线);DRAWICON(BU,L-0.1,7);DRAWICON(SEL,H+0.1,8);====================================================================== =====。

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

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

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

通达信2指标——1号主图(主图)

通达信2指标——1号主图(主图)

{布林}布林:=HHV(HHV(L,14),60);阻力区:=EMA(EMA(布林,16)-2*STD(布林,16),3);阻力区1:=EMA(EMA(布林,14)+2*STD(布林,14),18);DRAWBAND(阻力区,RGB(99,99,99),阻力区1,RGB(99,99,99));{四线开花}【4】:MA(CLOSE,250),COLORBLUE,LINETHICK3;【3】:MA(CLOSE,120),COLORCY AN,LINETHICK3;【2】:MA(CLOSE,60),COLORGREEN,LINETHICK3;【1】:MA(CLOSE,20),COLORLIRED,LINETHICK3;{神秘线}V0:=VOL*(O+C+H+L)/4;SM:EMA(V0,21)/EMA(VOL,21),COLOR987654,LINETHICK0;{量能平台突破}PT:IF(HHVBARS(V,35),REF(C,HHVBARS(V,35)),C),COLOR7F017F,LINETHICK0;{N日涨幅}N1:=BARSLAST(CROSS(C,MA(C,6)));N2:=BARSLAST(CROSS(MA(C,6),C));N:IF(N1<N2,N1+1,0),COLORBLUE,NODRAW;ZF%:(C-REF(C,N))/REF(C,N)*100,COLORRED,NODRAW;{三色K线}STICKLINE(C>=SM AND C>=O,OPEN,CLOSE,3,1),COLORRED;STICKLINE(C>=SM AND C>=O,LOW,MIN(O,C),0,1),COLORRED;STICKLINE(C>=SM AND C>=O,MAX(O,C),HIGH,0,1),COLORRED;STICKLINE(C>=SM AND C<O,C,O,3,0),COLORCY AN;STICKLINE(C>=SM AND C<O,C,O,1,0),COLORCY AN;STICKLINE(C>=SM AND C<O,L,HIGH,0,1),COLORCY AN;STICKLINE(C<SM AND C>=O,OPEN,CLOSE,3,1),COLORWHITE;STICKLINE(C<SM AND C>=O,LOW,MIN(O,C),0,1),COLORWHITE;STICKLINE(C<SM AND C>=O,MAX(O,C),HIGH,0,1),COLORWHITE;STICKLINE(C<SM AND C<O,C,O,3,0),COLORWHITE;STICKLINE(C<SM AND C<O,C,O,1,0),COLORWHITE;STICKLINE(C<SM AND C<O,L,HIGH,0,1),COLORWHITE;{立桩量}V2:=IF(CURRBARSCOUNT=1,VOL*240/FROMOPEN/REF(VOL,1)-1,VOL/REF(VOL,1)-1); STICKLINE(V2>=1 AND OPEN<CLOSE,OPEN,CLOSE,5,1),COLORYELLOW; STICKLINE(V2>=1 AND OPEN>CLOSE,OPEN,CLOSE,5,0),COLORCYAN;{涨跌停K线}涨跌:=REF(C,1);涨停:=IF((C-涨跌)*100/涨跌>=(10-0.01*100/涨跌),1,0);STICKLINE(涨停,OPEN,CLOSE,4,0),COLORRED;STICKLINE(涨停,H,L,0,0),COLORRED;跌停:=IF((涨跌-C)*100/涨跌>=(10-0.01*100/涨跌),1,0);STICKLINE(跌停,OPEN,CLOSE,4,0),COLORBLUE;STICKLINE(跌停,H,L,0,1),COLORBLUE;{立桩量金箍}STICKLINE(V2>=1,O,(C+O)/2,6,0),COLOR003333;STICKLINE(V2>=1,O,(C+O)/2,5,0),COLOR116666;STICKLINE(V2>=1,O,(C+O)/2,4,0),COLOR229999;STICKLINE(V2>=1,O,(C+O)/2,3,0),COLOR33CCCC;STICKLINE(V2>=1,O,(C+O)/2,2,0),COLOR44FFFF;MA10:MA(CLOSE,10),COLORYELLOW,LINETHICK1;MA5:MA(CLOSE,5),COLORWHITE,LINETHICK1;{信号系统}买入1:DRAWICON(CROSS(【1】,【2】),【2】*0.98,5);买入2:DRAWICON(CROSS(【1】,【3】),【3】*0.98,5);买入3:DRAWICON(CROSS(【1】,【4】),【4】*0.98,5);买入4:DRAWICON(CROSS(【2】,【3】),【3】*0.98,9);买入5:DRAWICON(CROSS(【2】,【4】),【4】*0.98,9);买入6:DRAWICON(CROSS(【3】,【4】),【4】*0.98,135);{买入7:DRAWICON(CROSS(MA5,MA10),MA10*0.98,1);买入8:DRAWICON(CROSS(MA5,【1】),【1】*0.976,1);买入9:DRAWICON(CROSS(MA5,【2】),【2】*0.972,1);买入10:DRAWICON(CROSS(MA5,【3】),【3】*0.968,1);买入11:DRAWICON(CROSS(MA5,【4】),【4】*0.964,1);};。

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

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

顶底趋势主图画线指标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;。

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

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

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

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

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

源码:{连结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;。

通达信指标——MACD主图(主图)

通达信指标——MACD主图(主图)

高1:=REF(HHV(H,150),3);低1:=REF(LLV(L,150),3);H3:=高1-(高1-低1)*0.5;中轴:REFDATE(H3,DATE),POINTDOT,COLORLIGRAY,LINETHICK3;B1:=EMA(C,12);B2:=EMA(C,26);B3:=B1-B2;WDIF:EMA(EMA(EMA(C,3),3),3)+B3;WDEA:EMA(WDIF,9);MACD:=2*(WDIF-WDEA);STICKLINE(MACD>0,中轴,中轴+MACD,0,1),COLORRED;STICKLINE(MACD<0,中轴,中轴+MACD,0,1),COLORLIBLUE;STICKLINE(MACD0,中轴,中轴+MACD,0,0 ),COLOR00BBFF;STICKLINE(MACD>=REF(MACD,1)AND MACD>0,中轴,中轴+MACD,0,0 ),COLOR0011BB;STICKLINE(MACD>REF(MACD,1)AND MACD<0,中轴,中轴+MACD,0,0),COLORBB11BB; STICKLINE(MACD<=REF(MACD,1)AND MACD<0,中轴,中轴+MACD,0,0),COLORFFBB11;{DRAWTEXT(CROSS(MACDMA,MACD),HIGH*1.015,' 卖'),COLORFFFFCC;};V ARA:=LLV(LOW,36);V ARB:=HHV(HIGH,30);V ARC:=EMA((CLOSE-V ARA)/(V ARB-V ARA)*4,4)*25;趋势:= V ARC, COLOR33FFFF;顶背: STICKLINE(VARC>90,OPEN,CLOSE,3,0) , COLORRED;V AR26:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;V AR27:=MA(V AR26,5);V AR28:=MA(V AR26,10);{DRAWTEXT(CROSS(V AR26,V AR27) AND V AR27STICKLINE(CROSS(V AR26,V AR27) AND V AR27{DRAWTEXT(CROSS(V AR7,V AR6) AND V AR7>V AR8,V AR3*0.95,'夺'),COLORYELLOW;} STICKLINE(CROSS(V AR27,V AR26) AND V AR27>V AR28,OPEN,CLOSE,3,0),COLORFF00FF;V AR5:=EMA(MA(CLOSE,3),34);V AR1:=4*SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1)-3*SMA(SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1),3.2,1);V AR2:=8;CC:=CROSS(V AR1,V AR2);DRAWTEXT(CC,L*0.98,'买!'),COLOR0099FF;STICKLINE(CROSS(V AR1,V AR2) ,OPEN,CLOSE,3,0),COLORBB11BB;AA2:=AMOUNT/V;BB2:=LCC2:=(C-REF(C,1))/REF(C,1)*100>1.2;DD2:=LEE2:=VFF2:=BB2 AND CC2 AND DD2 AND EE2,LINETHICK0;{DRAWTEXT(FF2,L*0.99,' 鼠'),COLORYELLOW;}STICKLINE(FF2,O,C,4,0),COLORRED;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(88,RSI),(HIGH * 1.0002),'↓'),COLOR1880FF;E:=(HIGH+LOW+OPEN+2*CLOSE)/5;AAA:=2*E-LOW,NODRAW;AB:=2*E-HIGH,NODRAW;ACC:=E+(HIGH-LOW),NODRAW;ADD:=E-(HIGH-LOW),NODRAW;今阻力:REF(AAA,1),COLORWHITE,NODRAW;今支撑:REF(AB,1),COLORYELLOW,NODRAW;明阻力:AAA,COLORCY AN,NODRAW;明支撑:AB,COLORMAGENTA,NODRAW;明突破:ACC,COLORGREEN,NODRAW;明反转:ADD,COLORLICYAN,NODRAW;GJ:=(C+H+L+O)/4;明日阻力:=L+(GJ-L)+(C-L);明日支撑:=L+(C-GJ);今日阻力:REF(明日阻力, 1),NODRAW;今日支撑:REF(明日支撑, 1),NODRAW;STICKLINE(ISLASTBAR AND C>=今日阻力,今日阻力,今日阻力,10,1),COLOR0000FF; STICKLINE(ISLASTBAR AND C<今日阻力,今日阻力,今日阻力,10,1),COLOR00FF00; STICKLINE(ISLASTBAR AND C>=今日支撑,今日支撑,今日支撑,10,1),COLORFF00FF; STICKLINE(ISLASTBAR AND C<今日支撑,今日支撑,今日支撑,10,1),COLORFF8800;STICKLINE(V ARC>90 ,HIGH,LOW,0,1 ),COLORRED;STICKLINE(V ARC>90 ,OPEN,CLOSE,3,0 ),COLOR000055;STICKLINE(V ARC>90 ,OPEN,CLOSE,2.1,0 ),COLOR000099;STICKLINE(V ARC>90 ,OPEN,CLOSE,1.5,0 ),COLOR0000BB;STICKLINE(V ARC>90 ,OPEN,CLOSE,0.9,0 ),COLOR0000DD;STICKLINE(V ARC>90 ,OPEN,CLOSE,0.3,0 ),COLOR0000FF;。

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

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

通达信指标公式源码跌涨趋势线主图指标A1:=MA(H,6);A2:=MA(L,6);A3:IF(C>REF(A1,1),A2,IF(C<REF(A2,1),A1,A2)),COLORGRAY,LI NETHICK1;涨家数:INDEXADV,NODRAW, ;跌家数:INDEXDEC,NODRAW,COLORGREEN;C3:=REF(C,1);涨停:=IF((C-C3)*100/C3>=(10-0.01*100/C3),1,0);STICKLINE(涨停,OPEN,CLOSE,1,0),COLORRED;跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);STICKLINE(跌停,OPEN,CLOSE,1,0),COLORGREEN;VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) 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) ANDCLOSE<=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:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);VARE:=REF(VARD,1) AND 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);短线:REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1,COLORYELLOW,NODRAW;STICKLINE(短线,O,(C+O)/2,1.5,0),COLORYELLOW;F:=100*(C-REF(C,1))/REF(C,1);今小昨:=IF(C<REF(O,1) AND F<0,1,0);P1:=今小昨;今小前:=IF(C<REF(O,2) AND F<0,1,0);P2:=今小前;爱琴海:P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1,COLORMAGENTA,NODRAW;STICKLINE(爱琴海,C,(C+O)/2,1.5,0),COLORMAGENTA;{自动分割画线}E1P:DRAWLINE(C=LLV(C,30),LOW,C=LLV(C,10) AND C>LLV(C,22),LLV(LOW,3),1),LINETHICK2,COLORYELLOW;E1PP:DRAWLINE(C=LLV(C,10),LOW,C=LLV(C,5) AND C>LLV(C,10),LLV(LOW,3),1),LINETHICK2,COLORRED;K:=(C+H+L)/3;D:=MA(K,4);B:REF(C,1)<D AND C>D AND D<REF(D,1),NODRAW,COLORRED;DRAWICON(REF(C,1)>D AND C<D AND D>REF(D,1),H*1.002, 2);DRAWICON(REF(C,1)<D AND C>D AND D<REF(D,1),E1PP*0.965 ,23);。

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