LC:=REF(CLOSE,1);
RSI5:=((SMA(MAX((CLOSE - LC),0),5,1) / SMA(ABS((CLOSE - LC)),5,1)) * 100);
TR8:=SUM(MAX(MAX((HIGH - LOW),ABS((HIGH - REF(CLOSE,1)))),ABS((LOW - REF(CLOSE,1)))),10);
HD:=(HIGH - REF(HIGH,1));
LD:=(REF(LOW,1) - LOW);
DMP:=SUM(IF(((HD > 0) AND (HD > LD)),HD,0),10);
DMM:=SUM(IF(((LD > 0) AND (LD > HD)),LD,0),10);
PDI:=((DMP * 100) / TR8);
MDI:=((DMM * 100) / TR8);
ADX:=MA(((ABS((MDI - PDI)) / (MDI + PDI)) * 100),5);
AV:=(RSI5 + ADX);
DXR:=(((ADX + REF(ADX,5)) / 2) + RSI5);
0,COLORFF00FF;
WR10:=((100 * (HHV(HIGH,10) - CLOSE)) / (HHV(HIGH,10) - LLV(LOW,10)));
NEWVOL:=(RSI5 - WR10);
阶段底部:=(AV + NEWVOL);
STICKLINE((阶段底部 >= 0),0,阶段底部,0.3,1),LINETHICK2,COLORCC6600;
STICKLINE((阶段底部 < 0),0,阶段底部,0.8,1),LINETHICK6,COLORRED;
趋势线:LLV(阶段底部,1),COLORFFFFFF;
STICKLINE((趋势线 >230 ),250,趋势线,0.8,1),LINETHICK6,COLORGREEN;
买点:IF((阶段底部 < 0),1,0);
卖点:IF((趋势线 >230),1,0);
230,COLORFFFFFF;
V1:=(C*2+H+L)/4*10;
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);
趋势线8: EMA(V11,3);
V12:=(趋势线8-REF(趋势线8,1))/REF(趋势线8,1)*100;
准备现金: STICKLINE(趋势线8<=13,0,20,5,0),COLORCC9900;
AA:=(趋势线8<=13) AND FILTER((趋势线8<=13),15);
DRAWTEXT (AA,30,'准备现金'),COLORCC9900;
买入股票: STICKLINE(趋势线8<=13 AND V12>13,0,50,5,0),COLOR0099FF;
BB:= (趋势线8<=13 AND V12>13) AND FILTER((趋势线8<=13 AND V12>13),10) ;
DRAWTEXT (BB,60,'买入股票'),COLOR0099FF;
卖临界: STICKLINE(趋势线8>90 AND 趋势线8>REF(趋势线8,1),100,95,15,1),COLORFFFF00;
见顶清仓:FILTER(趋势线8>90 AND 趋势线8<REF(趋势线8,1) AND 主力进<REF(主力进,1),8);
DRAWTEXT( 见顶清仓,90,'逃顶'),COLORYELLOW;
CC:=(趋势线8>=90 AND V12) AND FILTER((趋势线8>=90 AND V12),10);
STICKLINE(大盘资金进场 AND 趋势线8<13,0,30,10,0),COLORRED;
STICKLINE(大盘资金撤走 AND 趋势线8>90,0,30,10,0),COLORGREEN;
STICKLINE(主力进 AND 趋势线8<13,0,40,10,0),COLORFF00FF;
STICKLINE(主力撤 AND 趋势线8>90,0,40,10,0),COLORBLUE;