N:=4; X:=BARSLAST(HIGH=HHV(HIGH,N)); LL:=MIN(REF(LOW,X+3),MIN(REF(LOW,X+2),MIN(REF(LOW,X),REF(LOW,X+1)))); Y:=BARSLAST(LOW=LLV(LOW,N)); HH:=MAX(REF(HIGH,Y+3),MAX(REF(HIGH,Y+2),MAX(REF(HIGH,Y),REF(HIGH,Y+1)))); A:=BARSLAST(CLOSE>=HH); B:=BARSLAST(CLOSE<=LL); AB:IFELSE(A>B,HH,LL); TM:=CLOSE>=AB; TP:=CLOSE<AB; DRAWLINE(TP,HIGH,TP,OPEN,COLORCYAN); DRAWLINE(TP,LOW,TP,CLOSE,COLORCYAN); DRAWLINE(TM,HIGH,TM,CLOSE,COLORRED); DRAWLINE(TM,LOW,TM,OPEN,COLORRED); STICKLINE(TP,OPEN,CLOSE,COLORCYAN,0); STICKLINE(TM,OPEN,CLOSE,COLORRED,1); |
|