财富阶梯主图:
参数:N:20 N1:7 N2:69
M3:= EMA(CLOSE,3);
M8: EMA(CLOSE,8), , COLORGREEN;
M13: EMA(M8,13), , COLORRED;
VAR1:=EMA(M13,62);
VAR2:=(CLOSE+HIGH+LOW)/3;
VAR3:=EMA(VAR2,10);
VAR4:=REF(VAR3,1);
STICKLINE(VAR3>VAR4,VAR3,VAR4,4,0), , COLORYELLOW;
STICKLINE(VAR3<VAR4,VAR3,VAR4,4,0), , COLORLIGREEN;
VAR5:=(REF(HIGH,1)+REF(LOW,1))/2;
VAR6:=MA(CLOSE,N)+2*STD(CLOSE,N);
DRAWTEXT(CROSS(VAR3,VAR4),VAR3*0.98,''),COLORYELLOW;
DRAWTEXT(CROSS(VAR5,VAR6),HIGH*1.04,'↓高位'), , COLORGREEN;
VAR7:=REF(CLOSE,1);
VAR8:=SMA(MAX(CLOSE-VAR7,0),N1,1)/SMA(ABS(CLOSE-VAR7),N1,1)*100;
VAR9:=CROSS(N2,VAR8);
VARA:=FILTER(VAR9,4);
DRAWTEXT(VARA,HIGH*1.04,''), , COLORWHITE;
VARB:=(2*CLOSE+HIGH+LOW)/4;
VARC:=LLV(LOW,34);
VARD:=HHV(HIGH,34);
VARE:=EMA((VARB-VAR1)/(VAR5-VAR1)*100,7);
VARF:=EMA(0.667*REF(VARE,1)+0.333*VARE,5);
DRAWTEXT(IF(COUNT(CLOSE<REF(CLOSE,1),8)/8>0.6 AND VOL>=1.5*MA(VOL,5) AND COUNT(VARE>=VARF,3) AND REF(LOW,1)=LLV(LOW,120),1,0),LOW,'●买进'), , {00010001};
DRAWTEXT(IF(COUNT(CLOSE<REF(CLOSE,1),13)/13>0.6 AND COUNT(VARE>VARF,6) AND REF(LOW,5)=LLV(LOW,120) AND REF(CLOSE>=OPEN,4) AND REF(CLOSE>OPEN,3) AND REF(CLOSE>OPEN,2) AND REF(OPEN>CLOSE,1) AND OPEN>REF(CLOSE,1),1,0),LOW,'●买进'), , COLORYELLOW;
VAR10:=MA(CLOSE,80)-MA(CLOSE,10)/3;
DRAWTEXT(IF(CLOSE<VAR10 AND VOL/240>MA(VOL,5)/240 AND CLOSE>REF(CLOSE,1)*1.08 AND CLOSE<MA(CLOSE,13)*1.3,1,0),LOW,'●抄底'), , COLORRED;
BB:=HHV(HHV(LOW,14),60);
X:=HHV(MA((L+H+C)/3,8),60),COLORFF6600;
DRAWTEXT_FIX(C>0,0.004,1,0,DYBLOCK),COLORYELLOW,LINETHICK2;
DRAWTEXT_FIX(C>0,0.06,1,0,HYBLOCK),COLORRED,LINETHICK2;
DRAWTEXT_FIX(C>0,0.12,1,0,EXTERNSTR(0,1)),COLORWHITE,LINETHICK2;
狂龙出海(副图)
L2:=MA(C,3);
L3:=MA(C,60);
L4:=MA(C,120);
L5:=MA(C,40);
VAR1:=SUM(WINNER(CLOSE)*100,10)/10-(SUM(WINNER(CLOSE)*100,10)/20+10);
绿岛: STICKLINE(VAR1>0,0,VAR1,10,0),COLORGREEN;
海水: STICKLINE(VAR1<0,0,VAR1,10,0),COLORBLUE;
狂龙出海: IF(CROSS(L2,L3) AND CLOSE<L4,15,0);
DRAWICON(狂龙出海,15,1);
VAR2:=CLOSE/L5*100<78;
VAR3:=CLOSE/L3*100<74;
VAR4:=HIGH>(LOW*1.051);
VAR5:=VAR4 AND COUNT(VAR4,5)>1;
VAR6:=CLOSE/HHV(HIGH,BARSCOUNT(CLOSE>0))*100;
狂龙探底: IF((REF(C,13)-CLOSE)/REF(C,13)*100*VAR3>15
AND SUM(VOL/CAPITAL,13)*100<18 AND VOL/CAPITAL*100<2.5
AND (REF(C,1)-CLOSE)/REF(C,1)*100<8 AND VAR6<=50 AND VAR5
AND (VAR2 OR VAR3),-15,0);
DRAWICON(FILTER(狂龙探底,6),-15,1);
DRAWTEXT(FILTER(狂龙探底,6),-13,'狂龙探底');
MACD+KDJ(副图)
RSV:=((CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*200-100)/2;
K:SMA(SMA( RSV,3,1),3,1);
D:MA(EMA(K,3),3);
J:=3*K-2*D,COLORSTICK,LINETHICK3;
STICKLINE(J>0,J,0,3,0),COLORLIRED,COLORLIMAGENTA;
STICKLINE(J<0,J,0,3,0),COLORLIBLUE;
空头:(-(3*K-2*D)),COLORGREEN;
DIFF:=EMA(CLOSE,13)-EMA(CLOSE,26)*100;
DEA:=EMA(DIFF,3);
多头MACD:(-3*(DIFF-DEA)),LINETHICK2,COLORRED;
STICKLINE(多头MACD>0,多头MACD,0,1,0),COLORRED,LINETHICK1;
STICKLINE(多头MACD<0,多头MACD,0,1,0),COLOR00FF00,LINETHICK1;
短买:IF((CROSS(K,D) AND K<0 ),10,0),COLORRED,LINETHICK0;
DRAWICON((CROSS(K,D) AND K<0 ),K,1);
追击:IF(CROSS(多头MACD,空头),25,0),COLOR00FFFF,LINETHICK2;
MACD+KDJ+RSI三合一(副图)
DIFIF1:=(EMA(CLOSE,12) - EMA(CLOSE,26))*100/EMA(CLOSE,26);
DEAEA1:=EMA(DIFIF1,9);
MACD1:=2*(DIFIF1-DEAEA1),STICK;
MACD2:=EMA(MACD1,3);
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,3,0),COLORRED;
STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,3,0),COLORGREEN;
STICKLINE(MACD1<MACD2,0,MACD1,3,0),COLORCBCBC0;
STICKLINE(MACD1>=0 OR MACD1<=0,0,0,50,1),COLORWHITE;
DIFIF1,COLOR33FF33,LINETHICK2;
DEAEA1,COLORYELLOW,LINETHICK2;
MACD:MACD1,NODRAW,COLORMAGENTA;
强:IF(DIFIF1>=DEAEA1,DIFIF1,DRAWNULL),COLORRED,LINETHICK2;
弱:=IF(DEAEA1>=DIFIF1,DEAEA1,DRAWNULL),COLORFF9900,LINETHICK2;
DRAWICON(CROSS(DIFIF1,DEAEA1),DIFIF1+0.1,1);
DRAWICON(CROSS(DEAEA1,DIFIF1),0.4,2);
A1:=BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1));
B1:=REF(C,A1+1)>C AND REF("MACD.DIF",A1+1)<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA");
DRAWTEXT(B1>0,-0.8,'MACD底背'),COLORFF00FF;
A2:=BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1));
B2:=REF(C,A2+1)>C AND REF("KDJ.K",A2+1)<"KDJ.K" AND CROSS("KDJ.K","KDJ.D");
DRAWTEXT(B2,-0.6,'KDJ底离'),COLORYELLOW;{KDJ底背离};
A3:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1",A3+1)<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2");
DRAWTEXT(B3>0,-0.3,'RSI底离'),COLORCYAN;{RSI底背离};
C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1));
D1:=REF(C,C1+1)<C AND REF("MACD.DIF",C1+1)>"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF");
DRAWTEXT(D1>0,0.4,'MACD顶离'),COLORBLUE;{MACD顶背离}
C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));
D2:=REF(C,C2+1)<C AND REF("KDJ.K",C2+1)>"KDJ.K" AND CROSS("KDJ.D","KDJ.K");
DRAWTEXT(D2>0,0.6,'KDJ顶离'),COLORLIGRAY;{KDJ顶背离}
C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));
D3:=REF(C,C3+1)<C AND REF("RSI.RSI1",C3+1)>"RSI.RSI1" AND CROSS("RSI.RSI2","RSI.RSI1");
DRAWTEXT(D3>0,0.8,'RSI顶离'),COLORGREEN;{RSI顶背离};
DD:=C=HHV(C,180);
EE:=DEAEA1< REF(DEAEA1,1) AND REF(DEAEA1< REF(DEAEA1,1),1)=1;
CC:=C> REF(C,1) AND REF(C> REF(C,1),1)=1;
上升背离:(CC AND EE)*DEAEA1,COLOR00FFFF;
顶背离:(DD AND EE AND DEAEA1< HHV(DEAEA1,180))*DEAEA1,STICK,LINETHICK3,COLORGREEN;
FF:=C=LLV(C,180);
GG:= DEAEA1> REF(DEAEA1,1) AND REF(DEAEA1> REF(DEAEA1,1),1)=1;
LL:=C< REF(C,1) AND REF(C< REF(C,1),1)=1;
下降背离:(LL AND GG)*DEAEA1,COLORMAGENTA;
底背离:(FF AND GG AND DEAEA1> LLV(DEAEA1,180))*DEAEA1,STICK,LINETHICK3,COLORRED;
MACD和KDJ买入(选股)
RSV:=((CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*200-100)/2;
K:=SMA(SMA( RSV,3,1),3,1);
D:=MA(EMA(K,3),3);
J:=3*K-2*D;
空头:=(-(3*K-2*D));
DIFF: |