RSV:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
K:=SMA(RSV,5,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
STICKLINE(CROSS(J,7.6),HHV(V,20),0,2.38,0),LINETHICK4,COLORWHITE;
STICKLINE(CROSS(J,7.6),HHV(V,20),0,1.5,1),LINETHICK4,COLORWHITE;
AT:=IF(CAPITAL=0,AMOUNT/100000000,VOL/CAPITAL*100);
ATM1:=EMA(AT,6);
ATM2:=MA(AT,19);
阶段地量:=AT<REF(LLV(AT,25),1) && ATM1<ATM2;
STICKLINE(阶段地量,0,HHV(V,15),2.38,0),COLOR009900;
STICKLINE(阶段地量,0,HHV(V,15),0.35,0),COLOR00FF00;
VVOL:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL)COLORWHITE,NODRAW;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,VVOL,0,-1,-1),COLOR00C0C0;
VOLUME:VOL,VOLSTICK;
启动线:MA(VOLUME,5)COLORYELLOW;
洗盘线:MA(VOLUME,35)COLORMAGENTA;
异动线:MA(VOLUME,135)COLORGREEN;
A:=(启动线 CROSS 洗盘线);
BB:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
买:=BUYVOL;
卖:=SELLVOL;
主动买:=IF(CLOSE>OPEN,BB*(HIGH-LOW),IF(CLOSE<OPEN,BB*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主买:主动买/10000,COLORRED,LINETHICK0;
主动卖:=IF(CLOSE>OPEN,0-BB*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-BB*(HIGH-LOW),0-VOL/2));
主卖:-主动卖/10000,COLORGREEN,LINETHICK0;
参与度:主买/(主买+主卖),LINETHICK0;
WW:=VOL/REF(VOL,1)>2;
GG:=C>O;
STICKLINE ((WW AND GG) OR (C>REF(C,1) AND C=O AND WW),0,VOL,0.01225,0),COLORGREEN;
QQ:=C<O;
STICKLINE ((WW AND QQ) OR (C<REF(C,1) AND C=O AND WW),0,VOL*0.95,0.16,0),COLORRED;
0,COLORRED;
{预测成交量}
VVOL1:=IF(CURRBARSCOUNT=1 AND PERIOD=5,V*240/FROMOPEN,DRAWNULL),NODRAW;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,VVOL1,0,-1,-1),COLOR00C0C0;
{柱体买卖}
DRAWTEXT_FIX(1,0.00,0,0,'白烛建仓★黄烛加仓★粉烛操盘★红多绿空☆蓝烛清仓☆尾绿出货☆ BY:CHH322')COLORYELLOW;
DRAWTEXT_FIX(1,0.00,0.05,0,'')COLOR00FF00;
VAR1:=(VOL / (((HIGH - LOW) * 2) - ABS((CLOSE - OPEN))));
成交:=VOL;
买盘:=IF((CLOSE > OPEN),(VAR1 * (HIGH - LOW)),IF((CLOSE < OPEN),(VAR1 * ((HIGH - OPEN) + (CLOSE - LOW))),(VOL / 2)));
卖盘:=IF((CLOSE > OPEN),(0 - (VAR1 * ((HIGH - CLOSE) + (OPEN - LOW)))),IF((CLOSE < OPEN),(0 - (VAR1 * (HIGH - LOW))),(0 - (VOL / 2))));
买卖差:=(买盘 + 卖盘);
STICKLINE((VOL > 0),VOL,0,3,1),COLORFFFFFF;
STICKLINE((买卖差 > 0),0,买卖差,3,0),COLOR0000FF;
STICKLINE((买卖差 < 0),0,买卖差,1,0),LINETHICK1,COLOR66FF00;
量比1:=(VOL / MA(VOL,5));
VAR10:=买盘;
VAR20:=卖盘;
JX1:=BARSSINCE(买盘);
JY1:=IF(((121 > JX1) AND (JX1 > 0)),JX1,120);
JY2:=IF(((4 > JX1) AND (JX1 > 0)),JX1,3);
VAR30:=MA(VOL,JY2);
动神:=买盘;
鬼力:=VAR20;
神比:=(动神 / VAR30);
鬼比:=(鬼力 / VAR30);
VAR2:=(HIGH - LOW);
VAR3:=ABS((OPEN - CLOSE));
VAR4:=(HIGH - IF((CLOSE > OPEN),CLOSE,OPEN));
VAR5:=(IF((CLOSE > OPEN),OPEN,CLOSE) - LOW);
VAR6:=((VAR3 / VAR2) * VOL);
VAR7:=((VAR4 / VAR2) * VOL);
VAR8:=((VAR5 / VAR2) * VOL);
VAR9:=IF(((VOL / CAPITAL) > 0.001),1,EXP(ABS(LOG(((VOL / CAPITAL) * 100)))));
VARA:=(((CLOSE - MA(CLOSE,5)) / MA(CLOSE,5)) * 100);
VARB:=(((MA(CLOSE,5) > MA(CLOSE,10)) AND (MA(CLOSE,10) > MA(CLOSE,30))) AND (MA(CLOSE,30) > MA(CLOSE,60)));
VARC:=((MA(CLOSE,5) < MA(CLOSE,10)) AND (MA(CLOSE,10) < MA(CLOSE,30)));
VARD:=REF(CLOSE,1);
VARE:=((SMA(MAX((CLOSE - VARD),0),6,1) / SMA(ABS((CLOSE - VARD)),6,1)) * 100);
VAR40:=((IF((((VAR6 >= VAR7) AND (VAR6 >= VAR8)) AND (CLOSE > OPEN)),VAR6,动神) + 动神) / 2);
VAR41:=((IF(((VAR7 > VAR6) AND (VAR7 > VAR8)),VAR7,动神) + 动神) / 2);
VAR42:=((IF(((VAR8 > VAR6) AND (VAR8 > VAR7)),VAR8,动神) + 动神) / 2);
VAR50:=((IF((((VAR6 >= VAR7) AND (VAR6 >= VAR8)) AND (CLOSE < OPEN)),VAR6,鬼力) + 鬼力) / 2);
三日上攻:=MA((((VAR40 + VAR41) + VAR42) / 3),JY2);
三日下攻:=MA(VAR50,JY2);
多头:STICKLINE((CLOSE > MA(CLOSE,30)),0,VOL,3,1),COLOR0000FF;
空头:STICKLINE((CLOSE < MA(CLOSE,30)),0,VOL,3,1),COLOR00FF00;
STICKLINE((鬼力 > 0),鬼力,0,3,0),COLORFF3399;
加仓:STICKLINE((((VAR6 >= VAR7) AND (VAR6 >= VAR8)) AND (CLOSE > OPEN)),0,VAR6,3,0),COLOR00FFFF;
减仓:STICKLINE((((VAR6 >= VAR7) AND (VAR6 >= VAR8)) AND (CLOSE < OPEN)),0,VAR6,3,0),COLORFF0000;
洗盘:STICKLINE(((VAR8 > VAR6) AND (VAR8 > VAR7)),0,VAR8,3,0),COLORFFFFFF;
高卖:STICKLINE(((VAR7 > VAR6) AND (VAR7 > VAR8)),0,VAR7,3,0),COLORFF00FF;
相对地量:=STICKLINE(((VAR9 > 2) AND (VOL < (MA(VOL,5) / 2))),0,VOL,3,0);
{柱体加注}
量:V,NODRAW;
倍量:(V/REF(V,1)>=1.91 AND COUNT(C>O,1)) OR (L>REF(H,1) AND COUNT(O>C,1) AND V/REF(V,1)>=1.91),NODRAW,COLOR3366FF;
低量:V<=REF(LLV(V,15),1),NODRAW,COLOR7FFF00;
地量:V<=REF(LLV(V,100),1),NODRAW,COLORRED;
平量:ABS(V-HHV(REF(V,1),5))/HHV(REF(V,1),5)<=0.03 OR ABS(V-REF(V,1))/REF(V,1)<=0.03,NODRAW,COLOR824173;
倍缩:V<=REF(V,1)*0.5,NODRAW,COLOR5C3317;
梯量:COUNT(V>REF(V,1),3)=3 AND COUNT(C>O,3)=3,NODRAW,COLOR9932CD;
缩量涨:COUNT(C>REF(C,1),2)=2 AND COUNT(V<REF(V,1),2)=2,NODRAW,COLOR996600;
DRAWTEXT(倍量,V*1.06,'倍'),COLOR3366FF;
DRAWTEXT(低量,V*1.09,'低'),COLOR7FFF00;
DRAWTEXT(地量,V*1.12,'地'),COLORRED;
DRAWTEXT(平量,V*1.15,'平'),COLOR824173;
DRAWTEXT(倍缩,V*1.06,'缩'),COLOR5C3317;
DRAWTEXT(梯量,V*1.18,'梯'),COLOR9932CD;
DRAWTEXT(缩量涨,V*1.21,'缩涨'),COLOR996600;
STICKLINE(倍量,0,V,0.1,0),COLOR3366FF;
STICKLINE(低量,0,V,0.1,0),COLOR7FFF00;
STICKLINE(地量,0,V,0.1,0),COLORRED;
STICKLINE(平量,0,V,0.1,0),COLOR824173;
STICKLINE(倍缩,0,V,0.1,0),COLOR5C3317;
STICKLINE(梯量,0,V,0.1,0),COLOR9932CD;
STICKLINE(缩量涨,0,V,0.1,0),COLOR996600;
{画线}
趋势:VOL,NODRAW;
MA5:MA(V,5),COLORWHITE; {5日均量线是主力启动线}
MA10:MA(V,10),COLORYELLOW;{10日均量线是主力洗盘线,不同个股不同设置};
DRAWICON(CROSS(MA5, MA10),MA5,1);
DRAWICON(CROSS(MA10, MA5),MA10,2);
H1:CONST(HHV(V,13))DOTLINE,COLORWHITE;