N:=17;P1:=5;P2:=50;
VADSRA:=(HIGH+LOW+CLOSE)/3;
VADSRB:=SUM(MAX(0,HIGH-REF(VADSRA,1)),26)/SUM(MAX(0,REF(VADSRA,1)-LOW),26)*100;
VADSRC:=REF(MA(VADSRB,3),2.2);
VADSRF:=CROSS(VADSRC,VADSRB) AND VADSRB>150;
DRAWTEXT(VADSRF,HIGH+0.2,'逃顶');
DRAWTEXT(CROSS((REF(HIGH,1)+REF(LOW,1))/2,MA(CLOSE,20)+2*STD(CLOSE,20)),HIGH+0.3,'调整');
{ 爱约股_通达信股票指标公式}
A:=(3*C+L+O+H)/6;
五日线:MA(CLOSE,P1),COLORWHITE;
FLY2:=HHV(HIGH,N);
XL1:=(2*C+H+L)/4;
XL2:=LLV(LOW,34);
XL3:=HHV(HIGH,34);
XL4:=EMA((XL1-XL2)/(XL3-XL2)*XL3,7);
XL5:=EMA(0.667*REF(XL4,2)+0.333*XL4,1);
XL6:=CROSS(XL4,MA(XL4,10));
L1:=(INDEXC-HHV(INDEXC,8))/HHV(INDEXC,8)<-0.05 AND MA(INDEXA,125)/MA(INDEXV,125)/(MA(INDEXA,5)/MA(INDEXV,5))>1.12;
L2:=BARSLAST(L1)<13;
L3:=(CLOSE-MA(CLOSE,58))/MA(CLOSE,58)<-0.07;
X1:=EMA(SLOPE(CLOSE,21)*20+CLOSE,55);
X2:=EMA(CLOSE,3);
X3:=(2*CLOSE+LOW+HIGH)/4;
X4:=X1-X2;
下线: EMA(X3,89)*0.74,LINETHICK2,COLOR4DA1FF;
中线: EMA(X3,89)*0.84,LINETHICK2,COLOREE8400;
专用线:EMA(X3,134)*0.98,LINETHICK2,COLORRED;
压力线: HHV(HIGH,P2)*0.99, ,COLORGREEN,LINETHICK2;
半:=XL6 AND 五日线<=中线 AND C>=下线;
全:=XL6 AND C<=下线;
DRAWTEXT(XL6 AND C>中线 AND L2,LOW-0.5,'⊙少量买 '),COLORYELLOW;
DRAWTEXT(XL6 AND C>中线 AND L3,LOW-0.2,'⊙少量买 '),COLORYELLOW;
DRAWTEXT(半,LOW+LOW*0.02,'⊙半仓买'),COLOR00FF00;
DRAWTEXT(全 AND L2,LOW+0.12,'⊙全仓买 '),COLORFFFF66;
DRAWTEXT(五日线>REF(五日线,2)AND((C/REF(C,3)>1.1)AND(VOL/REF(VOL,1)>1.7)),HIGH+0.6,'⊙卖 '),COLOREE66EE;
VAR6:=REF(CLOSE,1);
VAR7:=SMA(MAX(CLOSE-VAR6,0),6,1)/SMA(ABS(CLOSE-VAR6),6,1)*100;
DRAWTEXT(CROSS(84,VAR7),HIGH+0.1,'⊙逃顶'),COLOREE8400;
VAR51:=EMA(AMOUNT/VOL/100,3);
VAR52:=EMA(VAR51,88);
VAR53:=EMA(VAR51,88)*0.85;
VAR54:=VAR53*0.87;
VAR55:=LOW<VAR54 AND CLOSE>REF(CLOSE,1)*1.02;
DRAWTEXT(CROSS(75,SMA(MAX(CLOSE-REF(CLOSE,1),0),8,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),8,1)*100),HIGH+0.5,'卖出'),COLORGREEN;
DRAWTEXT(CROSS(-5,MA((LLV(LOW,45)-CLOSE)/(HHV(HIGH,45)-LLV(LOW,45))*100,5)),LOW-0.4,'买进'),COLORWHITE;