AC加速-精品通达信指标公式源码分享
AO:=MA((HIGH+LOW)/2,5)-MA((HIGH+LOW)/2,34);
AO5:=MA(AO,5);
AC:AO-AO5,LINETHICK0;
STICKLINE(AC>=REF(AC,1),0,AC,2.2,1),COLORRED;
STICKLINE(AC< REF(AC,1),0,AC,2.2,1),COLORGREEN;
AC1:=REF(AC,1);
BUY1:=REF(AC,3)<REF(AC1,3) AND REF(AC,2)<REF(AC1,2) AND REF(AC,2)<REF(AC,3) AND REF(AC,1)>REF(AC1,1) AND AC>AC1 AND COUNT(AC>0,4)=4;
DRAWTEXT(BUY1,AC,'B'),COLORWHITE;
DRAWICON(BUY1,AC,1);
BUY2:=COUNT(AC<0,4)=4 AND REF(AC,3)<REF(AC1,3) AND COUNT(AC>AC1,3)=3;
DRAWTEXT(BUY2,AC, 'B'),COLORWHITE;
DRAWICON(BUY2,AC,1);
BUY3:=REF(AC,3)<REF(AC1,3) AND REF(AC,2)<REF(AC1,2) AND REF(AC,2)<REF(AC,3) AND COUNT(AC>AC1,2)=2 AND REF(AC,1)<0 AND AC>0;
DRAWTEXT(BUY3,AC, 'B'),COLORWHITE;
DRAWICON(BUY3,AC,1);
BUY4:=REF(AC,4)<REF(AC1,4) AND REF(AC,3)<REF(AC1,3) AND REF(AC,3)<REF(AC,4) AND COUNT(AC>AC1,3)=3 AND REF(AC,1)<0 AND AC>0;
DRAWTEXT(BUY4,AC, 'B'),COLORWHITE;
DRAWICON(BUY4,AC,1);
S1:=REF(AC,3)>REF(AC1,3) AND REF(AC,2)>REF(AC1,2) AND REF(AC,2)>REF(AC,3) AND REF(AC,1)<REF(AC1,1) AND AC<AC1 AND COUNT(AC<0,4)=4;
DRAWTEXT(S1,AC,'S'),COLORWHITE;
DRAWICON(S1,AC,2);
S2:=COUNT(AC>0,4)=4 AND REF(AC,3)>REF(AC1,3) AND COUNT(AC<AC1,3)=3;
DRAWTEXT(S2,AC,'S'),COLORWHITE;
DRAWICON(S2,AC,2);
S3:=REF(AC,3)>REF(AC1,3) AND REF(AC,2)>REF(AC1,2) AND REF(AC,2)>REF(AC,3) AND COUNT(AC<AC1,2)=2 AND REF(AC,1)>0 AND AC<0;
DRAWICON(S3,AC,2);
版权声明
本文版权归掌上指标所有。
未经许可,不得转载,转载请注明出处!