主力资金占比公式
N:=3;
M:=8;
AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
ÂòÁ¿:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),LINETHICK0,COLORRED;
ÂôÁ¿:=IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-AA*(HIGH-LOW),0-VOL/2)),LINETHICK0,COLORCYAN;
½ø³öÁ¿:=ÂòÁ¿+ÂôÁ¿,COLOR00FFFF;
STICKLINE(½ø³öÁ¿<0,0,½ø³öÁ¿,1,0),COLORFF6600;
STICKLINE(½ø³öÁ¿<0,0,½ø³öÁ¿,1,0),COLORFF9900;
STICKLINE(½ø³öÁ¿<0,0,½ø³öÁ¿,1.0,0),COLORFFCC00;
STICKLINE(½ø³öÁ¿<0,0,½ø³öÁ¿,0.5,0),COLORGREEN;
STICKLINE(½ø³öÁ¿>0,0,½ø³öÁ¿,1,0),COLOR000099;
STICKLINE(½ø³öÁ¿>0,0,½ø³öÁ¿,1,0),COLOR0000CC;
STICKLINE(½ø³öÁ¿>0,0,½ø³öÁ¿,1.0,0),COLOR0000FF;
STICKLINE(½ø³öÁ¿>0,0,½ø³öÁ¿,0.5,0),COLORCC66FF;
ÍòÊÖ:VOL/10000,LINETHICK0,NODRAW;
BB:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
Ö÷¶¯Âò:=IF(CLOSE>OPEN,BB*(HIGH-LOW),IF(CLOSE<OPEN,BB*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
Ö÷Âò:Ö÷¶¯Âò/10000,COLORRED,NODRAW;
Ö÷¶¯Âô:=IF(CLOSE>OPEN,0-BB*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-BB*(HIGH-LOW),0-VOL/2));
Ö÷Âô:-Ö÷¶¯Âô/10000,COLORGREEN,NODRAW;
Ö÷¾»¶î:(Ö÷¶¯Âò+Ö÷¶¯Âô)/10000,COLORYELLOW,NODRAW;
VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
Âò:=IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),COLORRED;
Âô:=IF(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-VAR1*(HIGH-LOW),0-VOL/2)),COLOR00FF00;
ÂòÂô²î:=(Âò+Âô);
ÂòÂô±È:ABS(Âò/Âô);
NÈÕÄÚ¾»Á÷Èë:SUM(ÂòÂô²î,N), LINETHICK2,COLORGREEN;
Á÷Èë:IF (NÈÕÄÚ¾»Á÷Èë>REF(NÈÕÄÚ¾»Á÷Èë,1),NÈÕÄÚ¾»Á÷Èë,DRAWNULL),COLORMAGENTA,LINETHICK2;
MÈÕÄÚ·ºìÌìÊý:COUNT(ÂòÂô²î>0,M);
Á¬ºìÌìÊý:BARSLASTCOUNT(ÂòÂô²î>0);
Á÷ͨÅÌ:=CAPITAL/1000000;
Õ¼Å̱È:Ö÷¾»¶î/Á÷ͨÅÌ;