通达信基准线主图源码

2016-05-03 11:43:00来源:本站整理浏览:225

通达信之基准线

目的:在指定日期画出十字线,用以观测当前股价之强弱,
 可以作为买卖参考点。运用之妙,存乎一心,如是而已。

参数有三:最小值 最大值 默认值
Y:=2016;
M:=3;
D:=8;

TJ:=YEAR=Y AND MONTH=M AND DAY=D;
T1:=TJ>REF(TJ,1);
GC:=IF(T1,C,DRAWNULL);
SJ:=CONST(BARSSINCE(GC));
N:=SJ;

CP:=CONST(REF((H+L)/2,N));


DRAWKLINE(H,O,L,C);

STICKLINE(CURRBARSCOUNT > N AND C>=O,H,L,0.2,0),COLORFF00CC;
STICKLINE(CURRBARSCOUNT > N AND C>=O,C,O,3,0),COLORFF00CC;
STICKLINE(CURRBARSCOUNT > N AND C< O,H,L,0.2,0),COLOR00CC00;
STICKLINE(CURRBARSCOUNT > N AND C< O,C,O,3,0),COLOR00CC00;


HHYD:=CONST(HHV(H,N*2+1));
LLYD:=CONST(LLV(L,N*2+1));
STICKLINE(CURRBARSCOUNT==(N+1),HHYD,LLYD,0,0), COLORWHITE;
基准:DRAWLINE(CURRBARSCOUNT<=(N+2), CP, 1, CP, 0), COLORWHITE;

DRAWNUMBER(ISLASTBAR,CP,CP),COLORYELLOW;
 


 

股票公式栏目导航

精品指标推荐

最新热门

本类随机推荐

相关公式