文华指标公式--美国彩K


美国彩K

VAR1:=((CLOSE - LLV(LOW,15))/(HHV(HIGH,15) - LLV(LOW,15)))*(100);
VAR2:=REVERSE(VAR1);
VAR3:=SMA(VAR1,5,1);
K:=SMA(VAR3,3,1);
D:=SMA(K,3,1);

DRAWTEXT(CROSS(K,D) AND (D < 18),25,'买'),COLORRED;
DRAWTEXT(CROSS(D,K) AND (D > 75),85,'卖'),COLORGREEN;

STICKLINE((K >= D),K,D,6,0),COLORCYAN;
STICKLINE((K >= D),K,D,5,0),COLORLIGHTBLUE;
STICKLINE((K >= D),K,D,4,0),COLORLIGHTGREEN;
STICKLINE((K >= D),K,D,3,0),COLORLIGHTRED;
STICKLINE((K >= D),K,D,2,0),COLORYELLOW;
STICKLINE((K >= D),K,D,1,0),COLORMAGENTA;
STICKLINE((K <= D),K,D,6,0),COLORRED;