VAR2:=REF(LOW,1);
VAR3:=SMA(Abs(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;
VAR4:=EMA(IF(CLOSE*1.2,VAR3*10,VAR3/10),3);
VAR5:=LLV(LOW,38);
VAR6:=HHV(VAR4,38);
VAR7:=IF(LLV(LOW,90),1,0);
VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;
STICKLINE(1,VAR8,0,8,1),coloryellow,NOTITLE;//用黄色8宽度空心柱画出主力吸筹量能指数高度
DD:=VAR8>5;
主力吸筹量能指数:VAR8,coloryellow;
DRAWTEXT(主力吸筹量能指数,VAR8+10,VAR8);
买入:=IF((COUNT(DD,2)=2),-20,0);//如果连续2日吸筹量能>5,则返回--20,否则返回0
VAR1S:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);//昨日(LOW+OPEN+CLOSE+HIGH)/4
VAR2S:=SMA(ABS(LOW-VAR1S),13,1)/SMA(MAX(LOW-VAR1S,0),10,1);//最低价-VAR1的绝对值的13日[1日权重]移动平均/最低价-VAR1和0的较大值的10日[1日权重]移动平均
VAR3S:=EMA(VAR2S,10);//VAR2S的10日滑动平均
VAR4S:=LLV(LOW,38);//38日内最低价的最低值
VAR5S:=EMA(IF(LOW<=VAR4S,VAR3S,0),3);//昨日最低价<=VAR4S,返回VAR3S,否则返回0的3日平滑均价
主力进场:=IF(VAR5S>REF(VAR5S,1),VAR5S,0)*1.1,LINETHICK1,colorblue;
洗盘:IF(VAR5S
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;
VC:=(C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100;
V11:=3*SMA(VC,5,1)-2*SMA(SMA(VC,5,1),3,1);
趋势线: EMA(V11,3),linethick1,colorlicyan;
V12:=(趋势线-REF(趋势线,1))/REF(趋势线,1)*100;
准备现金:=STICKLINE(趋势线<=13,0,8,5,0),colormagenta;
AA:=(趋势线<=13) AND FILTER((趋势线<=13),15);
DRAWTEXT (AA,180,'候'),colorblue;
STICKLINE(AA,175,80,1,0),colorblue;
买入股票: =STICKLINE(趋势线<=13 AND V12>13,0,16,5,0),COLOR0099FF;
BB:= 趋势线<=13 AND V12>13 AND FILTER((趋势线<=13 AND V12>13),10);
DRAWICON(BB,220,1);
DRAWTEXT (BB,210,'买'),colorlired;
STICKLINE(BB,200,0,1,1),colorlired;
卖临界:STICKLINE(趋势线>90 AND 趋势线>REF(趋势线,1),95,98,15,1),colorgreen;
见顶清仓:=FILTER(趋势线>90 AND 趋势线
DRAWTEXT(见顶清仓,趋势线*1.5,'逃'),coloryellow;
STICKLINE(见顶清仓,趋势线*1.15,1,1),coloryellow;