用法说明,跟庄在天地之间,趋势在动量与生命,有了动量才有生命。N为可调整参数,飞狐我设的为19,是动量与生命同步;通达信设为35考虑的是35量线。到底用什么参数自己选择。
飞狐源码
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;