将价格主图公式改为通达信使用
2020/1/31 18:01:44
公式编写说明:
各位好,源码:N1:=13;N2:=34;N3:=55;MA1:MA(C,N1),COLORWHITE;MA2:MA(C,N2),COLORYELLOW;MA3:MA(C,N3),COLORMAGENTA;VC1:N1*REF(MA1,1)-REF(SUM(C,N1-1),1),COLORWHITE,LINETHICK0;VC2:N2*REF(MA2,1)-REF(SUM(C,N2-1),1),COLORYELLOW,LINETHICK0;VC3:N3*REF(MA3,1)-REF(SUM(C,N3-1),1),COLORMAGENTA,LINETHICK0;GT1:=CROSS(C,VC1);GT2:=CROSS(C,VC2);GT3:=CROSS(C,VC3);DRAWICON(GT1,VC1,7),ALIGN1;DRAWICON(GT2,VC2,7),ALIGN1;DRAWICON(GT3,VC3,7),ALIGN1;DRAWTEXT(GT1,L,NUMTOSTRN(VC1,2),5),COLORWHITE;DRAWTEXT(GT2,L,NUMTOSTRN(VC2,2),15),COLORYELLOW;DRAWTEXT(GT3,L,NUMTOSTRN(VC3,2),25),COLORMAGENTA;
公式源码示例:
N1:=13;N2:=34;N3:=55;
MA1:MA(C,N1),COLORWHITE;
MA2:MA(C,N2),COLORYELLOW;
MA3:MA(C,N3),COLORMAGENTA;
VC1:N1*REF(MA1,1)-REF(SUM(C,N1-1),1),COLORWHITE,LINETHICK0;
VC2:N2*REF(MA2,1)-REF(SUM(C,N2-1),1),COLORYELLOW,LINETHICK0;
VC3:N3*REF(MA3,1)-REF(SUM(C,N3-1),1),COLORMAGENTA,LINETHICK0;
GT1:=CROSS(C,VC1);
GT2:=CROSS(C,VC2);
GT3:=CROSS(C,VC3);
DRAWICON(GT1,VC1,1);
DRAWICON(GT2,VC2,1);
DRAWICON(GT3,VC3,1);
DRAWTEXT(GT1,L,CON2STR(VC1,2)),COLORWHITE;
DRAWTEXT(GT2,L,CON2STR(VC2,2)),COLORYELLOW;
DRAWTEXT(GT3,L,CON2STR(VC3,2)),COLORMAGENTA;
看股 吧公式 www.kangub a.com
其它股票公式列表