MA10:MA(CLOSE,10);
MA21:MA(CLOSE,21);
MA34:=MA(CLOSE,34);
MA55:MA(CLOSE,55);
M16:=MA(CLOSE,16);
CZ1:=MA21/REF(MA21,21)>1.01;
XX1:=(OPEN+HIGH+LOW+CLOSE)/4;
XX2:=ABS(REF(XX1,7)-REF(XX1,1));
XX3:=EMA(IF(REF(XX1,7)>REF(XX1,1),REF(XX1,7)-7*XX2/3,REF(XX1,7)+7*XX2/3),7);
QF:=MA21>REF(MA21,13) AND CLOSE>MA21 AND COUNT(CROSS(XX3,MA21),21)<=4 AND CLOSE>XX3 AND OPEN>MA21*0.98 AND OPEN<MA21*1.02 AND "MACD.MACD">REF("MACD.MACD",1) AND CZ1 AND "MACD.MACD">0;
QF1:=MA21>REF(MA21,13) AND CLOSE>MA21 AND COUNT(CROSS(XX3,MA21),21)<=4 AND CLOSE>XX3 AND OPEN>MA21*0.98 AND OPEN<MA21*1.02 AND "MACD.MACD">REF("MACD.MACD",1) AND "MACD.MACD">0 AND CZ1 AND MA10>MA21 AND MA21>MA34 AND MA10>MA55;
DRAWTEXT(QF,LOW*0.98,'潜\n伏\n点! '),color10FF10;
DRAWTEXT(QF1,LOW*0.975,'潜\n伏\n点! '),colorFFFF;
AA:=REF(HIGH,N)=HHV(HIGH,2*N+1);
BB:=BACKSET(AA,N+1);
CC:=FILTER(BB,N) AND HIGH=HHV(HIGH,N+1);
DRAWICON(CC,HIGH,10);
AA2:=REF(LOW,N)=LLV(LOW,2*N+1);
BB2:=BACKSET(AA2,N+1);
CC2:=FILTER(BB2,N) AND LOW=LLV(LOW,N+1);
DRAWICON(CC2,LOW,11);
DRAWLINE(CC,HIGH,CC2,LOW,0),POINTDOT,colorFFFF;
DRAWLINE(CC2,LOW,CC,HIGH,0),POINTDOT,colorFFFF;
GG:=ISLASTBAR AND REF(CC,BARSLAST(CC));
HH:=BACKSET(GG,BARSLAST(CC)+1);
II:=HH>REF(HH,1);
JJ:=REF(BARSLAST(CC),1);
KK:=BACKSET(II,JJ+2);
LL:=KK>REF(KK,1);
DRAWLINE(LL,HIGH,II,HIGH,1),colorFFFF;
CS:=(REF(HIGH,BARSLAST(II))-REF(HIGH,BARSLAST(LL)))/(BARSLAST(LL)-BARSLAST(II));
阻力线:=REF(HIGH,BARSLAST(II))+BARSLAST(II)*CS;
阻力值:阻力线,LINETHICK0;
DRAWICON(CROSS(CLOSE,阻力线),LOW*0.998,12);
GG2:=ISLASTBAR AND REF(CC2,BARSLAST(CC2));
HH2:=BACKSET(GG2,BARSLAST(CC2)+1);
II2:=HH2>REF(HH2,1);
JJ2:=REF(BARSLAST(CC2),1);
KK2:=BACKSET(II2,JJ2+2);
LL2:=KK2>REF(KK2,1);
DRAWLINE(LL2,LOW,II2,LOW,1),colorFF00;