通达信线上牛公式(通用源码,适用任何时间段包括分时)
{参数:N:0 100 5; M:0 100 21参数可调N越小灵敏度越高;M亦同。}
以上参数请自行设定
LC:=REF(C,1);
DF:=C-IF(C>LC,MIN(L,LC),MAX(H,LC));
AD:SUM(IF(C=LC,0,DF),0),LINETHICK1;
AD5:EXPMEMA(AD,N),COLORYELLOW;
MAD:EXPMEMA(AD5,M),COLORRED;
STICKLINE(AD>AD5,AD,AD5,0.001,0),COLORWHITE;
STICKLINE(AD5>MAD,AD5,MAD,0.001,0),COLORRED;
STICKLINE(AD<MAD,AD5,MAD,0.001,0),COLORCYAN;
STICKLINE((AD<AD5 AND AD5<MAD),AD,AD5,0.001,0),COLORGREEN;
632555595.jpg
63366141.jpg
|