网友求助:
[通达信] 通达信形态下降线画法,请高手帮修改下
在网上得到个上升源码,但是我想把他编成下降源,小弟水平有限,呵呵,所以请高手,版主,懂的朋友
帮下忙.谢谢.
{参数名:N,最小:2,最大:999,缺省:145}
T:=MAX(REF(H,N-1),HHV(H,N));
A1:=CONST(IF(TOTALBARSCOUNT=1,H,T));
B1:=CONST(IF(TOTALBARSCOUNT<N,TOTALBARSCOUNT,N));
Z:=CURRBARSCOUNT;K:=CONST(LLVBARS(L,B1));
D:=DRAWLINE(Z=K+1,L,Z=1,REF(L,K),1);
五:DRAWLINE(Z=K+1,L,Z=2,D+(A1-D)*0.50,1),COLORYELLOW,LINETHICK2;
六:DRAWLINE(Z=K+1,L,Z=2,D+(A1-D)*0.60,1),COLORLIBLUE;
解答如下:
{参数名:N,最小:2,最大:999,缺省:145}
N:=145;
T:=MIN(REF(L,N-1),LLV(L,N));
A1:=CONST(IF(TOTALBARSCOUNT=1,L,T));
B1:=CONST(IF(TOTALBARSCOUNT<N,TOTALBARSCOUNT,N));
Z:=CURRBARSCOUNT;K:=CONST(HHVBARS(H,B1));
D:=DRAWLINE(Z=K+1,H,Z=1,REF(H,K),1);
一:DRAWLINE(Z=K+1,H,Z=2,D+(A1-D)*0.10,1);
二:DRAWLINE(Z=K+1,H,Z=2,D+(A1-D)*0.20,1);
三:DRAWLINE(Z=K+1,H,Z=2,D+(A1-D)*0.30,1);
四:DRAWLINE(Z=K+1,H,Z=2,D+(A1-D)*0.40,1);
五:DRAWLINE(Z=K+1,H,Z=2,D+(A1-D)*0.50,1),COLORRED,LINETHICK2;
六:DRAWLINE(Z=K+1,H,Z=2,D+(A1-D)*0.60,1),COLORLIBLUE;
七:DRAWLINE(Z=K+1,H,Z=2,D+(A1-D)*0.70,1);
八:DRAWLINE(Z=K+1,H,Z=2,D+(A1-D)*0.80,1);
九:DRAWLINE(Z=K+1,H,Z=2,D+(A1-D)*0.90,1);
十:DRAWLINE(Z=K+1,H,Z=2,D+(A1-D)*1.10,1);