棋盘法则指标源码[通达信公式]
相关标签: 齐鲁证券通达信下载 、 通达信 、 通达信官方网站 、 通达信下载 、 通达信软件下载 、 新浪通达信 、 齐鲁证券通达信 、 国盛证券通达信版 、 信达证券通达信专业版 、
棋盘法则指标源码
{INPUT:之字幅度(70,3,100);}
最低:=TROUGHBARS(L,之字幅度,1);{调整之字幅度找到低位起点}
斜率:=角度调节/1000;{角度调节以便把握趋势}
P:=横向调节;{调整竖线间隔}
N:=最低;
数列:INTPART(LOG((1/SQRT(5))*(POW((1+SQRT(5))/2,N)-POW((1-SQRT(5))/2,N)))/POW(N*P,1/5)),NODRAW;
低价:=ref(L,BARSLAST(最低=0));
高价:=CONST(HHV(H,最低))*1.05;
低价_:DRAWLINE(最低=0,L,ISLASTBAR,低价,0);
前高低:=HHV(H,最低+1)=H;{数4高}
统计:=CROSS(COUNT(前高低,最低)=4,0.5);
KK:=BARSLAST(统计);
DRAWTEXT(CURRBARSCOUNT=CONST(KK)+7,H*1.05,'起');
DRAWTEXT(CURRBARSCOUNT=CONST(KK)+7,H,'点');
PP:=IF(ref(C,BARSLAST(CROSS(COUNT(前高低,最低)=3,0.5)))>C,ref(C,BARSLAST(CROSS(COUNT(前高低,最低)=3,0.5))),H);
基线:ref(PP,BARSLAST(统计)),NODRAW;
基差:基线-低价,NODRAW;
{横线加字}{本文来源:' www.CXH99.com ' }
一0:=低价+(基差*0.618*1*POW(1.1,1-1));
一:IF(CURRBARSCOUNT<=CONST(KK) AND 一0<=高价,一0
,DRAWNULL),POINTDOT,COLORAAAAAA;
DRAWTEXT(CURRBARSCOUNT=CONST(KK)+5,CONST(一),'一'),COLORFFFFFF;
二0:=低价+(基差*0.618*2*POW(1.1,2-1));
二:IF(CURRBARSCOUNT<=CONST(KK) AND 二0<=高价,二0
,DRAWNULL),POINTDOT,COLORAAAAAA;
DRAWTEXT(CURRBARSCOUNT=CONST(KK)+5,CONST(二),'二'),COLORFFFFFF; {本文来至CXH99.COM}
三0:=低价+(基差*0.618*3*POW(1.1,3-1));
三:IF(CURRBARSCOUNT<=CONST(KK) AND 三0<=高价,三0
,DRAWNULL),POINTDOT,COLORAAAAAA;
DRAWTEXT(CURRBARSCOUNT=CONST(KK)+5,CONST(三),'三'),COLORFFFFFF;
四0:=低价+(基差*0.618*4*POW(1.1,4-1));
四:IF(CURRBARSCOUNT<=CONST(KK) AND 四0<=高价,四0
,DRAWNULL),POINTDOT,COLORAAAAAA;
DRAWTEXT(CURRBARSCOUNT=CONST(KK)+5,CONST(四),'四'),COLORFFFFFF;
五0:=低价+(基差*0.618*5*POW(1.1,5-1));
五:IF(CURRBARSCOUNT<=CONST(KK) AND 五0<=高价,五0
,DRAWNULL),POINTDOT,COLORAAAAAA;
DRAWTEXT(CURRBARSCOUNT=CONST(KK)+5,CONST(五),'五'),COLORFFFFFF;
六0:=低价+(基差*0.618*6*POW(1.1,6-1));
六:IF(CURRBARSCOUNT<=CONST(KK) AND 六0<=高价,六0
,DRAWNULL),POINTDOT,COLORAAAAAA;
DRAWTEXT(CURRBARSCOUNT=CONST(KK)+5,CONST(六),'六'),COLORFFFFFF;
七0:=低价+(基差*0.618*7*POW(1.1,7-1));
七:IF(CURRBARSCOUNT<=CONST(KK) AND 七0<=高价,七0
,DRAWNULL),POINTDOT,COLORAAAAAA;
DRAWTEXT(CURRBARSCOUNT=CONST(KK)+5,CONST(七),'七'),COLORFFFFFF;
八0:=低价+(基差*0.618*8*POW(1.1,8-1));
八:IF(CURRBARSCOUNT<=CONST(KK) AND 八0<=高价,八0
,DRAWNULL),POINTDOT,COLORAAAAAA;
DRAWTEXT(CURRBARSCOUNT=CONST(KK)+5,CONST(八),'八'),COLORFFFFFF;
九0:=低价+(基差*0.618*9*POW(1.1,9-1));
九:IF(CURRBARSCOUNT<=CONST(KK) AND 九0<=高价,九0
,DRAWNULL),POINTDOT,COLORAAAAAA;
DRAWTEXT(CURRBARSCOUNT=CONST(KK)+5,CONST(九),'九'),COLORFFFFFF;
十0:=低价+(基差*0.618*10*POW(1.1,10-1));
十:IF(CURRBARSCOUNT<=CONST(KK) AND 十0<=高价,十0
,DRAWNULL),POINTDOT,COLORAAAAAA;
DRAWTEXT(CURRBARSCOUNT=CONST(KK)+5,CONST(十),'十'),COLORFFFFFF;
II0:=低价+(基差*0.618*11*POW(1.1,11-1));
II:IF(CURRBARSCOUNT<=CONST(KK) AND II0<=高价,II0
,DRAWNULL),POINTDOT,COLORAAAAAA;
{竖线加字}
STICKLINE(CURRBARSCOUNT<=CONST(KK) AND 数列!=ref(数列,1),低价,高价,0.00001,-1),COLORAAAAAA;
DRAWTEXT(CURRBARSCOUNT=CONST(KK)+5,CONST(II),'II'),COLORFFFFFF;
DRAWTEXT(CURRBARSCOUNT<=CONST(KK) AND 数列!=ref(数列,1)
AND 数列=1 ,高价*0.98,'一'),COLORFFFF00;
DRAWTEXT(CURRBARSCOUNT<=CONST(KK) AND 数列!=ref(数列,1)
AND 数列=2 ,高价*0.98,'二'),COLORFFFF00;
DRAWTEXT(CURRBARSCOUNT<=CONST(KK) AND 数列!=ref(数列,1)
AND 数列=3 ,高价*0.98,'三'),COLORFFFF00;
DRAWTEXT(CURRBARSCOUNT<=CONST(KK) AND 数列!=ref(数列,1)
AND 数列=4 ,高价*0.98,'四'),COLORFFFF00;
DRAWTEXT(CURRBARSCOUNT<=CONST(KK) AND 数列!=ref(数列,1)
AND 数列=5 ,高价*0.98,'五'),COLORFFFF00;
DRAWTEXT(CURRBARSCOUNT<=CONST(KK) AND 数列!=ref(数列,1)
AND 数列=6 ,高价*0.98,'六'),COLORFFFF00;
DRAWTEXT(CURRBARSCOUNT<=CONST(KK) AND 数列!=ref(数列,1)
AND 数列=7 ,高价*0.98,'七'),COLORFFFF00;
DRAWTEXT(CURRBARSCOUNT<=CONST(KK) AND 数列!=ref(数列,1)
AND 数列=8 ,高价*0.98,'八'),COLORFFFF00;
DRAWTEXT(CURRBARSCOUNT<=CONST(KK) AND 数列!=ref(数列,1)
AND 数列=9 ,高价*0.98,'九'),COLORFFFF00;
DRAWTEXT(CURRBARSCOUNT<=CONST(KK) AND 数列!=ref(数列,1)
AND 数列=10 ,高价*0.98,'十'),COLORFFFF00;
DRAWTEXT(CURRBARSCOUNT<=CONST(KK) AND 数列!=ref(数列,1)
AND 数列=11 ,高价*0.98,'十一'),COLORFFFF00;
DRAWTEXT(CURRBARSCOUNT<=CONST(KK) AND 数列!=ref(数列,1)
AND 数列=12 ,高价*0.98,'十二'),COLORFFFF00;
斜线0:IF(低价_+CONST(斜率*1.618)*最低<=高价,低价_+CONST(斜率*1.618)*最低,DRAWNULL);
斜线1:IF(低价_+CONST(斜率*1.000)*最低<=高价,低价_+CONST(斜率*1.000)*最低,DRAWNULL);
斜线2:IF(低价_+CONST(斜率*0.618)*最低<=高价,低价_+CONST(斜率*0.618)*最低,DRAWNULL);
斜线3:IF(低价_+CONST(斜率*0.382)*最低<=高价,低价_+CONST(斜率*0.382)*最低,DRAWNULL);
斜线4:IF(低价_+CONST(斜率*0.250)*最低<=高价,低价_+CONST(斜率*0.250)*最低,DRAWNULL);
斜线5:IF(低价_+CONST(斜率*0.156)*最低<=高价,低价_+CONST(斜率*0.156)*最低,DRAWNULL);
斜线6:IF(低价_+CONST(斜率*0.092)*最低<=高价,低价_+CONST(斜率*0.092)*最低,DRAWNULL);
斜线7:IF(低价_+CONST(斜率*0.055)*最低<=高价,低价_+CONST(斜率*0.055)*最低,DRAWNULL);
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 262069696 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容