总涨幅周期:=350;
DRAWTEXT_FIX(ISLASTBAR,0.1058,0,1,DYBLOCK),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0.1158,0,0,HYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.1958,0,0,GNBLOCK),COLORYELLOW;
{======================================================}
高点位:=REFDATE(HHV(H,总涨幅周期),DATE);
低点位:=REFDATE(LLV(L,总涨幅周期),DATE);
低位价:=REF(L,BArslAST(低点位=L)),COLORGREEN,NODRAW;
高位价:=REF(H,BARSLAST(高点位=H)),COLORRED,NODRAW;
曾最大涨幅:=(高位价-低位价)/低位价*100;
当前涨幅:=(C-低位价)/低位价*100;
ZFA:=CON2STR(CONST(曾最大涨幅),2);
ZFB:=CON2STR(CONST(当前涨幅),2);
ZFC:=STRCAT('【曾最大涨幅】',ZFA);
ZFD:=STRCAT(ZFC,'﹪');
ZFE:=STRCAT(ZFD,'【当前总涨幅】');
ZFF:=STRCAT(ZFE,ZFB);
ZFG:=STRCAT(ZFF,'﹪');
DRAWTEXT_FIX(ISLASTBAR,0,1,0,'▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇'),COLORRED;
DRAWTEXT_FIX(ISLASTBAR,0,1,0,ZFG),COLORYELLOW;
MA1:=MA(CLOSE,49),LINETHICK1,COLORGRAY;
KS:=(((CLOSE - EMA(CLOSE,13)) / EMA(CLOSE,13)) * (0 - 100));
趋势线1:=EMA(((KS / 10) + EMA(CLOSE,10)),3);
AA:= - 100 * (趋势线1 - CLOSE) / 趋势线1;
ac:=(EMA(AA,5) );
STICKLINE((((CLOSE >= OPEN) ) AND (AA < 0)),OPEN,CLOSE,3,1),COLORD38784;
STICKLINE((((OPEN > CLOSE)) AND (AA < 0)),CLOSE,OPEN,3,0),COLORD38784;
STICKLINE((((CLOSE >= OPEN) ) AND (AA < 0)),CLOSE,HIGH,0,1),COLORD38784;
STICKLINE((((CLOSE >= OPEN) ) AND (AA < 0)),OPEN,LOW,0,1),COLORD38784;
STICKLINE((((OPEN > CLOSE) ) AND (AA < 0)),CLOSE,LOW,0,0),COLORD38784;
STICKLINE((((OPEN > CLOSE) ) AND (AA < 0)),OPEN,HIGH,0,0),COLORD38784;
AG:=SUM((vol / FINANCE(7)),1);
STICKLINE(((((((CLOSE >= OPEN) AND (PERIOD < 7)) ) AND (AG >= 8)) AND (AG < 15)) AND (AA >= 0)),OPEN,(OPEN * 1.008),5,0),COLORRED;
STICKLINE(((((((OPEN > CLOSE) AND (PERIOD < 7)) ) AND (AG >= 8)) AND (AG < 15)) AND (AA >= 0)),(OPEN * 1.008),OPEN,5,0),COLORRED;
STICKLINE(((((((CLOSE >= OPEN) AND (PERIOD < 7)) ) AND (AG >= 8)) AND (AG < 15)) AND (AA < 0)),OPEN,(OPEN * 0.998),5,0),COLORRED;
STICKLINE(((((((OPEN > CLOSE) AND (PERIOD < 7)) ) AND (AG >= 8)) AND (AG < 15)) AND (AA < 0)),(OPEN * 0.998),OPEN,5,0),COLORRED;
STICKLINE((((((CLOSE >= OPEN) AND (PERIOD < 7)) ) AND (AG >= 15)) AND (AA >= 0)),OPEN,(OPEN * 1.008),5,0),COLORFFFFFF;
STICKLINE((((((OPEN > CLOSE) AND (PERIOD < 7)) ) AND (AG >= 15)) AND (AA >= 0)),(OPEN * 1.008),OPEN,5,0),COLORFFFFFF;
STICKLINE((((((CLOSE >= OPEN) AND (PERIOD < 7)) ) AND (AG >= 15)) AND (AA < 0)),OPEN,(OPEN * 0.998),5,0),COLORFFFFFF;
STICKLINE((((((OPEN > CLOSE) AND (PERIOD < 7)) ) AND (AG >= 15)) AND (AA < 0)),(OPEN * 0.998),OPEN,5,0),COLORFFFFFF;
ssl:=EMA(CLOSE,5);
MMV:=EMA(((SLOPE(CLOSE,22) * 20) + CLOSE),55);
MM:=(IF(((PERIOD > 5) AND (PERIOD < 9)),MA(MMV,1),IF((PERIOD = 5),MA(MMV,4),IF((PERIOD = 4),MA(MMV,8),IF((PERIOD = 3),MA(MMV,16),IF((PERIOD = 2),MA(MMV,32),0))))) );
SA:=(MM * 0.985);
SS:=(MA(CLOSE,5));
DD:=(MA(CLOSE,13));
GG:=(MA(CLOSE,21));
常用指标:=IF(((SSL > MM)),SSL,SA),LINETHICK1,COLORRED;
NHSH__:=IF(((SSL > MM) ),MM,SA),LINETHICK1,COLORFFFFFF;
QLZHM:=IF(((SSL > MM)),MM,SA),LINETHICK2,COLORFF00FF;
VAR2Y:=(((CLOSE - REF(CLOSE,1)) / REF(CLOSE,1)) * 100);
VAR3Y:=(((CLOSE - REF(OPEN,29)) / REF(OPEN,29)) * 100);
VAR4Y:=REF(CLOSE,1);
VAR5Y:=((SMA(MAX((CLOSE - VAR4Y),0),6,1) / SMA(Abs((CLOSE - VAR4Y)),6,1)) * 100);
VAR6Y:=((SMA(MAX((CLOSE - VAR4Y),0),12,1) / SMA(ABS((CLOSE - VAR4Y)),12,1)) * 100);
VAR7Y:=((SMA(MAX((CLOSE - VAR4Y),0),24,1) / SMA(ABS((CLOSE - VAR4Y)),24,1)) * 100);
VAR8Y:=(((CLOSE - LLV(LOW,45)) / (HHV(HIGH,45) - LLV(LOW,45))) * 100);
VAR9Y:=SMA(VAR8Y,3,1);
VARAY:=SMA(VAR9Y,3,1);
VARBY:=((3 * VAR9Y) - (2 * VARAY));
VARCY:=(crOSS(VAR5Y,10) AND (VAR3Y < (0 - (28 * 20))));
VARDY:=((100 - CROSS(76,VAR5Y)) AND (VAR3Y > (5 * 20)));
VAREY:=((((CROSS(VAR9Y,VARAY) AND (VARAY < 10)) AND (VAR3Y < (0 - 30))) AND (VAR2Y > 3)) * 30);
VARFY:= - ((((VARAY < 11) AND (VAR5Y < 15)) AND (VAR3Y < (0 - 26))) * 10);
能量线:=DMA(((CLOSE + OPEN) / 2),(VOL / (SMA(VOL,4,1) * 4)));
VAR3C:=EMA(能量线,1);
VAR4C:=REF(能量线,1);
X:=EMA(((SLOPE(CLOSE,21) * 20) + CLOSE),68);
Y:=EMA(CLOSE,10);
LL:=REF(CLOSE,2);
MM2:=((SMA(MAX((CLOSE - LL),0),6,1) / SMA(ABS((CLOSE - LL)),6,1)) * 100);
DB:=IF(((MM2< REF(MM2,1)) AND (MM2 > 79)),MM2,0);
VAR1:=LLV(LOW,21);
VAR2:=HHV(HIGH,21);
AK1:=EMA((((CLOSE - VAR1) / (VAR2 - VAR1)) * 100),5);
AK:=EMA((((CLOSE - VAR1) / (VAR2 - VAR1)) * 50),13);
DD2:=EMA(((0.667 * REF(AK1,1)) + (0.333 * AK1)),2);
VAR3:=LLV(LOW,55);
VAR4:=HHV(HIGH,34);
VAR5:=EMA((((CLOSE - VAR3) / (VAR4 - VAR3)) * 100),3);
VAR6:=((AK + VAR5) / 2);
VAR7:=EMA(((0.667 * REF(VAR5,1)) + (0.333 * AK1)),2);
VAR8:=EMA(VAR6,5);
BB:=EMA(((0.667 * REF(VAR8,1)) + (0.333 * VAR8)),2);
AB:=CROSS(AK1,AK);
BB1:=(CROSS(AK1,BB) AND (BB < 30));
CD:=(BB1 * 0.6);
C1:=(CLOSE+LOW+HIGH)/3;
C2:=EMA(C1,6);
C3:=EMA(C2,5);
C4:=CROSS(C2,C3);
RSV:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
RSV24:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
K24:=SMA(RSV24,3,1);
D24:=SMA(K24,3,1);
J24:=3*K24-2*D24;
涨停:=IF((C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(O,1)),1,0);
STICKLINE(涨停,O,C,2,0),COLORRED;
ZDF:=(C-REF(C,1))/REF(C,1)*100;
STICKLINE(ZDF<-9.9,O,C,1,0),COLORGREEN;
涨停2:=IF((C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(O,1)),1,0);
STICKLINE(涨停2,O,C,1,0),COLORYELLOW;
中轨:HHV(MA(H,13),13),COLORGREEN,LINETHICK2;
趋势: LLV(MA(H,13),1),COLORRED,LINETHICK2;
AA01:=EMA(C,18),LINETHICK0;
AA05:=EMA(C,5),LINETHICK0,COLOR0099CC;
五日乖离率:=(C-AA05)/AA05*100;
BB05:=ATAN((AA05/REF(AA05,1)-1)*100)*180/3.1416;
速度5:=SMA(EMA((AA05-REF(AA05,1))/REF(AA05,1),3)*100,3,1);
加速度5:=EMA((速度5-REF(速度5,1)),3),NODRAW;
AA10:=EMA(C,10),LINETHICK0;
AA20:=EMA(C,20),LINETHICK0;
BB10:=ATAN((AA10/REF(AA10,1)-1)*100)*180/3.1416;
AA30:=EMA(C,30),LINETHICK0;
三拾日乖离率:=(C-AA30)/AA30*100,NODRAW;
VAR111:=(AA20-AA30)>REF((AA20-AA30),1) AND AA20>REF(AA20,1) AND AA30>REF(AA30,1);
VAR12:=(AA30-AA20)
BB30:=ATAN((AA30/REF(AA30,1)-1)*100)*180/3.1416;
起爆点:=FILTER(BB30>30 AND BB10>45 AND CROSS(BB05,60),10);
加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 AND AA05>REF(AA05,1) AND 三拾日乖离率>REF(三拾日乖离率,1) AND AA10>REF(AA10,1) AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1) ,10) ;
清仓:=FILTER(COUNT(CROSS(30,BB05),5)>=1 AND (C>AA30 OR O>AA30) AND AA05
JC:=CROSS(0,五日乖离率) AND 三拾日乖离率REF(AA10,1) ;
减仓:=FILTER(JC,10);
MR:=COUNT(CROSS(五日乖离率,0),3)>=1 AND 三拾日乖离率>REF(三拾日乖离率,1) AND AA05>REF(AA05,1) AND (C/REF(C,1)-1)*100>5 AND REF(C,1)
抄底:=FILTER(MR,10);
DRAWTEXT(抄底,LOW*0.99,'B'),COLORWHITE;
DRAWTEXT(加仓,LOW*0.97,'B '),COLORYELLOW;
{DRAWTEXT(减仓,HIGH*1.02,'S '),COLORCYAN;
DRAWTEXT(清仓,HIGH*1.01,'S '),COLORGREEN;}
DRAWTEXT(起爆点,LOW*0.95,'★ '),COLORYELLOW;
AAAA:=CONST(HHV(H,90));
R1:=MA(CLOSE,1);
R2:=MA(CLOSE,3);
R3:=(MA(R2,1)*1);
R4:=(MA(R2,3)*1);
X11:=(C+L+H)/3;
DDDD:=TOTALCAPITAL;
SSS:=FINANCE(7);
GGG:=FINANCE(33);
TH:=DYNAINFO(39);
A51:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1);
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.02),'S'),COLORGREEN;