副圖:
CS:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
YJD:=(EMA(CS,3)-50)*2;
能量線:YJD;{探測能量動力,很像KDJ公式的J值}
中:=0;
IF(中,YJD,DRAWNULL);
DRAWTEXT(CROSS(YJD,中),0,'●'),COLORRED;{買入點2}
能量線1:=能量線>=0;
能量線2:=能量線<=0;
{原 莊家克星的抄底逃頂公式 將山水線改名拋留線,去掉倒影線}
VAR1:=(2*CLOSE+HIGH+LOW)/4;
VAR2:=LLV(LOW,5);
VAR3:=HHV(HIGH,4);
VAR5:=(VAR1-LLV(LOW,4))/(HHV(HIGH,4)-LLV(LOW,4))*100;
VAR6:=SMA(VAR5,2,1);
SK:EMA((VAR1-VAR2)/(VAR3-VAR2)*100,4),LINETHICK0;
SD:EMA(0.667*REF(SK,1)+0.333*SK,2),LINETHICK0;
SJ:2*SK-1*SD,LINETHICK0;
SKD差:SK-SD,COLORRED,LINETHICK0;
拋留線: SMA(VAR6,2,1),COLOR889999,LINESTICK;
金叉:IF(CROSS(SK,SD),拋留線,0),COLORFFFFFF,LINETHICK2;{買入點}
STICKLINE(CROSS(金叉,0.1),REFDATE(HHV(SJ,200),DATE),REFDATE(LLV(能量線,200),DATE),0,-1),COLORFFFFFF;
DRAWBAND(0,RGB(255,48,48),IF(能量線1,能量線,DRAWNULL),RGB(255,96,96));
IF(拋留線>REF(拋留線,1),拋留線,DRAWNULL),LINETHICK2,COLORRED;
IF(拋留線<REF(拋留線,1),拋留線,DRAWNULL),LINETHICK2,COLORGREEN;
IF(能量線>REF(能量線,1),能量線,DRAWNULL),LINETHICK1,COLORRED;
IF(能量線<REF(能量線,1),能量線,DRAWNULL),LINETHICK1,COLORGREEN;
STICKLINE(CROSS(能量線1,0.1),REFDATE(HHV(SJ,200),DATE),REFDATE(LLV(能量線,200),DATE),0,-1)COLOR0000FF;
DRAWTEXT(CROSS(C,MA(C,5)) AND CROSS(C,MA(C,10)) AND CROSS(C,MA(C,20)) AND CROSS(C,MA(C,30)) AND CROSS(MA(V,5),MA(V,10)),-10,'一陽穿四線'),COLORYELLOW,LINETHICK2;
頂線:80,COLORRED;
強勢:65,COLORFFFFFF,DOTLINE;
中線:0,COLORFFFFFF,DOTLINE;
均線:-65,COLORRED,DOTLINE;
底線:-80,COLORGREEN;
DRAWTEXT(ISLASTBAR,頂線, '80 頂線'),COLORRED;
DRAWTEXT(ISLASTBAR,強勢, '65 強勢'),COLORFFFFFF;
DRAWTEXT(ISLASTBAR,中線, '00 中線'),COLOR00FFFF;
DRAWTEXT(ISLASTBAR,均線, '均線提示'),COLORFFFFFF;
DRAWTEXT(ISLASTBAR,底線, '-80 底線'),COLORGREEN;
能量線第一天變紅選股公式
CS:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
YJD:=(EMA(CS,3)-50)*2;
能量線:=YJD;
REF(NOT(能量線>REF(能量線,1)),1) AND 能量線>REF(能量線,1);