V2:=EMA(V1,13)-EMA(V1,34);
V3:=EMA(V2,5);
V4:=2*(V2-V3)*5.5;
主力撤: IF(V4<=0,V4,0),COLORBLUE;
主力进: IF(V4>=0,V4,0),COLORFF00FF;
V5:=(HHV(INDEXH,8)-INDEXC)/(HHV(INDEXH,8)-LLV(INDEXL,8))*8;
V6:=EMA(3*V5-2*SMA(V5,18,1),5);
V7:=(INDEXC-LLV(INDEXL,8))/(HHV(INDEXH,8)-LLV(INDEXL,8))*10;
V8:=(INDEXC*2+INDEXH+INDEXL)/4;
V9:=EMA(V8,13)-EMA(V8,34);
VA:=EMA(V9,3);
VB:=(V9-VA)/2;
大盘资金进场:IF(VB>=0,VB,0),COLORRED;
大盘资金撤走:IF(VB<=0,VB,0),COLORGREEN;
V11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);
趋势线: EMA(V11,3);
V12:=(趋势线-REF(趋势线,1))/REF(趋势线,1)*100;
准备现金: STICKLINE(趋势线<=13,0,20,5,0),COLORCC9900;
AA:=(趋势线<=13) AND FILTER((趋势线<=13),15);
DRAWTEXT (AA,30,'准备'),COLORCC9900;
买入股票: STICKLINE(趋势线<=13 AND V12>13,0,50,5,0),COLOR0099FF;
BB:= (趋势线<=13 AND V12>13) AND FILTER((趋势线<=13 AND V12>13),10) ;
DRAWTEXT (BB,60,''),COLOR0099FF;
卖临界: STICKLINE(趋势线>90 AND 趋势线>REF(趋势线,1),100,95,15,1),COLORFFFF00;
见顶清仓:FILTER(趋势线>90 AND 趋势线< REF(主力进,1),8);
DRAWTEXT( 见顶清仓,90,'逃顶'),COLORYELLOW;
CC:=(趋势线>=90 AND V12) AND FILTER((趋势线>=90 AND V12),10);
STICKLINE(大盘资金进场 AND 趋势线< 13,0,30,10/3,0),COLORRED;
STICKLINE(大盘资金撤走 AND 趋势线>90,0,30,10/3,0),COLORGREEN;
STICKLINE(主力进 AND 趋势线< 13,0,40,10/3,0),COLORFF00FF;
STICKLINE(主力撤 AND 趋势线>90,0,40,10/3,0),COLORBLUE;
LC := REF(CLOSE,1);
RSI_1:=SMA(MAX(CLOSE-LC,0),3,1)/SMA(ABS(CLOSE-LC),3,1)*100;
RSI_2:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;
RSI_3:=SMA(MAX(CLOSE-LC,0),8,1)/SMA(ABS(CLOSE-LC),8,1)*100;
相对强弱:=0.5*RSI_1+0.31*RSI_2+0.19*RSI_3;
WAVE_1:=SMA(100*(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8)),3,1);
WAVE_2:=SMA(100*(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8)),5,1);
WAVE_3:=SMA(100*(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8)),8,1);
短线波段:=0.5*WAVE_1+0.31*WAVE_2+0.19*WAVE_3;
机会区:20,POINTDOT,COLORRED;
风险区:80,POINTDOT,COLORGREEN;
风险系数:0.5*相对强弱+0.5*短线波段,COLORLIMAGENTA;
CD3:=IF(REF(风险系数,1)< 20 AND 风险系数>REF(风险系数,1),1,0);
N:=9;
M1:=3;
M2:=3;
P:=9;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,M1,1),COLORRED,LINETHICK2;
D:=SMA(K,M2,1),COLOR00FF00;
JJ:=P*(3*D-2*K),COLOR00FF00;
J:=((3 * K) - (2 * D));
MAIRU:= CROSS(K,D) AND K< 20;
MAICHU:= CROSS(D,K) AND D>80;
VAR2:=REF(LOW,1);
VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;
VAR4:=EMA(IF(CLOSE*1.3,VAR3*10,VAR3/10),3);
VAR5:=LLV(LOW,30);
VAR6:=HHV(VAR4,30);
VAR7:=IF(MA(CLOSE,58),1,0);
VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;
VAR9:=IF(VAR8>100,100,VAR8);
吸筹:STICKLINE(VAR9>-120,0,VAR9,6/3,1),COLORF00FF0;
快线:(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,COLORFF937F;
慢线:SMA(快线,M1,1),COLORRED,LINETHICK2;
空:SMA(慢线,M2,1),COLOR00FF00;
牛股:IF(BARSLAST(CROSS(慢线,空))< P AND BARSLAST(CROSS(空,慢线))< P AND CROSS(慢线,空) AND 慢线< 20,90,0),STICK,COLORFF937F;
STICKLINE(牛股,0,90,6/3,1),LINETHICK4,STICK,COLORFF937F;
BB2:=IF(BARSLAST(CROSS(慢线,快线))>=3 AND CROSS(快线,慢线) AND 慢线< 30,20,0);
买:STICKLINE(BB2,0,20,7/3,1),COLORYELLOW;
AA2:=IF(BARSLAST(CROSS(快线,慢线))>=4 AND CROSS(慢线,快线) AND 快线>50,20,0);
卖:STICKLINE(AA2,80,100,7/3,1),COLOR00FF00;