input:N(4,1,20),STEP(2,1,10),MAXP(8,5,30);
SAR(N,STEP,MAXP),CIRCLEDOT;
dk:=SAR(N,STEP,MAXP);
STICKLINE(c>=dk and c<o,c,o,7.5,1),color5454ff;
STICKLINE(c>=dk and c<o,c,o,6.5,0),colorffff54;
STICKLINE(c>=dk and c<o,c,l,1,0),color5454ff;
STICKLINE(c>=dk and c<o,h,o,1,0),color5454ff;
STICKLINE(c>=dk and c>o,c,h,1,0),color5454ff;
STICKLINE(c>=dk and c>o,l,o,1,0),color5454ff;
STICKLINE(c>=dk and c=o,l,h,1,0),color5454ff;
STICKLINE(c<dk and c>o,c,o,7.5,1),colorffff54;
STICKLINE(c<dk and c>o,c,h,1,0),colorffff54;
STICKLINE(c<dk and c>o,l,o,1,0),colorffff54;
STICKLINE(c<dk and c<o,c,l,1,0),colorffff54;
STICKLINE(c<dk and c<o,h,o,1,0),colorffff54;
ema(c,10);
VAR1:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);
VAR2:=CROSS(VAR1,0.9);
VAR3:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);
VAR4:=CROSS(VAR3,0.9);
STICKLINE(CLOSE,REF(HIGH,BARSLAST(Var2)),REF(HIGH,BARSLAST(Var2)),5,0),ColorEA91B5;
STICKLINE(CLOSE,REF(LOW,BARSLAST(Var4)),REF(LOW,BARSLAST(Var4)),5,0),Color00b4ff;