您现在的位置:好股网 >> 股票公式 >> 通达信公式 >> 一键转帖:线的角度(源码、主图、贴图)

线的角度(源码、主图、贴图)


指标功能:[B]国产软件[/B]
指标类型:简体中文
所需积分:0
推荐星级:
授权方式:共享版
公式大小:0 Bytes
更新时间:2011-10-06 08:21:00
公式简介:

N的参数是10
HH20:=CONST(HHV(H,N*3));
LL20:=CONST(LLV(L,N*3));
K:=(HH20-LL20)/(N),NODRAW;
XY:DRAWLINE(CURRBARSCOUNT=N,LL20,CURRBARSCOUNT=1,HH20,0),LINETHICK1,COLORFFFFFF;
YX:DRAWLINE(CURRBARSCOUNT=N,HH20,CURRBARSCOUNT=1,LL20,0),LINETHICK1,COLORFFFFFF;
中位线:(XY+YX)/2,LINETHICK1,COLORFFFFFF;
XX:IF(CURRBARSCOUNT<N+1,HH20,DRAWNULL),LINETHICK1,COLORFFFFFF;
YY:IF(CURRBARSCOUNT<N+1,LL20,DRAWNULL),LINETHICK1,COLORFFFFFF;
STICKLINE(CURRBARSCOUNT=1,HH20,LL20,0,0),COLORFFFFFF;
STICKLINE(CURRBARSCOUNT=N,HH20,LL20,0,0),COLORFFFFFF;
参考标准角:ATAN((HH20-LL20)/(N*K))*57.29633,COLORFFFFFF,NODRAW;
MAN:=MA(C,N),COLORAAAAFF;
DRAWTEXT(CURRBARSCOUNT=N-2,LL20*1.03,'主图画面参考标准角=45°'),COLORAAFFFF;
X角K:=CONST(REF(MAN,1)-MAN)*(CURRBARSCOUNT-1)+CONST(MAN);
MAN角斜线:DRAWLINE(CURRBARSCOUNT=N,X角K,CURRBARSCOUNT=1,X角K,0),LINETHICK2,COLOR00FFFF;
MAN角水平线:IF(CURRBARSCOUNT<=N,CONST(REF(MAN角斜线,N-1)),DRAWNULL),LINETHICK2,COLOR00FFFF;
STICKLINE(CURRBARSCOUNT=1,CONST(MAN角水平线),MAN角斜线,0.03,0),COLOR00FFFF;
MAN线:MAN,LINETHICK2,COLORAAAAFF;
MAN角:CONST(ATAN((MAN角斜线-MAN角水平线)/(N*K))*57.29633),NODRAW;

{三角形-飞狐版-by舍得快乐}
N的参数是10
ZQ:=DATACOUNT-BARPOS;
HH20:=REFX(HHV(H,N*3),ZQ);
LL20:=REFX(LLV(L,N*3),ZQ);
K:=(HH20-LL20)/(N),LINETHICK;
XY:LINEVALUE(ZQ+1=N,LL20,ZQ+1=1,HH20,0,0),LINETHICK1,COLORFFFFFF;
YX:LINEVALUE(ZQ+1=N,HH20,ZQ+1=1,LL20,0,0),LINETHICK1,COLORFFFFFF;
中位线:(XY+YX)/2,LINETHICK1,COLORFFFFFF;
XX:IF(ZQ+1<N+1,HH20,0),LINETHICK,COLORFFFFFF;
PARTLINE(ZQ+1<N,HH20),LINETHICK1,COLORFFFFFF;
YY:IF(ZQ+1<N+1,LL20,0),LINETHICK,COLORFFFFFF;
PARTLINE(ZQ+1<N,LL20),LINETHICK1,COLORFFFFFF;
STICKLINE(ZQ+1=1,HH20,LL20,0,0),COLORFFFFFF;
STICKLINE(ZQ+1=N,HH20,LL20,0,0),COLORFFFFFF;
//参考标准角:=ATAN((HH20-LL20)/(N*K))*57.29633,COLORFFFFFF,LINETHICK;
MAN:=MA(C,N),COLORAAAAFF;
DRAWTEXT(ZQ+1=N-2,LL20*1.03,'主图画面参考标准角=45°'),COLORAAFFFF;
X角K:=REFX(REF(MAN,1)-MAN,ZQ)*(ZQ)+REFX(MAN,ZQ);
MAN角斜线:LINEVALUE(ZQ+1=N,X角K,ZQ+1=1,X角K,0,0),LINETHICK2,COLOR00FFFF;
MAN角水平线A:=IF(ZQ+1<=N,REFX(REF(MAN角斜线,N-1),ZQ),0);
MAN角水平线:MAN角水平线A[DATACOUNT],LINETHICK,COLOR00FFFF;
PARTLINE(ZQ+1<N,MAN角水平线),LINETHICK2,COLOR00FFFF;
STICKLINE(ZQ+1=1,REFX(MAN角水平线,ZQ),MAN角斜线,0.8,0),COLOR00FFFF,LINETHICK2;
MAN线:MAN,LINETHICK2,COLORAAAAFF;
MAN角:REFX(ATAN((MAN角斜线-MAN角水平线)/(N*K))*57.29633,ZQ),LINETHICK;
 


 



[url=http://www.goodgupiao.com/gupiaogongshi/15813.html][B]线的角度(源码、主图、贴图)[/B][/url]