源码如下:
M:=EMA(REF(SETTLE,1),1);
A:=M-REF(M,1);
B:=REFX(A,1);
AB:=IFELSE(SETTLE>=M,1,-1);
DRAWSL(REFX(AB,1)=1,M,B,1,0,COLORMAGENTA);
DRAWSL(REFX(AB,1)=-1,M,B,1,0,COLORGREEN);
:C,NODRAW;
DRAWLINE(SETTLEO,H,SETTLEO,C,COLORRED);
DRAWLINE(SETTLEO,L,SETTLEO,O,COLORRED);
DRAWLINE(SETTLECC>O,H,SETTLE>CC>O,C,COLORLIGHTGREEN);
DRAWLINE(SETTLE>CC>O,L,SETTLE>CC>O,O,COLORLIGHTGREEN);
DRAWLINE(SETTLE>CCCCCCCCCC=O,L,SETTLE>CC=O,C,COLORLIGHTGREEN);
DRAWLINE(SETTLE>CC=O,H,SETTLE>CC=O,C,COLORLIGHTGREEN);
STICKLINE(SETTLE=O,C,O,COLORRED,1);
STICKLINE(SETTLECC>=O,C,O,COLORLIGHTGREEN,1);
STICKLINE(SETTLE>=CC<=O,C,O,COLORLIGHTGREEN,0)