UID101915
积分264
学分
推广 个
预报后涨停 支
阅读权限40
在线时间 小时
注册时间2011-2-19
最后登录1970-1-1
|
{参数N N1 N2 N3 均为 1 300 5 可任意调周期,以各期不同点位}
{峰线}
AAA:=REF(H,N)=HHV(H,2*N+1);{N日前的最高价}
QY:=BACKSET(AAA,N+1);{周期记录}
CCC:=FILTER(QY,N) AND H=HHV(H,N+1);{周期过滤 最高价最高值}
DDD:=BARSLAST(CCC),NODRAW;{CC条件成立的天数}
GDTS:=IF(CCC,CURRBARSCOUNT,0),NODRAW;{CC成立 返回交易日的周}
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS),NODRAW;{DDD成立,返回DDD日前的GDTS,否则返回GDTS}
GDCS1:=CONST(DINGBUTS),NODRAW;{取DINGBUTS值}
GDCS13:=CONST(REF(HIGH,GDCS1-1));
DINGBUTS1:=REF(DINGBUTS,DDD+1),NODRAW;
GDCS2:=CONST(DINGBUTS1);
GDCS23:=CONST(REF(HIGH,DINGBUTS1-1));
XXG1:=BACKSET(ISLASTBAR,GDCS1);{ ISLASTBAR 判断是否为最后一个周期}
XXG2:=BACKSET(ISLASTBAR,DINGBUTS1);
STICKLINE(XXG2,GDCS23,GDCS23,0.5,-1),COLORWHITE,LINETHICK3;{白线}
STICKLINE(XXG1,GDCS13,GDCS13,0.5,-1),COLORYELLOW,LINETHICK3;{黄线}
{谷线}
AAA1:=REF(L,N1)=LLV(L,2*N1+1);
QQY1:=BACKSET(AAA1,N1+1);
CCC1:=FILTER(QQY1,N1) AND L=LLV(L,N1+1);
DD1:=BARSLAST(CCC1);
DDTS:=IF(CCC1,CURRBARSCOUNT,0);
DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
DDCS1:=CONST(DDTS1);
DDCS13:=CONST(REF(L,DDCS1-1));
DDTS2:=REF(DDTS1,DD1+1);
DDCS2:=CONST(DDTS2);
DDCS23:=CONST(REF(L,DDTS2-1));
XD1:=BACKSET(ISLASTBAR,DDCS1);
XD2:=BACKSET(ISLASTBAR,DDTS2);
{STICKLINE(XD2,DDCS23,DDCS23,0.5,1),COLORMAGENTA,LINETHICK3;
STICKLINE(XD1,DDCS13,DDCS13,0.5,1),COLORCYAN,LINETHICK3;
STICKLINE(CURRBARSCOUNT=13,高,高,100,-1),COLORGREEN;}
STICKLINE(XD2,DDCS23,DDCS23,0.5,-1),COLORMAGENTA,LINETHICK3;
STICKLINE(XD1,DDCS13,DDCS13,0.5,-1),COLORCYAN,LINETHICK3; |
|