N1:=12;N2:=26;M:=9;
CC:=(C+L+H+O)/4;
DIFF:=EMA(CC,5)-EMA(CC,13),COLORBB00BB,LINETHICK2;
DEA:=EMA(DIFF,4),COLOR00BB00,LINETHICK2;
MACD:=XMA((DIFF-DEA)*200,2),COLORSTICK;
红柱持股:MACD,NODRAW;
黄色高抛:MACD,NODRAW;
蓝柱持币:MACD,NODRAW;
紫色反弹:MACD,NODRAW;
STICKLINE(MACD0,0,MACD,6,0 ),COLOR003333;
STICKLINE(MACD0,0,MACD,3.5,0 ),COLOR004444;
STICKLINE(MACD0,0,MACD,3,0 ),COLOR005555;
STICKLINE(MACD0,0,MACD,2.5,0 ),COLOR007777;
STICKLINE(MACD0,0,MACD,2,0 ),COLOR009999;
STICKLINE(MACD0,0,MACD,1.5,0 ),COLOR00BBBB;
STICKLINE(MACD0,0,MACD,1,0 ),COLOR00DDDD;
STICKLINE(MACD0,0,MACD,0.5,0 ),COLOR00FFFF;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,6 ,0 ),COLOR000033;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,3.5 ,0 ),COLOR000044;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,3 ,0 ),COLOR000055;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2.5 ,0 ),COLOR000077;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2 ,0 ),COLOR000099;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,1.5 ,0 ),COLOR0000BB;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,1 ,0 ),COLOR0000DB;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,0.5 ,0 ),COLOR0000FF;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,6,0 ),COLORFF00CA;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,3.5,0 ),COLORFF00CC;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,3,0 ),COLORFF00DB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2.5,0 ),COLORFF00DD;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORFF00DF;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,1.5,0 ),COLORFF00EE;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,1,0 ),COLORFF00EF;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,0.5,0 ),COLORFF00FF;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,6,0 ),COLOR333300;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,3.5,0 ),COLOR444400;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,3,0 ),COLOR555500;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2.5,0 ),COLOR777700;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLOR999900;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,1.5,0 ),COLORBBBB00;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,1,0 ),COLORDDDD00;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,0.5,0 ),COLORFFFF00;
DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*100;
DEAA:=EMA(DIF,9);
RSV:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100;
K:=SMA(RSV,2,1);
D:=SMA(K,2,1);
J:=3*K-2*D;
主流资金:=(EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3))/100, COLORRED,LINETHICK2;
非主流资金:=(EMA(100*(INDEXC-LLV(INDEXL,34))/(HHV(INDEXH,34)-LLV(INDEXL,34)),3))/100,COLORGREEN,LINETHICK2;
KJ共振:CROSS(DIF,DEAA) AND CROSS(K,D) AND 主流资金>非主流资金;
DRAWTEXT(KJ共振,红柱持股,'B'),COLORGRE
AND"DMI.ADXR">"DMI.MDI" AND "DMI.PDI">"DMI.ADX" AND"KDJ.D">REF("KDJ.D",1); |