J:=MA("KDJ.J#WEEK",5)/1.1;{#WEEK是引用函数,非未来!}
STICKLINE(J>=REF(J,1),100,0,4,0),COLOR380038;
STICKLINE(J<=REF(J,1),-40,0,4,0),COLOR004000;
周K&J均值:J,COLORGREEN;
LCC:=REF(C,1);
RSI:SMA(MAX(C-LCC,0),2,1)/SMA(ABS(C-LCC),2,1)*100,COLORLIRED,LINETHICK1;
RSI均值:SMA(SMA(RSI,2,1),2,1),COLORMAGENTA;
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,28))/(0.015*AVEDEV(TYP,28))/10;
DMI:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),14);
HD:=HIGH-REF(HIGH,1);
LD:=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),14)*100/DMI;
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),14)*100/DMI;
ADX:=EXPMEMA(ABS(DMM-DMP)/(DMM+DMP)*100,6);
ADXR:=EXPMEMA(ADX,6);
波长A:MA(50*(L- LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20)),7),POINTDOT,COLORLIBLUE,LINETHICK4;
波长B:MA(-50*(L- LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20)),7),POINTDOT,COLORLIBLUE,LINETHICK4;
IF(REF(波长A,1)<波长A AND 波长A>=0,波长A,DRAWNULL),POINTDOT,COLORRED,LINETHICK4;
IF(REF(波长B,1)>波长B AND 波长A>=0,波长B,DRAWNULL),POINTDOT,COLORRED,LINETHICK4;
DMM买点:STICKLINE(CROSS(DMP,DMM)&&CROSS(DMP,ADX)&&CROSS(DMP,ADXR)&&V>REF(V,1)&&周K&J均值>REF(周K&J均值,1),20,-20,1,0),COLORMAGENTA;
DRAWTEXT(DMM买点,-1,'DMM买点!'),COLORMAGENTA;
ADX买点:STICKLINE(CROSS(ADX,DMM)&&CROSS(ADX,ADXR)&&V>REF(V,1)&&周K&J均值>REF(周K&J均值,1),15,-15,1,0),COLORLIRED;
DRAWTEXT(ADX买点,-1,'ADX买点!'),COLORLIRED;
CBA昨振:STICKLINE(CROSS(ADXR,ADX) OR REF(CROSS(ADXR,ADX),1)&&CROSS(CCI,-10) OR REF(CROSS(CCI,-10),1)&&周K&J均值>REF(周K&J均值,1),10,-10,1,0),COLORWHITE;
{DRAWTEXT(CBA昨振,-10,'CBA昨日共振!'),COLORWHITE;}
CBA共振:STICKLINE(CROSS(ADXR,ADX)&&CROSS(CCI,-10)&&周K&J均值>REF(周K&J均值,1),10,-10,1,0),COLORYELLOW;
DRAWTEXT(CBA共振,15,'CBA共振!'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=53,-30,'暗紫(持仓区);暗绿(空仓区);仓区仅日线参考为准!'),COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=88,-30,COLORYELLOW;
0,LINETHICK2;
|