市场盈亏比YCS通达信副图 源码 测试图_通达信软件_通达信指标

底部捉妖 通达信副图指标 源码分析

CYC13:=0.01*EMA(AMOUNT,13)/EMA(V,13);

CYS:(C-CYC13)/CYC13*100,COLORWHITE,LINETHICK2;

绝对风险区:10,COLORRED,DOTLINE,LINETHICK1;

风险区:5,COLORMAGENTA,DOTLINE,LINETHICK1;

中线值:0,COLORYELLOW,DOTLINE,LINETHICK2;

买入区:-5,COLORLIBLUE,DOTLINE,LINETHICK1;

安全区:-10,COLORGREEN,DOTLINE;

NOTEXT:IF(CYS>=0,CYS,DRAWNULL),COLORRED,LINETHICK2;

NOTEXT2:IF(CYS>=10,CYS,DRAWNULL),COLORYELLOW,LINETHICK2;

{N:=5;

底背离:=REF(C,BARSLAST(REF(FILTER(BACKSET(REF(CYS,N)=LLV(CYS,2*N+1),N+1),N) AND CYS=LLV(CYS,N+1),1))+1)>C AND REF(CYS,BARSLAST(REF(FILTER(BACKSET(REF(CYS,N)=LLV(CYS,2*N+1),N+1),N) AND CYS=LLV(CYS,N+1),1))+1)<CYS AND FILTER(BACKSET(REF(CYS,N)=LLV(CYS,2*N+1),N+1),N) AND CYS=LLV(CYS,N+1),COLORWHITE,NODRAW;

DRAWLINE(FILTER(BACKSET(REF(CYS,N)=LLV(CYS,2*N+1),N+1),N) AND CYS=LLV(CYS,N+1),CYS,FILTER(底背离>0,5),CYS,0),COLORYELLOW;

DRAWTEXT(底背离,CYS,'↑底背离'),COLORYELLOW;

顶背离:=REF(C,BARSLAST(REF(FILTER(BACKSET(REF(CYS,N)=HHV(CYS,2*N+1),N+1),N) AND CYS=HHV(CYS,N+1),1))+1)<C AND REF(CYS,BARSLAST(REF(FILTER(BACKSET(REF(CYS,N)=HHV(CYS,2*N+1),N+1),N) AND CYS=HHV(CYS,N+1),1))+1)>CYS AND FILTER(BACKSET(REF(CYS,N)=HHV(CYS,2*N+1),N+1),N) AND CYS=HHV(CYS,N+1),COLORGREEN,NODRAW;

DRAWLINE(FILTER(BACKSET(REF(CYS,N)=HHV(CYS,2*N+1),N+1),N) AND CYS=HHV(CYS,N+1),CYS,FILTER(顶背离>0,5),CYS,0),COLORYELLOW;

DRAWTEXT(顶背离,CYS,'↓顶背离'),COLORYELLOW;}

通达信机构牛指标公式源码副