以下是通达信自动画三角形源码附图指标公式(无源码的请下载附件导入)
{三角形}
N:=5;
A1:=BACKSET(ISLASTBAR,PEAKBARS(1,N,1)+1);
A2:=A1>REF(A1,1);
B1:=BACKSET(ISLASTBAR,PEAKBARS(1,N,2)+1);
B2:=B1>REF(B1,1);
C1:=BACKSET(ISLASTBAR,PEAKBARS(1,N,3)+1);
C2:=C1>REF(C1,1);
A11:=BACKSET(ISLASTBAR,TROUGHBARS(2,N,1)+1);
A21:=A11>REF(A11,1);
B11:=BACKSET(ISLASTBAR,TROUGHBARS(2,N,2)+1);
B21:=B11>REF(B11,1);
C11:=BACKSET(ISLASTBAR,TROUGHBARS(2,N,3)+1);
C21:=C11>REF(C11,1);
①:dRAWLINE(B2,H,A2,H,0),COLORBLUE;
②:dRAWLINE(C2,H,B2,H,0),COLORCC6633;
③:IF(A1,PEAK(1,N,1),DRAWNULL),COLORFFAA00;
④:dRAWLINE(C2,H,A2,H,0),COLORLIBLUE;
⑤:dRAWLINE(B21,L,A21,L,0),COLORYELLOW;
⑥:dRAWLINE(C21,L,B21,L,0),COLORFF00FF;
⑦:dRAWLINE(C21,L,A21,L,0),COLORBROWN;
⑧:IF(A11,TROUGH(2,N,1),DRAWNULL),COLORRED;
1110500269.gif
|