DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
DRAWBAND(MA(CLOSE,60),RGB(200,80,80),MA(CLOSE,120),RGB(0,0,115));
DRAWBAND(MA(CLOSE,N1),RGB(100,100,80),MA(CLOSE,N2),RGB(0,200,215));
MA1:MA(CLOSE,N1),LINETHICK3;
MA2:MA(CLOSE,N2),LINETHICK3;
MA55:MA(CLOSE,55),LINETHICK2,COLORGREEN;
MA24:MA(C,24),LINETHICK2,COLORBLUE;
MA360:MA(C,360),LINETHICK2,COLORYELLOW;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
STICKLINE(DIF>REF(DIF,1),MA1,MA2,0.1,1),COLORMAGENTA;
STICKLINE(DIF<REF(DIF,1) OR MACD<REF(MACD,1),MA1,MA2,0.1,1),COLORGREEN;
PMA:MA(C,N1),COLORWHITE,LINETHICK3;
IF(PMA>REF(PMA,1),PMA,DRAWNULL),COLORRED,LINETHICK3;
IF(PMA<REF(PMA,1),PMA,DRAWNULL),COLORGREEN,LINETHICK3;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,9,1);
D:=SMA(K,9,1);
J:=3*K-2*D;
STICKLINE(CROSS(DIF,DEA) AND CROSS(K,D) AND CROSS(MA1,MA2),C,C,1,1);
DRAWICON(MA2>REF(MA2,1),MA2,1);
DRAWICON(MA2<REF(MA2,1),MA2,2);
副图1
A:=IF((CLOSE > 126.32),(AMOUNT / 100000),VOL);
主力:MA(A,4),NODRAW,COLOR00FFFF;
游资:MA(A,8),NODRAW,COLOR00FF00;
大户:MA(A,16),NODRAW,COLOR0000FF;
散户:MA(A,32),NODRAW,COLORFFFF00;
主动参与比例:=ROUND(((主力 / (((主力 + 游资) + 大户) + 散户)) * 100)),NODRAW,COLOR00FFFF;
游资参与比例:=ROUND(((游资 / (((主力 + 游资) + 大户) + 散户)) * 100)),NODRAW,COLOR00FF00;
大户参与比例:=ROUND(((大户 / (((主力 + 游资) + 大户) + 散户)) * 100)),NODRAW,COLOR0000FF;
散户参与比例:=ROUND(((散户 / (((主力 + 游资) + 大户) + 散户)) * 100)),NODRAW,COLORFFFF00;
STICKLINE((主力 > 0),0,主力,3,0),COLOR0000FF;
STICKLINE((主力 > 0),0,主力,2.7.5,0),COLOR001BFF;
STICKLINE((主力 > 0),0,主力,2.4,0),COLOR0035FF;
STICKLINE((主力 > 0),0,主力,2.1,0),COLOR0050FF;
STICKLINE((主力 > 0),0,主力,1.8,0),COLOR0062FF;
STICKLINE((主力 > 0),0,主力,1.5,0),COLOR007AFF;
STICKLINE((主力 > 0),0,主力,1.2,0),COLOR0089FF;
STICKLINE((主力 > 0),0,主力,0.9,0),COLOR009CFF;
STICKLINE((主力 > 0),0,主力,0.6,0),COLOR00C0FF;
STICKLINE((主力 > 0),0,主力,0.3,0),COLOR00EAFF;
STICKLINE((游资 > 0),0,游资,3,0),COLOR007F00;
STICKLINE((游资 > 0),0,游资,2.7,3),COLOR008B00;
STICKLINE((游资 > 0),0,游资,2.4,0),COLOR009500;
STICKLINE((游资 > 0),0,游资,2.1,0),COLOR00A300;
STICKLINE((游资 > 0),0,游资,1.8,0),COLOR00AF00;
STICKLINE((游资 > 0),0,游资,1.5,0),COLOR00C000;
STICKLINE((游资 > 0),0,游资,1.2,0),COLOR00CA00;
STICKLINE((游资 > 0),0,游资,0.9,0),COLOR00DB00;
STICKLINE((游资 > 0),0,游资,0.6,0),COLOR00FF00;
STICKLINE((大户 > 0),0,大户,3,0),COLOR102088;
STICKLINE((大户 > 0),0,大户,2.7,0),COLOR102099;
STICKLINE((大户 > 0),0,大户,2.4,0),COLOR1020AA;
STICKLINE((大户 > 0),0,大户,2.1,0),COLOR1020BB;
STICKLINE((大户 > 0),0,大户,1.8,0),COLOR1020CC;
STICKLINE((大户 > 0),0,大户,1.5,0),COLOR1020DD;
STICKLINE((大户 > 0),0,大户,1.2,0),COLOR1020EE;
STICKLINE((大户 > 0),0,大户,0.9,0),COLOR1020FF;
STICKLINE((散户 > 0),0,散户,3,0),COLORFF7700;
STICKLINE((散户 > 0),0,散户,2.7,0),COLORFF8800;
STICKLINE((散户 > 0),0,散户,2.4,0),COLORFF9900;
STICKLINE((散户 > 0),0,散户,2.1,0),COLORFFAA00;
STICKLINE((散户 > 0),0,散户,1.8,0),COLORFFBB00;
STICKLINE((散户 > 0),0,散户,1.5,0),COLORFFCC00;
STICKLINE((散户 > 0),0,散户,1.2,0),COLORFFDD00;
STICKLINE((散户 > 0),0,散户,0.9,0),COLORFFEE00;
游资线:MA(A,180),COLORWHITE,DOTLINE,LINETHICK2;
副图2
{DRAWGBK(OPEN>0,RGB(0,0,250),RGB(0,0,0),0,'02',0);}
VOLUME:=VOL,VOLSTICK;
MAVOL5:=MA(VOLUME,5);
MAVOL21:=MA(VOLUME,21);
MAVOL65:=MA(VOLUME,65);
STICKLINE(CROSS(MAVOL5,MAVOL21),5,8,2,0),COLORWHITE;
周DIF:=("MACD.DIF#WEEK");
周DEA:=("MACD.DEA#WEEK");
周MACD:=2*(周DIF-周DEA);
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9),COLORFFFF00;
MACD:=(DIFF-DEA)*2;
A1:BARSLAST(DIFF<REF(DIFF,1)),COLOR00FFFF,LINETHICK1;
A11:A1*-1,COLOR00FFFF,LINETHICK1;
A2:BARSLAST(DEA<REF(DEA,1)),COLORRED,LINETHICK1;
A22:A2*-1,COLORRED,LINETHICK1;
DRAWBAND(A2,RGB(150,50,20),A1,RGB(150,100,150));
DRAWBAND(A22,RGB(150,100,150),A11,RGB(150,50,20));
STICKLINE(周MACD>REF(周MACD,1) AND 周MACD>0,-5,5,18,0),COLORRED;
STICKLINE(周MACD<REF(周MACD,1) AND 周MACD>0,-5,5,18,0),COLORYELLOW;
STICKLINE(周MACD>REF(周MACD,1) AND 周MACD<0,-5,5,18,0),COLORLIRED;
STICKLINE(周MACD<REF(周MACD,1) AND 周MACD<0,-5,5,18,0),COLORBLUE;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,-3,3,3.5,1),COLORRED;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,-3,3,3.5,1),COLORLIRED;
STICKLINE(MACD<REF(MACD,1) AND MACD>0,-3,3,3.5,1),COLORYELLOW;
STICKLINE(MACD<REF(MACD,1) AND MACD<0,-3,3,3.5,1),COLORBLUE;
DIIFF:=(EMA(A1,5) - EMA(A1,10));
DEAA:=EMA(DIIFF,3);
K线动能:=(DIIFF-DEAA),COLORYELLOW;
STICKLINE((K线动能 > 0),-1,1,1.5,0),COLOR0000FF;
STICKLINE((K线动能 < 0),-1,1,1.5,0),COLOR00FF00;
STICKLINE(CROSS(DIFF,DEA),0,0.04,5,1),COLORYELLOW;
STICKLINE(CROSS(DIFF,DEA),0.04,0.08,5,0),COLORRED;
STICKLINE(CROSS(DIFF,DEA),0.08,0.12,5,1),COLORYELLOW;
STICKLINE(CROSS(DIFF,DEA),0.12,0.16,4,1),COLORRED;
STICKLINE(CROSS(DIFF,DEA),0.16,0.2,3,1),COLORRED;
STICKLINE(CROSS(DIFF,DEA),0.2,0.24,2,0),COLORWHITE;
STICKLINE(CROSS(DIFF,DEA) AND DIFF<0,A11,0,2,0),COLORRED;
STICKLINE(CROSS(DIFF,DEA) AND DIFF>0,0,A1,2,0),COLORRED;
STICKLINE(CROSS(DEA,DIFF) AND DIFF<0,A11,0,2,0),COLORBLUE;
STICKLINE(CROSS(DEA,DIFF) AND DIFF>0,0,A1,2,0),COLORBLUE;
MACD底背离:
STICKLINE(REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA),-25,25,0.00001,0),COLORYELLOW;
STICKLINE(A1>0 AND A2>0,A2,A1,0.00001,0),COLORFFFFFF;
STICKLINE(A1>0 AND A2>0,A22,A11,0.00001,0),COLORFFFFFF;
STICKLINE(A1>0 AND A2>0,0,A1,0.000001,0),COLORFF00FF;
STICKLINE(A1>0 AND A2>0,0,A11,0.000001,0),COLORGREEN;
DRAWTEXT(CROSS(DIFF,DEA) AND DIFF<0,-5,'〇'),COLORCYAN;
DRAWTEXT(CROSS(DIFF,DEA) AND DIFF<0,-12,'〇'),COLORCYAN;
DRAWTEXT(CROSS(DIFF,DEA) AND DIFF>0,5,'〇'),COLORGREEN;
DRAWTEXT(CROSS(DIFF,DEA) AND DIFF>0,12,'〇'),COLORGREEN;
DRAWTEXT(A2>A1 AND A22<A11 AND A1=0 AND A11=0,A2,'∈'),COLORGREEN;
DRAWTEXT(A2>A1 AND A22<A11 AND A1=0 AND A11=0,0,'∈'),COLORGREEN;
DRAWTEXT(A2>A1 AND A22<A11 AND A1=0 AND A11=0,A22,'∈'),COLORGREEN;
STICKLINE(CROSS(DIFF,DEA) AND DIFF<0,A11,0,2,0),COLORRED;
STICKLINE(CROSS(DIFF,DEA) AND DIFF>0,0,A1,2,0),COLORRED;
STICKLINE(CROSS(DEA,DIFF) AND DIFF<0,A11,0,2,0),COLORBLUE;
STICKLINE(CROSS(DEA,DIFF) AND DIFF>0,0,A1,2,0),COLORBLUE;
N:=5;M1:=5;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,5,1);
D:=SMA(K,M1,5);
J:=3*K-2*D;
VARB2:=(RSV/2+22)*1;
量:=EMA(VOL,13);
资金:=EMA(AMOUNT,13);
过滤:=((资金 /量) / 100);
提纯:=(((CLOSE -过滤) / 过滤) * 100);
黄金:=((提纯 < (0)) AND ZXNH);
低买:=IF(黄金 AND RSV<VARB2-2,50,0);
高卖:=IF(黄金 AND RSV>VARB2,80,120);
上涨分界:=25;
KDJ提前金叉:(CROSS(上涨分界,低买)),COLORFF00FF,NODRAW;
DRAWTEXT(KDJ提前金叉,0,'⊙'),COLORFFFFFF;
DRAWTEXT_FIX(1,0.05,0.02,0,'【大池不红君莫入,大池变黄君莫贪】'),COLORYELLOW;
DRAWTEXT_FIX(1,0.05,0.07,0,'【中池变黄小池绿,如在鱼尾逃命急】'),COLORYELLOW;
副图3
X_1:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*20;
X_2:=(CLOSE-MA(CLOSE,4))/MA(CLOSE,4)*20;
红柱:SMA(X_1,3,1),COLORRED,LINETHICK0;
蓝柱:SMA(X_2,3,1),COLORSTICK,COLORCYAN;
STICKLINE(红柱<REF(红柱,0.5) AND 红柱>0,0,红柱,4,0),COLORRED;
STICKLINE(红柱<REF(红柱,1) AND 红柱>0,0,红柱,2,0),COLORGREEN;
STICKLINE(红柱>REF(红柱,1) AND 红柱>0,0,红柱,3,0),COLORRED;
STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,2,0),COLOR00DDFF;
STICKLINE(红柱>REF(红柱,1) AND 红柱<0,0,红柱,2,0),COLORFFDD00;
STICKLINE(红柱<REF(红柱,1) AND 红柱<0,0,红柱,3,0),COLORFFCC00;
STICKLINE(蓝柱>REF(蓝柱,1) AND 蓝柱<0,0,蓝柱,2,0),COLORMAGENTA;
副图4
X_1:=EMA(CLOSE,12)-EMA(CLOSE,26);
X_2:=EMA(X_1,9);
X_3:=X_1>X_2;
X_4:=(CLOSE-LLV(LOW,12))/(HHV(HIGH,12)-LLV(LOW,12))*100;
X_5:=SMA(X_4,3,1);
X_6:=SMA(X_5,3,1);
X_7:=X_5>X_6;
X_8:=REF(CLOSE,1);
X_9:=SMA(MAX(CLOSE-X_8,0),9,1)/SMA(ABS(CLOSE-X_8),9,1)*100;
X_10:=SMA(MAX(CLOSE-X_8,0),26,1)/SMA(ABS(CLOSE-X_8),26,1)*100;
X_11:=X_9>X_10;
X_12:=SMA(X_4,3,1);
X_13:=SMA(X_12,3,1);
X_14:=X_12>X_13;
X_15:=(MA(CLOSE,3)+MA(CLOSE,9)+MA(CLOSE,12)+MA(CLOSE,26))/4;
X_16:=CLOSE>X_15;
X_17:=CLOSE-REF(CLOSE,1);
X_18:=100*EMA(EMA(X_17,9),9)/EMA(EMA(ABS(X_17),9),3);
X_19:=100*EMA(EMA(X_17,26),12)/EMA(EMA(ABS(X_17),26),12);
X_20:=X_18>X_19;
X_21:=DMA((HIGH+LOW+CLOSE*2)/4,0.9);
X_22:=REF(EMA(X_21,3),1);
X_23:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
X_24:=IF(CLOSE>OPEN,X_23*(HIGH-LOW),IF(CLOSE<OPEN,X_23*(HIGH-OPEN+CLOSE-LOW),VOL/2))+IF(CLOSE>OPEN,0-X_23*(HIGH-CLOSE+OPEN-LOW),IF(CLOSE<OPEN,0-X_23*(HIGH-LOW),0-VOL/2));
X_25:=X_24/20/1.15;
X_26:=X_25*0.55+REF(X_25,1)*0.33+REF(X_25,2)*0.22;
X_27:=EMA(X_26,8);
X_28:=EMA(X_26,3);
X_29:=X_28;
X_30:=VOL;
X_31:=MA(X_30,5);
X_32:=MA(X_30,10);
X_33:=X_31>=X_32;
X_34:=X_29>=0;
X_35:=X_34 AND X_33;
DRAWICON(X_35,1,1);
X_36:=MA(KDJ.K#WEEK(9,3,3),5);
X_37:=EMA(CLOSE,12/2)-EMA(CLOSE,26/2);
X_38:=EMA(X_37,9/2);
X_39:=X_36>=REF(X_36,1) AND X_37>=X_38;
DRAWICON(X_39,0.9,13);
X_40:=X_39 OR X_35;
X_41:=X_3 AND X_7 AND X_11 AND X_14 AND X_16 AND X_20;
X_42:=COST(50)*COST(50)/COST(80);
X_43:=COST(40)*COST(40)/COST(60);
X_44:=X_43-X_42;
X_45:=X_44>0 AND CLOSE>X_43;
X_46:=X_44<0 AND CLOSE>X_42;
X_47:=X_45 OR X_46 OR (X_45 AND X_46);
X_48:=X_47=0 OR (X_44>0 AND CLOSE>X_43 AND CLOSE<MA(CLOSE,10)) OR (X_44<0 AND CLOSE>X_42 AND CLOSE<MA(CLOSE,5));
X_49:=X_47 AND REF(X_48,1);
X_50:=X_48 AND REF(X_47,1);
STICKLINE(X_47,0.5,0.8,3,0),COLORRED;
STICKLINE(X_48,0.5,0.8,3,1),COLORGRAY;
STICKLINE(X_41,0.5,0.8,3,0),COLORMAGENTA;
DRAWICON(X_47 OR X_41 AND REF(X_47 OR X_41,1)=0 AND X_40,0.5,7);
X_51:=(HIGH+LOW+CLOSE*2)/4;
X_52:=EMA(X_51,17);
X_53:=STD(X_51,17);
X_54:=((X_51-X_52)/X_53*100+200)/4;
X_55:=(EMA(X_54,5)-25)*1.56;
X_56:=EMA(X_55,2)*1.22;
X_57:=EMA(X_56,2);
STICKLINE(X_56-X_57>0,0.2,0.4,3,0),COLORRED;
STICKLINE(X_56-X_57<0,0.2,0.4,3,0),COLORGREEN;
STICKLINE(X_56-X_57>0 AND REF(X_56-X_57<0,1),0.2,0.4,3.05,0),COLOR000099;
STICKLINE(X_56-X_57>0 AND REF(X_56-X_57<0,1),0.2,0.4,2.2,0),COLOR0000CC;
STICKLINE(X_56-X_57>0 AND REF(X_56-X_57<0,1),0.2,0.4,1.5,0),COLORRED;
STICKLINE(X_56-X_57>0 AND REF(X_56-X_57<0,1),0.2,0.4,0.5,0),COLORYELLOW;
STICKLINE(X_56-X_57>0 AND X_56-X_57<REF(X_56-X_57,1) AND X_57>110,0.2,0.4,3,0),COLORLIRED;