AAA:=CONST(LLV(L,120));
DRAWTEXT(CURRBARSCOUNT=120/2,AAA-(AAA*0.03),'时间窗3.5,3.19, 5.4, 5.18,7.3,7.17,7.31.'),COLOR889999;
上涨值:=MA((H+REF(L,1))/2,3);
买进高点:=MA((H+REF(H,1))/2,3);
VAHR1:=((H+L+C)/3)*2.5-L;
突破买入值:=MA(VAHR1,3);{LSS轴点突破买入值}
下跌值:=MA((REF(H,1)+L)/2,3);
卖出低点:=MA((REF(L,1)+L)/2,3);
VAHR2:=((H+L+C)/3)*2-H;
突破卖出值:=MA(VAHR2,3);
次日卖出点:(上涨值+买进高点+突破买入值+H)/4,LINETHICK0,NODRAW;
次日买入点:(下跌值+卖出低点+突破卖出值+L)/4,LINETHICK0,NODRAW;
ZB1:=EMA(C,65);
长期线:EMA(ZB1,45),COLORYELLOW,LINETHICK3;
IF(长期线<REF(长期线,1),长期线,DRAWNULL),LINETHICK3,COLORGREEN;
DRAWBAND(ZB1,RGB(128,0,128),长期线,RGB(0,255,0));
主力底仓:COST(7),COLORWHITE,LINETHICK2;
建仓:COST(21),COLORYELLOW,LINETHICK2;
平衡:COST(36),COLORMAGENTA,LINETHICK2;
中位:COST(67),COLORGREEN,LINETHICK2;
拉高:COST(84),COLORGRAY,LINETHICK2;
高位:COST(98),,COLOR7D90BB,LINETHICK2;
STICKLINE(C>=O,C,O,2,0),COLORRED;
STICKLINE(C>=O,H,L,0,0),COLORRED;
STICKLINE(C<=O,C,O,2,0),COLORGREEN;
STICKLINE(C<=O,H,L,0,0),COLORGREEN;
DT1:=C>REF(C,5);
DT2:=C>REF(C,10);
STICKLINE(DT2,H,L,0,0),COLORRED;
STICKLINE(DT2=0,H,L,0,0),COLORBLUE;
STICKLINE(DT1,H,MAX(O,C),0,0),COLORRED;
STICKLINE(DT1=0,L,MIN(O,C),0,0),COLORBLUE;
STICKLINE(DT2,O,C,2.5,0),COLORRED;
STICKLINE(DT2=0,O,C,2.5,0),COLORBLUE;
STICKLINE(DT1,(O+C)/2,O,2.5,0),COLORRED;
STICKLINE(DT1=0,(O+C)/2,C,2.5,0),COLORBLUE;
主力成本:COST(45),POINTDOT,LINETHICK4,COLOR00CacA;
KA:=(C+H+L)/3;
DA:=MA(KA,4);
DRAWTEXT(REF(C,1)<DA AND C>DA AND DA<REF(DA,1),L*0.98 ,'B'),COLORRED;
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) AND CLOSE<=REF(CLOSE,2);
VARA:=REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VARB:=REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARC:=REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VARD:=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);
VAR19:=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;
STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),4,1),COLORYELLOW;
VAR1A:=REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR
VAR8 OR VAR9 OR VARA OR VARB OR VARC,1) AND VARD;
STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),4,2),COLOR00FF00{98FD};
STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR00C8FF;
STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR10ECFF;
STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),2,0),,COLOR00C4C4;{黄托底};
五:=MA(CLOSE,5),COLORWHITE;
十:=MA(CLOSE,10),COLOR00FFFF;
SC1:=macd.MACD<0;
SC2:=crOSS(十,五);
SC3:=MA(V,5)<MA(V,10);
SC:=SC1 AND SC2 AND SC3 ;
DRAWTEXT(SC AND CURRBARSCOUNT<10 ,HHV(H,5),'三死叉'),COLORWHITE;
{ZS:=CROSS(dmi.ADXR,DMI.ADX);
DRAWTEXT(ZS AND CURRBARSCOUNT<10 ,HHV(H,5),'转势'),COLORRED;}
离基:=五;
离O:=离基*1.20,COLOR555555;
离A:=离基*1.15,COLOR555555;
离B:=离基*1.10,COLOR555555;
离C:=离基*0.90,COLOR555555;
离D:=离基*0.85,COLOR333333;
DRAWTEXT(CROSS(H,离B) AND CURRBARSCOUNT<10 ,HHV(H,3),'超乖离'),COLORYELLOW;
DRAWTEXT(CROSS(H,离A) AND CURRBARSCOUNT<10 ,HHV(H,3),'超乖离'),COLORYELLOW;
DRAWTEXT(CROSS(离C,L) AND CURRBARSCOUNT<10 ,LLV(L,3),'负乖离'),COLORWHITE;
DRAWTEXT((C<MA(C,5) OR MA(C,5)<MA(C,10)) AND CURRBARSCOUNT<2,HHV(H,5)*1.04,'MA5下'),COLORRED;
DRAWTEXT((C<MA(C,5) OR MA(C,5)<MA(C,10)) AND CURRBARSCOUNT<2 ,HHV(H,5)*1.01,'不持股'),COLORRED;
VAR21:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100;
VAR22:=SMA(VAR21,3,1);
VAR23:=SMA(VAR22,3,1);
VAR24:=SMA(VAR23,3,1);
VAR25:=CROSS(VAR23,VAR24) AND VAR23<20;
DRAWTEXT(FILTER(VAR25,10)=1,LOW-0.4,'←抄底'),COLORRED;
上线:=SMA(C,6.5,1);
一号支撑线:SMA(C,14.5,1);
上线1:=SMA(C,3,1);
一号支撑线1:=SMA(C,8,1);
上线2:=SMA(C,3.5,1);
A7:=(2*C+H+L)/4;
操作:=MA(A7,5),COLORBLUE,LINETHICK2;
DRAWTEXT( CROSS(上线1,上线) AND 上线1>操作,LOW *0.92,'买进' ),COLORYELLOW;
VARE1:=LLV(A7,21);
VARE2:=HHV(A7,30);
DRAWTEXT( CROSS(上线1,操作) AND 上线1<一号支撑线 AND 上线1<一号支撑线1 AND 上线1<上线 AND CLOSE>VAR1,LOW *0.98,'见底' ),COLORYELLOW;
YCX:=操作>=REF(操作,1);
H1:=MAX(MAX(上线,一号支撑线1),一号支撑线);
L1:=MIN(MIN(上线,一号支撑线1),一号支撑线);
DRAWTEXT(CROSS(上线1,一号支撑线1) AND 上线1>操作 ,LOW *0.98,'全仓' ),COLORYELLOW;
SK:=EMA((A7-VARE1)/(VARE2-VARE1)*100,7);
SD:=EMA(0.667*REF(SK,1)+0.333*SK,5);
M1:=1000*操作/一号支撑线<=1015 AND 1000*操作/一号支撑线>=975;
M2:=1000*一号支撑线1/一号支撑线<=1020 AND 一号支撑线1/一号支撑线>=980;
M3:=1000*上线/一号支撑线<=1015 AND 上线/一号支撑线>=985;
D:=MA(CLOSE,89)-MA(CLOSE,10)/3;
DRAWTEXT(IF(CLOSE<D AND vol/240>MA(VOL,5)/240 AND CLOSE>REF(CLOSE,1)*1.08
AND CLOSE<MA(CLOSE,13)*1.3,1,0),LOW*0.88,'抄底'),COLORBROWN;
RSV:=(CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*100;
K:=SMA(RSV,3,1);
D1:=SMA(K,3,1);
J:=3*K-2*D1;
VARR3:=(2*CLOSE+HIGH+LOW)/3;{可将3该为4,信号少点}
VARR4:=EMA(EMA(EMA(VARR3,4),4),4);{可将3该为4,信号少点}
E:=(VARR4-REF(VARR4,1))/REF(VARR4,1)*100;
F:=MA(E,3)+0.03;
G:=MA(E,1);
DRAWICON(CROSS(F,G) AND J>65,HIGH*1.02,15),COLORGREEN;
DRAWICON(CROSS(G,F),LOW *0.9,9),COLORYELLOW;
DRAWTEXT(CLOSE>OPEN AND H1<C AND O<L1 AND YCX AND CROSS(上线1,操作) AND LOW>VAR1 AND 上线1>一号支撑线 AND J<90,LOW *0.9,'主升' ),COLORRED;
{ _通达信股票指标公式}
DRAWTEXT( CROSS(上线1,操作) AND M1 AND M2 AND M3,LOW *0.94,'买进' ),COLORYELLOW;
DRAWTEXT(CLOSE>OPEN AND 上线>一号支撑线1 AND 一号支撑线1>一号支撑线 AND CLOSE>MA(CLOSE,一号支撑线) AND 操作>=REF(CLOSE,操作) AND CROSS(上线1,操作)
AND LOW>VAR1 AND J<90,LOW *0.9,'主升' ),COLORRED;
DRAWTEXT(CLOSE>OPEN AND 操作>上线 AND 上线>一号支撑线1 AND 一号支撑线1>一号支撑线 AND CROSS(上线1,操作) AND LOW>VAR1 AND J<90,LOW *0.86,'回踩买'
),COLORRED;
DRAWTEXT(CLOSE>OPEN AND CROSS(上线,一号支撑线) AND LOW>VAR1 AND J<90,LOW *0.86,'回踩买' ),COLORRED;