MA5:MA(CLOSE,5);
MA10:MA(CLOSE,10);
MA20:MA(CLOSE,20);
MA30:MA(CLOSE,30);
成本价:MCST,COLORLICYAN;
DRAWTEXT(CROSS(C,MCST),L-0.3,'上穿成本'),COLORLICYAN;
上穿成本选股:STICKLINE((CROSS(C,MCST)),L-0.1,L-0.3,1,0)COLORLICYAN;
VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARA:=REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VARB:=REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARC:=REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VARD:=CLOSE< REF(CLOSE,1) AND CLOSE< REF(CLOSE,2);
VARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;
STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLORRED;
VAR1A:=REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,1) AND VARD;
STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),2,0),COLORBLUE;
IF(MA5>=REF(MA5,1) AND MA5>=MA10,MA5,DRAWNULL),COLORRED,LINETHICK2;
IF(MA10>=REF(MA10,1) AND MA10>=MA20,MA10,DRAWNULL),COLORRED,LINETHICK2;
IF(MA20>=REF(MA20,1) AND MA20>=MA30,MA20,DRAWNULL),COLORRED,LINETHICK2;
五日十日选:DRAWTEXT(CROSS(MA5,MA10),MA5,'○'),LINETHICK2, COLORYELLOW;
趋势线:=MA((CLOSE-MA(CLOSE,40))/MA(CLOSE,40)*100 ,2);
大底十字选股:DRAWICON(趋势线< -20,L-0.6,23);
AA:=BARSCOUNT(C);
AH:=HHV(H,200);
AL:=LLV(L,200);
A0:=(AH-AL)/40;
B1:=L-A0;
STICKLINE((AA+0)/34=FLOOR((AA+0)/34),B1,B1-1.5*A0,1,0)COLORF00FF0;
DRAWTEXT((AA+0)/34=FLOOR((AA+0)/34),B1-1*A0,'时间窗,变盘')COLORYELLOW;
VAR20:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
K1:=SMA(VAR20,3,1),COLORFFFFFF;
D1:=SMA(K1,3,1),COLORFFFFFF,LINETHICK2;
VAR21:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
K2:=SMA(VAR21,3,1),COLOR0000FF;
D2:=SMA(K2,3,1),COLOR0000FF,LINETHICK2;
VAR22:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100;
K3:=SMA(VAR22,3,1),COLORFF8800;
D3:=SMA(K3,3,1),COLORFF8800,LINETHICK2;
VAR23:=(CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100;
K4:=SMA(VAR23,3,1),COLOR00FF00;
D4:=SMA(K4,3,1),COLOR008000;
DIBU:=K1< 20 AND D1< 20 AND K2< 20 AND D2< 20 AND K3< 20 AND D3< 20 AND D4< 20;
底部:=DIBU=1,COLORYELLOW;
双底KDJ选股:DRAWICON(DIBU,L-0.6,17);
“时间窗,变盘”选股公式如下:
AA:=BARSCOUNT(C);
AH:=HHV(H,200);
AL:=LLV(L,200);
A0:=(AH-AL)/40;
B1:=L-A0;
XG:(AA+0)/34=FLOOR((AA+0)/34);