{指標介紹:主力資金,操作線同時在50上方上漲可期,散戶線上穿50代表走弱。}
VAR1:=LLV(LOW,13);
VAR2:=HHV(HIGH,13);
VAR3:=SMA((CLOSE-VAR1)/(VAR2-VAR1)*100,5,1);
VAR4:=SMA((VAR2-CLOSE)/(VAR2-VAR1)*100,5,1);
DRAWBAND(VAR3,RGB(155,50,50),50,RGB(0,100,50));
主力:VAR3,COLORRED;
散戶:VAR4,COLORGREEN;
VAR5:=SMA(MAX(CLOSE-REF(CLOSE,1),0),5,1)/SMA(Abs(CLOSE-REF(CLOSE,1)),5,1)*100;
操作:EMA(VAR5,3),COLORYELLOW;
STICKLINE(C,90,90,1,0),COLOR3C3CFF;
STICKLINE(C,50,50,1,0),COLORYELLOW;
STICKLINE(C,10,10,1,0),COLORCYAN;
N:=20;
JJ:=(HIGH+LOW+CLOSE)/3;
QJ0:=vol/IF(HIGH=LOW,4,HIGH-LOW);
QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(CLOSE,OPEN)),QJ0*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW)));
QJ2:=IF(CAPITAL=0,QJ0*(MIN(OPEN,CLOSE)-LOW),QJ0*IF(HIGH=LOW,1,(JJ-MIN(CLOSE,OPEN))));
QJ3:=IF(CAPITAL=0,QJ0*(HIGH-MAX(OPEN,CLOSE)),QJ0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));
QJ4:=IF(CAPITAL=0,QJ0*(MAX(CLOSE,OPEN)-JJ),QJ0*IF(HIGH=LOW,1,(MAX(CLOSE,OPEN)-JJ)));
大單動向:20* ((QJ1+QJ2)-(QJ3+QJ4))/IF(CAPITAL=0,100000000,1000000),COLOR00AAAA,LINETHICK;
DX:=(MA(大單動向,5)*N)*2;
STICKLINE(大單動向>0,50,50+大單動向*8.5,2.5,0),COLORYELLOW;
STICKLINE(大單動向<0,50,50+大單動向*8.5,2.5,0),COLORBLUE;
漲跌:=IF(BETWEEN(C,REF(C,1),H),VOL,0);
動因:=IF(BETWEEN(C,REF(C,1),L),VOL,0);
CC2:=IF(漲跌 AND 動因,0,VOL/3);
漲跌動因:3*(漲跌-(動因+CC2))/IF(CAPITAL<1,SUM(INDEXV,71),CAPITAL),LINETHICK0;
STICKLINE(漲跌動因>0,10,10+漲跌動因*28.5,2,0 ),COLORYELLOW;
STICKLINE(漲跌動因<0,10,10+漲跌動因*28.5,2,0 ),COLORBLUE;