(来源:文华财经)
A:="HOUR$1$VOL",NODRAW;
N:=BARSLAST(A<>REF(A,1))+1,NODRAW;
OO:VALUEWHEN(N=1,O),NODRAW;
DRAWSL(ISLASTBAR&&C>=REF(O,N-1),OO,0,1000,0,COLORRED);
DRAWSL(ISLASTBAR&&C<REF(O,N-1),OO,0,1000,0,COLORGREEN);
DRAWSL((ISLASTBAR||REFX(N=1,1))&&C>=REF(O,N-1),HHV(H,N),0,-N+1,0,COLORRED);
DRAWSL((ISLASTBAR||REFX(N=1,1))&&C>=REF(O,N-1),LLV(L,N),0,-N+1,0,COLORRED);
DRAWSL((ISLASTBAR||REFX(N=1,1))&&C<REF(O,N-1),HHV(H,N),0,-N+1,0,COLORGREEN);
DRAWSL((ISLASTBAR||REFX(N=1,1))&&C<REF(O,N-1),LLV(L,N),0,-N+1,0,COLORGREEN);
DRAWSL(ISLASTBAR&&C>=REF(O,N-1),HHV(H,N),0,10000,0,COLORRED);
DRAWSL(ISLASTBAR&&C>=REF(O,N-1),LLV(L,N),0,10000,0,COLORRED);
DRAWSL(ISLASTBAR&&C<REF(O,N-1),HHV(H,N),0,10000,0,COLORGREEN);
DRAWSL(ISLASTBAR&&C<REF(O,N-1),LLV(L,N),0,10000,0,COLORGREEN);
DRAWSL((REFX1(N=1,1)||ISLASTBAR)&&C>REF(O,N-1),REF(O,N-1),0,-N+1,0,COLORRED);
DRAWSL((REFX1(N=1,1)||ISLASTBAR)&&C<REF(O,N-1),REF(O,N-1),0,-N+1,0,COLORGREEN);
DRAWSL((REFX1(N=1,1)||ISLASTBAR)&&C=REF(O,N-1)&&BARSLAST(REFX1(N=1,1)&&C>REF(O,N-1))<BARSLAST(REFX1(N=1,1)&&C<REF(O,N-1)) ,REF(O,N-1),0,-N+1,0,COLORRED);
DRAWSL((REFX1(N=1,1)||ISLASTBAR)&&C=REF(O,N-1)&&BARSLAST(REFX1(N=1,1)&&C>REF(O,N-1))>BARSLAST(REFX1(N=1,1)&&C<REF(O,N-1)) ,REF(O,N-1),0,-N+1,0,COLORGREEN);