爱约股解答:
N1:=21;
N2:=7;
X1:=HHV(OPEN,N1);
X2:=LLV(OPEN,N2);
X3:=(X1+X1)/2;
TMP:=X3-C;
DRAWLINE(TMP>0.00001,HIGH,TMP>0.00001,OPEN,1),COLORCYAN;
DRAWLINE(TMP>0.00001,LOW,TMP>0.00001,CLOSE,1),COLORCYAN;
DRAWLINE(TMP<-0.00001,HIGH,TMP<-0.00001,CLOSE,1),COLORRED;
DRAWLINE(TMP<-0.00001,LOW,TMP<-0.00001,OPEN,1)COLORRED;
DRAWLINE(ABS(TMP)<0.00001,HIGH,ABS(TMP)<0.00001,OPEN,1),COLORWHITE;
DRAWLINE(ABS(TMP)<0.00001,LOW,ABS(TMP)<0.00001,OPEN,1),COLORWHITE;
STICKLINE(TMP>0.00001,OPEN,CLOSE,2,0),COLORCYAN;
STICKLINE(TMP<0.00001,OPEN,CLOSE,2,0),COLORRED;