通达信线上牛通用源码,适用任何时间段包括分时
源码如下:
{参数: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;
{/用法:短线看AD,中线看MAD;买卖看线柱。}
{/通用源码,适合任何时间段包括分时}
日线图: