自动画线压力支撑
该公式包含未来函数: ZIG
该公式包含未来函数: BACKSET
生命线:EMA(((SLOPE(CLOSE,21) * 20) + CLOSE),45),COLORYELLOW,LINETHICK2;
IF(C>=生命线,生命线,DRAWNULL),COLORYELLOW,LINETHICK2;
IF(C<生命线,生命线,DRAWNULL),COLORBLUE,LINETHICK2;
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.005,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) COLORFF00FF,LINETHICK1;
DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLOR0055FF,POINTDOT;
DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLORYELLOW,POINTDOT;
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.995,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) COLORFF00FF,LINETHICK1;
ZGSTAR:=(高压+低支)/2;
ZGEND:=CONST((高压+低支)/2);
STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);
中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLORFF00FF,LINETHICK1;
DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,REF(L,DDCS1-1),1),COLORMAGENTA,POINTDOT,;
DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,REF(L,DDCS2-1),1),COLORCYAN,POINTDOT;
N:=14;{出现买字在线上买,生命线走平或开始向上翘}
K:=N/2;{出现卖字下线卖,生命线走平或向下拐头}
MAK:MA(CLOSE,K),COLORRED,LINETHICK1;
MAN:MA(CLOSE,N),COLORFF0000,LINETHICK1;
DTPL:=MA(C,N)>MA(C,N*1.5) AND MA(C,N*1.5)>MA(C,N*3) AND MA(C,3)>MA(C,N*6);
选择均线:=N,POINTDOT,COLORYELLOW;
强弱天数:=K,POINTDOT,COLORFF00FF;
连续走强:=COUNT(C>MA(C,N),K)=K;
ZQSJ:=BARSLAST(连续走强);
{STICKLINE(连续走强 ,0 ,K*0.3 ,5 ,1 ),COLORYELLOW;}
下穿:=CROSS(MA(C,N),C);
GL:=MA(C,N/2)/MA(C,N*2)>=1.05;
买跌:=(下穿 AND ZQSJ<=3 AND DTPL AND GL)*N,COLOR00FF00,LINETHICK2;
连续走弱:=COUNT(C<MA(C,N),K)=K;
ZRSJ:=BARSLAST(连续走弱);
{STICKLINE(连续走弱 ,0 ,K*-0.3 ,5 ,1 ),COLOR00FF00;}
上穿:=CROSS(C,MA(C,N));
买涨:=(上穿 AND ZRSJ<=3)*K,COLORFF00FF,LINETHICK2;
{以下设置显示方式:}
DRAWTEXT(买涨>0 ,L*0.991 , '买'),COLORYELLOW,LINETHICK1;
STICKLINE(买涨>0,H,L,0,1),COLORF00FF0,LINETHICK2;
STICKLINE(买涨>0,O,C,2,0),COLORF00FF0,LINETHICK2;
DRAWTEXT(买跌>0 ,L*0.991 , '跌'),COLOR00FF00,LINETHICK1;
STICKLINE(买跌>0 ,H,L,0,1),COLOR00FF00,LINETHICK2;
STICKLINE(买跌>0 ,O,C,2,0),COLOR00FF00,LINETHICK2;
V1:=MA(HIGH,30)*1.10;
V2:=MA(HIGH,3)*1.02;
V3:=MA(LOW,3)*0.98;
V4:=MA(LOW,30)*0.90;
PL5:=ZIG(3,5);
EN1:=ZIG(3,5)>REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)<=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)<=REF(ZIG(3,5),3);
EX1:=ZIG(3,5)=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)>=REF(ZIG(3,5),3);
PL10:=ZIG(3,10);
EN2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)<=REF(ZIG(3,10),3);
EX2:=ZIG(3,10)=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)>=REF(ZIG(3,10),3);
PL20:=ZIG(3,20);
EN3:=ZIG(3,20)>REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)<=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)<=REF(ZIG(3,20),3);
EX3:=ZIG(3,20)=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)>=REF(ZIG(3,20),3);
PL40:=ZIG(3,40);
走强1:=BARSLAST(PL5<REF(PL5,1));
走弱1:=BARSLAST(PL5>REF(PL5,1));
走强2:=BARSLAST(PL10<REF(PL10,1));
走弱2:=BARSLAST(PL10>REF(PL10,1));
走强3:=BARSLAST(PL20<REF(PL20,1));
走弱3:=BARSLAST(PL20>REF(PL20,1));
ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);
ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);
DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱2),0);
DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱2),0);
ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);
ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);
DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0);
DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0);
DRAWTEXT(EN1 AND DTJZ5=1,L*0.98,'A'),COLORFFFF00;
DRAWTEXT(EX1 AND DTJD5=2,H*1.02,'B'),COLORFFFF00;
DRAWTEXT(EN2 AND ZTJZ5=1,L*0.96,'C买'),COLORFFFF00;
DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJD5=1,H*1.01,'⑴'),COLOR0000FF;
DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2,L*0.99,'⑵'),COLOR0000FF;
DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJZ5=2,H*1.01,'⑶'),COLOR0000FF;
DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=3,L*0.99,'⑷'),COLOR0000FF;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.01,'⑸'),COLOR0000FF;
DRAWTEXT(EN2 AND DTJZ10=1,L*0.95,'1短'),COLORFF6000;
DRAWTEXT(EX2 AND DTJD10=2,H*1.04,'2'),COLORFF6000;
DRAWTEXT(EN3 AND ZTJZ10=1,L*0.94,'3买'),COLORFF6000;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.03,'一卖'),LINETHICK3,COLOR00FFFF;
DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,L*0.98,'二补'),LINETHICK3,COLOR00FFFF;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,H*1.03,'三清'),LINETHICK3,COLOR00FFFF;
DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,L*0.95,'四持'),LINETHICK3,COLOR00FFFF;
|