通达信主力能量公式
指标原码
主力:=L2_AMO(0,2)/10000.0;
大户:=L2_AMO(1,2)/10000.0;
中户:=L2_AMO(2,2)/10000.0;
散户:=L2_AMO(3,2)/10000.0;
均量:=(主力+大户+中户+散户)/4;
主力能量:(主力-均量),COLORRED,NODRAW;
主力能量柱:STICKLINE(主力能量,0,ABS(主力能量),2,0),COLORRED;大户能量:(大户-均量),NODRAW;
大户能量柱:STICKLINE(大户能量,ABS(主力能量),ABS(主力能量)+ABS(大户能量),2,0),COLORYELLOW;{中户持仓量}
中户能量:(中户-均量),NODRAW;
中户能量柱:STICKLINE(中户能量,ABS(主力能量)+ABS(大户能量),ABS(主力能量)+ABS(大户能量)+ABS(中户能量),2,0),COLORMAGENTA;{散户持仓量}
散户能量:(散户-均量),NODRAW;
散户能量柱:STICKLINE(散户能量,ABS(主力能量)+ABS(大户能量)+ABS(中户能量),ABS(主力能量)+ABS(大户能量)+ABS(中户能量)+ABS(散户能量),2,0),COLORGREEN;{主导力量}
DRAWTEXT_FIX(ISLASTBAR=1 AND 主力能量>=0,0.89,0.8,0,'[主力增仓]'),COLORRED;
DRAWTEXT_FIX(ISLASTBAR=1 AND 主力能量<0,0.89,0.8,0,'[主力减仓]'),COLORGREEN;
DRAWTEXT_FIX(ISLASTBAR=1 AND 大户能量>=0,0.89,0.6,0,'[大户增仓]'),COLORRED;
DRAWTEXT_FIX(ISLASTBAR=1 AND 大户能量<0,0.89,0.6,0,'[大户减仓]'),COLORGREEN;
DRAWTEXT_FIX(ISLASTBAR=1 AND 中户能量>=0,0.89,0.4,0,'[中户增仓]'),COLORRED;
DRAWTEXT_FIX(ISLASTBAR=1 AND 中户能量<0,0.89,0.4,0,'[中户减仓]'),COLORGREEN;
DRAWTEXT_FIX(ISLASTBAR=1 AND 散户能量>=0,0.89,0.2,0,'[散户增仓]'),COLORRED;
DRAWTEXT_FIX(ISLASTBAR=1 AND 散户能量<0,0.89,0.2,0,'[散户减仓]'),COLORGREEN;
量3:MA(均量,3);
量7:MA(均量,7);