通达信高低划线主图指标
{主图1}
箱顶:EMA(REF(HHV(C,30),1),2),COLORBB5500,LINETHICK1;
箱底:EMA(REF(LLV(C,30),1),2),COLOR9955BB,LINETHICK1;
中轨:(箱顶+箱底)/2,NODRAW,COLORFFFF00,LINETHICK2;
EMA13:=EMA(C,13),COLORWHITE;
EMA21:=EMA(C,21),COLORYELLOW;
EMA34:=EMA(C,34),COLORFF00FF;
EMA60:=MA(C,60),COLORFFCC66;
VAR2:=(2*CLOSE+HIGH+LOW)/4;
VAR3:=IF(YEAR>=2099 AND MONTH>2,0,1);
VAR4:=LLV(LOW,5);
VAR5:=HHV(HIGH,4);
KS1:=IF(EMA13>EMA21,EMA13,EMA21);
DRAWBAND(EMA((2*C+H+L)/4,5),RGB(150,100,0),KS1,RGB(0,100,100));
散户:=EMA((VAR2-VAR4)/(VAR5-VAR4)*100,4)*VAR3;
庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR3;
DRAWTEXT(CROSS(散户,庄家) AND 散户<30,0.99*L,'←低吸'),COLOR00FFFF;
DRAWTEXT(CROSS(庄家,散户) AND 散户>70,1.01*H,'←高抛'),COLORGREEN;
DRAWICON(CROSS(散户,庄家) AND 散户<30,0.99*L,1);
DRAWICON(CROSS(庄家,散户) AND 散户>70,1.01*H,2);
VAR9:=CLOSE-REF(CLOSE,5);
VARA:=EMA(EMA(VAR9,5),5)/EMA(EMA(ABS(VAR9),5),5);
VARC:=EMA(EMA(VAR9,20),20)/EMA(EMA(ABS(VAR9),20),20);
卖出:=IF(VARA>0 AND CROSS(VARC,VARA),90,100);
DRAWICON(卖出<0,H+0.05,2);
买线:=EMA(CLOSE,2);
卖线:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);
死叉:=IF(CROSS(买线,卖线),L-0.02,DRAWNULL),CROSSDOT,LINETHICK2,COLOR00FFFF;
金叉:=IF(CROSS(80,RSI)*30,H+0.02,DRAWNULL),CROSSDOT,LINETHICK2,COLORFF3300;
VC:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100+(CLOSE-MA (CLOSE,32))/MA(CLOSE,32)*100)/3;
S2:=IF(VC>20 AND FILTER(VC< REF(VC,1),5),H+0.02,DRAWNULL),CIRCLEDOT,LINETHICK3,COLORGREEN;
EMA5:EMA(C,5),COLOR00FF00,LINETHICK2;
IF(EMA5>REF(EMA5,1),EMA5,DRAWNULL),COLORFF00FF,LINETHICK2;
{神奇线}
均价:=(2*C+H+L+O)/5;
修正:=EMA(均价,5)*2-MA(均价,5);
修正价:=SMA(SMA(EMA(均价,5)*2-MA(均价,5),3,1),3,1);
补偿:=FLOOR(((修正价-MA(修正价,5))/MA(修正价,5)*100));
再修正:=EMA(修正,5)*2-MA(修正,5);
神奇线:SMA(SMA((EMA(修正,(5+ABS(补偿)))),2,1),2,1),LINETHICK1,COLOR006633;
神奇上线:HHV(神奇线,2),COLOR006633;
神奇中线:=(神奇线+神奇上线)/2,COLOR006633;
转换:IF(神奇线<神奇上线,(2*神奇线-神奇上线),神奇上线),COLOR006633;
IF(转换>=REF(转换,1),转换,DRAWNULL),COLOR0000FF,LINETHICK2;
{多彩K线}
{蓝}
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2.5,0),COLORFF8800;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,1.0,0),COLORFFAA00;
STICKLINE(OPEN>=CLOSE,L,H,0,0),COLORFFCC00;
{红}
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.5,0),COLOR000099;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.0,0),COLOR0000FF;
STICKLINE(CLOSE>OPEN,L,H,0,0),COLOR0000FF;
A0:=(L+H+C*2)/4;
多空线:=EMA(A0,13),COLOR33FF00,LINETHICK1;
A2:=EMA(A0,23),COLORLIBLUE,LINETHICK2;
A1X:=(多空线-REF(多空线,1))/REF(多空线,1)*100,NODRAW;
A2X:=(A2-REF(A2,1))/REF(A2,1)*100,NODRAW;
多线:=IF(A1X>=0 AND BARSLAST(CROSS(A1X,0))>0,REF((C+O)/2,BARSLAST(CROSS(A1X,0))),DRAWNULL),COLORBB00BB;
空线:=IF(A1X<0 AND BARSLAST(CROSS(0,A1X))>0,REF((C+O)/2,BARSLAST(CROSS(0,A1X))),DRAWNULL),COLORBBBB00;
买入持股:IF(A1X>=0,多空线,DRAWNULL),COLORFF00FF,LINETHICK1;
STICKLINE(CROSS(A1X,0),C,O,2.5,0),COLOR00FFFF;
STICKLINE(CROSS(A1X,0),C,O,0.3,0),COLOR0000FF;
STICKLINE(CROSS(0,A1X),C,O,2.5,0),COLORFF3300;
STICKLINE(CROSS(0,A1X),C,O,0.3,0),COLOR00FF00;
{压力支撑}
周期:=5;
参数:=H;
{压力线}
高点:=REF(参数,周期)=HHV(参数,2*周期+1);
高点过滤:=FILTER(高点,周期);
高点周期变换:=BACKSET(高点过滤,周期+1);
前高:=FILTER(高点周期变换,周期);{高点}
高点统计:=BACKSET(ISLASTBAR,BARSLAST(前高)+1);
后高:=高点统计>REF(高点统计,1);
压力线5:DRAWLINE(前高,参数,后高,参数,1),LINETHICK1,COLOR00FF00,LINETHICK1;
{支撑线}
参数1:=L;
低点:=REF(参数1,周期)=LLV(参数1,2*周期+1);
低点过滤:=FILTER(低点,周期);
低点周期变换:=BACKSET(低点过滤,周期+1);
前低:=FILTER(低点周期变换,周期);{低点统计}
低点统计:=BACKSET(ISLASTBAR,BARSLAST(前低)+1);
后低:=低点统计>REF(低点统计,1);
支撑线5:DRAWLINE(前低,参数1,后低,参数1,1),COLORFF3399,LINETHICK1;
高低线:=DRAWLINE(前高,参数1,后低,参数1,1),POINTDOT,COLORFFFF00,LINETHICK1;
底:=STICKLINE(CROSS(支撑线5,0.9995*高低线),L,0.96*L,1,0),COLORFFFFFF;
{量能平台}
N:=10;
TT11:=CONST(HHVBARS(V,N+17));
TT00:IF(CURRBARSCOUNT<=N+17,CONST(IF(TT11=0,H,REF(H,TT11))),DRAWNULL),COLORFF3399,POINTDOT,LINETHICK4;
IF(CURRBARSCOUNT=TT11+1,TT00,DRAWNULL),CIRCLEDOT;
T1:=CONST(HHVBARS(V,N));
T0:IF(CURRBARSCOUNT<=N+7,CONST(IF(T1=0,H,REF(H,T1))),DRAWNULL),COLOR33FF33;
IF(CURRBARSCOUNT=T1+1,T0,DRAWNULL),CIRCLEDOT,COLOR00FFFF;
{未来顶底}
VBB1:=TROUGHBARS(3,15,1)<10;
VBB2:=PEAKBARS(3,15,1)<5;
VBB3:=IF(VBB1=1,50,0);
VBB4:=IF(VBB2=1,50,0);
底部:=IF(VBB3=50,10,0);
头部:=IF(VBB4=50,20,80);
未来底:STICKLINE(IF(底部=10 AND REF(底部,1)=10 AND REF(底部,2)=0,30,0),L*0.985,L*0.99,15,0),LINETHICK2,COLORFFFFFF;
未来底买:DRAWTEXT(IF(底部=10 AND REF(底部,1)=10 AND REF(底部,2)=0,1,0),L*0.985,'底'),COLORFFFFFF;
未来顶:STICKLINE(IF(头部=20 AND REF(头部,1)=20 AND REF(头部,2)=80,30,0),H*1.01,H*1.012,15,0),LINETHICK2,COLORFFFFFF;
未来顶卖:DRAWTEXT(IF(头部=20 AND REF(头部,1)=20 AND REF(头部,2)=80,1,0),H*1.02,'顶'),COLOR00FF00;
{精准底}
JZD10:=C-REF(C,1);
JZD11:=100*EMA(EMA(JZD10,6),6)/EMA(EMA(ABS(JZD10),6),6);
JZD12:=EMA(CLOSE,7);
JZD13:=EMA(CLOSE,19);
JZD14:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(JZD13,JZD12))+1),LLV(L,BARSLAST(CROSS(JZD13,JZD12))+1),H=HHV(H,BARSLAST(CROSS(JZD12,JZD13))+1),HHV(H,BARSLAST(CROSS(JZD12,JZD13))+1),0);
JZD15:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(JZD12,JZD13))+1),HHV(H,BARSLAST(CROSS(JZD12,JZD13))+1),L=LLV(L,BARSLAST(CROSS(JZD13,JZD12))+1),LLV(L,BARSLAST(CROSS(JZD13,JZD12))+1),0);
精准底:DRAWICON((LLV(JZD11,2)=LLV(JZD11,7) AND COUNT(JZD11<0,2) AND CROSS(JZD11,MA(JZD11,2))) AND REF(JZD15,1)<REF(JZD15,2) AND JZD14>REF(JZD15,1),0.97*L,5);
精准底选股:=DRAWICON(精准底,L,1);
{转折指示}
上转折:=ZIG(3,10);
下转折:=MA(上转折,2);
买转折:DRAWICON(CROSS(上转折,下转折),0.98*L,7);
卖转折:DRAWICON(CROSS(下转折,上转折),1.02*H,8);
{弄点钱玩}
JJ:=(H+L+C)/3;
QJ0:=VOL/IF(H=L,4,H-L);
J:="KDJ.J";
QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(C,O)),QJ0*(MIN(O,C)-L));
QJ2:=IF(CAPITAL=0,QJ0*(MIN(O,C)-L),QJ0*(JJ-MIN(C,O)));
QJ3:=QJ0*(H-MAX(O,C));
QJ4:=QJ0*(MAX(C,O)-JJ);
QJ5:=QJ1+QJ2;QJ6:=QJ3+QJ4;
DDD:=(QJ5-QJ6)/(QJ5+QJ6)*100;
DDX:=((QJ1+QJ2)-(QJ3+QJ4))/SUM(VOL,10)*100;
DDZ:=DDD*17;
DDY:=((QJ2+QJ4)-(QJ1+QJ3))/SUM(VOL,10)*100;
弄点钱玩:=CROSS(J,0) AND ((DDX>0 AND DDY>0) OR DDZ>400);
弄点钱玩选股:DRAWICON(弄点钱玩,L*0.98,17);