n:=19;
均价:=(2*C+(H-L)/2+L+o)/4;
R:=(2*L+3*均价)/5;R1:=(2*H+3*均价)/5;
VAR1:=vol/((HIGH-LOW)*2-Abs(CLOSE-(r+r1)/2));
主买:=IF(CLOSE>(r+r1)/2,VAR1*(HIGH-LOW),IF(CLOSE<(r+r1)/2,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2))/10000,LINETHICK0;
主卖:=IF(CLOSE>(r+r1)/2,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<(r+r1)/2,0-VAR1*(HIGH-LOW),0-VOL/2))/10000,LINETHICK0,COLORGREEN;
买卖差:(主买+主卖),linethick;
{ _飞狐股票指标公式}
成交量比%:主买/(VOL/10000)*100,COLORGREEN,linethick;
跟庄线:ma((主买),3),COLORWHITE,LINETHICK1;
天:REF(HHV(跟庄线,N*2/3),1),COLOR7F00FF;
地:REF(llV(跟庄线,N),1),COLORFFCCAA;
中轨:=(天+地)/2,COLORYELLOW;
动量线:eMA(主买,(N+N*2/3)/2),COLORYELLOW,LINETHICK2;
M8:=MA(主买,8),COLORWHITE,LINETHICK1;
M13:=MA(主买,13);
M21:=MA(主买,21);
生命线:ma((M8+M13+M21)/3,(8+13+21)/3),COLORRED,LINETHICK2;
PARTLINE(动量线<生命线,动量线),COLOR00bb00,LINETHICK2;