公式指标论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

转调整高低点主图指标 (源码)

2022-4-9 09:51| 发布者: admin| 查看: 29| 评论: 0

DRAWGBK(CLOSE,COLORRGB(50,100,120),0,1);
P1:=125;//调整高低点位置
GA:=BACKSET(ISLASTBAR,HHVBARS(HIGH,P1)+1);
高点:=COUNT(GA,P1)=1;
DA:=BACKSET(ISLASTBAR,LLVBARS(LOW,P1)+1);
低点:=REVERSE(COUNT(DA,P1)=1);
VERTLINE(低点),LINEDOT,Color0000FF,LINETHICK2;
VERTLINE(高点),LINEDOT,Color00FF00,LINETHICK2;
n1:=SYSPARAM(3);
n:=n1-SYSPARAM(2)+1;
hh:=HHV(HIGH,n);
ll:=LLV(LOW,n);
最高:=hh[n1],COLORYELLOW;
最低:=ll[n1],Color0000FF;
x1:=最低+(最高-最低)*0.191;
x2:=最低+(最高-最低)*0.382;
x3:=最低+(最高-最低)*0.5;
x4:=最低+(最高-最低)*0.618;
x5:=最低+(最高-最低)*0.809;
DRAWICON(高点,x3,9),ALIGN5;
DRAWICON(低点,x3,8),ALIGN5;
DRAWLINE(低点,最低,高点 or ISLASTBAR,REF(最低,1),0),LINEDOT,COLORGREEN;
DRAWLINE(低点,最高,高点 or ISLASTBAR,REF(最高,1),0),LINEDOT,COLORGREEN;
{www.gpxiazai.com 股票软件下载网_最新股票指标公式}
DRAWLINE(低点,x1,高点 or ISLASTBAR,REF(x1,1),0),LINEDOT,COLORGREEN;
DRAWLINE(低点,x2,高点 or ISLASTBAR,REF(x2,1),0),LINEDOT,COLORGREEN;
DRAWLINE(低点,x3,高点 or ISLASTBAR,REF(x3,1),0),LINEDOT,COLORGREEN;
DRAWLINE(低点,x4,高点 or ISLASTBAR,REF(x4,1),0),LINEDOT,COLORGREEN;
DRAWLINE(低点,x5,高点 or ISLASTBAR,REF(x5,1),0),LINEDOT,COLORGREEN;
DRAWLINE(高点,最高,低点 or ISLASTBAR,REF(最高,1),0),LINEDOT,COLORRED;
DRAWLINE(高点,最低,低点 or ISLASTBAR,REF(最低,1),0),LINEDOT,COLORRED;
DRAWLINE(高点,x1,低点 or ISLASTBAR,REF(x1,1),0),LINEDOT,COLORRED;
DRAWLINE(高点,x2,低点 or ISLASTBAR,REF(x2,1),0),LINEDOT,COLORRED;
DRAWLINE(高点,x3,低点 or ISLASTBAR,REF(x3,1),0),LINEDOT,COLORRED;
DRAWLINE(高点,x4,低点 or ISLASTBAR,REF(x4,1),0),LINEDOT,COLORRED;
DRAWLINE(高点,x5,低点 or ISLASTBAR,REF(x5,1),0),LINEDOT,COLORRED;
DRAWTEXT(低点,REF(x1*0.996,BARSLAST(BARSCOUNT(CLOSE)=SYSPARAM(2))),'黄金 0.191'+NUMTOSTR(x1,2)),ALIGN2,COLORGRAY;
DRAWTEXT(低点,REF(x2*0.996,BARSLAST(BARSCOUNT(CLOSE)=SYSPARAM(2))),'黄金 0.382'+NUMTOSTR(x2,2)),ALIGN2,COLORGRAY;
DRAWTEXT(低点,REF(x3*0.996,BARSLAST(BARSCOUNT(CLOSE)=SYSPARAM(2))),'黄金 50% '+NUMTOSTR(x3,2)),ALIGN2,COLORGRAY;
DRAWTEXT(低点,REF(x4*0.996,BARSLAST(BARSCOUNT(CLOSE)=SYSPARAM(2))),'黄金 0.618'+NUMTOSTR(x4,2)),ALIGN2,COLORGRAY;
DRAWTEXT(低点,REF(x5*0.996,BARSLAST(BARSCOUNT(CLOSE)=SYSPARAM(2))),'黄金 0.809'+NUMTOSTR(x5,2)),ALIGN2,COLORGRAY;
DRAWTEXT(低点,REF(最高*0.996,BARSLAST(BARSCOUNT(CLOSE)=SYSPARAM(2))),'黄金 最 高'+NUMTOSTR(最高,2)),ALIGN2,COLORGRAY;
DRAWTEXT(低点,REF(最低*0.996,BARSLAST(BARSCOUNT(CLOSE)=SYSPARAM(2))),'黄金 最 低'+NUMTOSTR(最低,2)),ALIGN2,COLORGRAY;
YB:=SYSPARAM(2);
D:=SYSPARAM(3);
P:=(D - YB);
f:=((D - YB) + 1);
w:=HHV(HIGH,f);
e:=LLV(LOW,f);
YC:=((P * 0.191) + YB);
YD:=((P * 0.382) + YB);
YE:=((P * 0.5) + YB);
YF:=((P * 0.618) + YB);
YG:=((P * 0.809) + YB);
S4:=SYSPARAM(4);
S5:=SYSPARAM(5);
HH:=HHVBARS(HIGH,(P + 1));
LL:=LLVBARS(LOW,(P + 1));
X:=(BARPOS = (D - HH[D]));
Y:=(BARPOS = (D - LL[D]));
K:=((S4 - S5) / (D - YB));
DRAWSL(Y,LOW,((10 * K) / 60),0,0),LINEDASH,COLORFFFFFF;
DRAWSL(Y,LOW,((30 * K) / 60),0,0),LINEDASH,COLOR99FFFF;
DRAWSL(Y,LOW,((60 * K) / 60),0,0),LINEDASH,COLOR00FFFF;
DRAWSL(Y,LOW,((90 * K) / 60),0,0),LINEDASH,color00CCFF;
DRAWSL(Y,LOW,((120 * K) / 60),0,0),LINEDASH,color0099FF;
DRAWSL(Y,LOW,((180 * K) / 60),0,0),LINEDASH,color0066FF;
DRAWSL(Y,LOW,((300 * K) / 60),0,0),LINEDASH,COLOR0000FF;
DRAWSL(Y,LOW,((540 * K) / 60),0,0),LINEDASH,COLORFF3366;
DRAWSL(Y,LOW,((1020 * K) / 60),0,0),LINEDASH,COLOR00FF33;
KLINE(OPEN,HIGH,LOW,CLOSE,0);

飞狐转调整高低点主图指标公式


鲜花

握手

雷人

路过

鸡蛋
返回顶部