TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,240,1)))));
MTIME:=MOD(FROMOPEN,TOTAL);
CTIME:=IF(MTIME<0.5,TOTAL,MTIME);
VVOL:IF(CURRBARSCOUNT=1,VOL*TOTAL/CTIME,DRAWNULL),NODRAW;
STICKLINE(CURRBARSCOUNT=1 && (SETCODE=0 || SETCODE=1),VVOL,0,-1,-1),COLOR00C0C0;
VOLUME:VOL,VOLSTICK;
MAVOL1:MA(VOLUME,M1);
MAVOL2:MA(VOLUME,M2);
MAVOL3:MA(VOLUME,M3),LINETHICK2;
IF(CROSS(0.9,1/VOL*1000>0.01 AND "KDJ.J"<0),VOLUME*1.5,0),COLORBLUE,LINETHICK1;
{立桩}
V2:IF(CURRBARSCOUNT=1,VOL*240/FROMOPEN/REF(VOL,1)-1,VOL/REF(VOL,1)-1),NODRAW,COLORRED;
STICKLINE(V2>=1,0,VOL,0.3,0),COLORLIGRAY;
额:AMOUNT/100000000,VOLSTICK,COLORLIBLUE;
VAR1:=AMOUNT/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
流入亿:IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),AMOUNT/2))/100000000,COLORRED,NODRAW;
流出亿:IF(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-VAR1*(HIGH-LOW),0-AMOUNT/2))/100000000,COLORMAGENTA,NODRAW;
差亿:流入亿+流出亿,COLORLIRED,NODRAW;
{量能饱和度}
N1:=10,100,40;
N2:=N1*1.05;
N3:=N1+3;
SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));
饱和度:IF(SAT>1,1,SAT)*100,COLORLIBLUE,NODRAW;
中点:=REFDATE(HHV(V,100)/2,DATE);{量能饱和的变色切换}
STICKLINE(CURRBARSCOUNT=N1,中点*1.9,中点*1.5,100,1),COLOR00DDDD;
STICKLINE(CURRBARSCOUNT=N1,中点*1.88,中点*1.52,饱和度,0),COLOR0033FF;
STICKLINE(CURRBARSCOUNT=N1,中点*1.82,中点*1.58,饱和度,0),COLOR0077FF;
STICKLINE(CURRBARSCOUNT=N1,中点*1.76,中点*1.64,饱和度,0),COLOR0099FF;
STICKLINE(CURRBARSCOUNT=N1,中点*1.7,中点*1.7,饱和度,0),COLOR00DDFF;
DRAWTEXT(CURRBARSCOUNT=N3,中点*1.82,'饱和度'),COLORBLUE;
{地量}
总交易日:=BARSCOUNT(CLOSE);
X:=CONST(DATE);
Y:=IF(DATE<X, 240, FROMOPEN);
STICKLINE((VOL/Y*240)=CONST(LLV(VOL,总交易日)),CONST(HHV(VOL,70)),0,0.5,0),COLOR006432;
{橙黄见底}
VAR2:=(((CLOSE - MA(CLOSE,6)) / MA(CLOSE,6)) * 100);
VAR3:=(((CLOSE - MA(CLOSE,12)) / MA(CLOSE,12)) * 100);
VAR4:=(((CLOSE - MA(CLOSE,24)) / MA(CLOSE,24)) * 100);
VAR5:=(((VAR2 + (2 * VAR3)) + (3 * VAR4)) / 6);
VAR6:=MA(VAR5,3);
STICKLINE((VAR6 <= (0 - 10)),0,(0 - 20),3.5,0),COLOR0044FF;
STICKLINE((VAR6 <= (0 - 10)),0,(0 - 20),2.5,0),COLOR0088FF;
STICKLINE((VAR6 <= (0 - 10)),0,(0 - 20),3,0),COLOR00AAFF;
{黄框}
中点1:=REFDATE(HHV(V,100)/2,DATE);
VAR4J:=EXPMA(CLOSE,9);
AA1:=EXPMA(VAR4J*0.89,5);
JRS1:=CROSS(C,AA1) OR CROSS(L,AA1);
XG1:=CROSS(JRS1,0.8);
STICKLINE(XG1,0,中点1*0.1,2,2 ),COLOR00AAFF;{黄框};
{绿框}
VAR2J:=CLOSE*VOL;
VAR3J:=EMA((EXPMA(VAR2J,3)/EXPMA(VOL,3)+EXPMA(VAR2J,6)/EXPMA(VOL,6)+EXPMA(VAR2J,12)
/EXPMA(VOL,12)+EXPMA(VAR2J,24)/EXPMA(VOL,24))/4,13);
AA2:=VAR3J*0.94,COLORYELLOW;
JRS:=CROSS(C,AA2);
XG:=CROSS(JRS,0.8);
STICKLINE(XG,0,中点1*0.1,2,1 ),COLORGREEN;{绿框}; |