大智慧简单乖离指标公式

大智慧简单乖离指标公式:
MA20:=MA(C,20);

MA30:=MA(C,30);

QSXS:=MA20>MA30 AND MA20>REF(MA20,1) AND MA30>REF(MA30,1);

N1:=BArslAst(crOSS(C,MA(C,5)));

N2:=BARSLAST(CROSS(MA(C,5),C));

HM:IF(N1<N2,N1+1,0)*QSXS+100,COLOR00ff00;

STICKLINE(hm,100,hm,5,0),colorff8899;

MAZ:=(h+l+c+c)/4;

个股趋势:C/MA(C,5)*100,COLOryellow,LINETHICK1,layer3;

个股脉动:REF(MAZ/MA(MAZ,5),1)*100,COLORred,LINETHICK3,layer3;

aa:=个股趋势;

bb:=个股脉动;

MA3:=MA(MAZ,3)/MA(C,30)*100;

MA10:=MA(MAZ,10)/MA(C,30)*100;

100;

DTJC:=(CROSS(AA,BB) OR CROSS(AA,100)) AND AA>100;

DTPL:=MA3>100 AND MA10>100;

买点:IF(DTJC AND DTPL,105,100),POINTDOT,COLORRED;

STICKLINE(买点>100,100,103,2,0),COLORred;

{N:2,5,3;}

N:=3;

ZF:=(C/REF(C,1)-1)*100;

Tddf:=(L/REF(C,1)-1)*100<=-5 AND (REF(HHV(H,5),1)/L-1)*100>=10;

白银:=(TDDF AND QSXS);

bm01:=HM=101 AND ZF>=0 AND C>O AND QSXS;

黄金:=bm01;

KX1:=ZF<=-N AND C<O;

XDSJ:=BARSLAST(KX1);

KX2:=ZF>=N AND C>O;

JBY:=KX2 AND XDSJ<=2 AND C>=REF(O*0.99,XDSJ) AND ZF>Abs(REF(ZF,XDSJ)*0.99);

金包银:=IF(FILTER(JBY,1) AND QSXS,5,0);

{以下设置副图显示方式}

STICKLINE(白银,98,100,2,0),COLORFFFF00,layer7;

drawtext(白银,98,'吸'),COLORFFFF00;

STICKLINE(黄金,98,100,2,0),COLOR00FFFF,layer7;

drawtext(黄金,98,'启'),COLOR00FFFF;

drawtext(金包银,97,'回启'),colorwhite;