【阳光飞狐__与财富同行】

标题: 求助飞狐公式修改 [打印本页]

作者: logoslogos    时间: 2020-11-8 21:45
标题: 求助飞狐公式修改
求助把这个论坛里的飞狐公式修改一下,让KT交易师能正常使用。现在KT交易师不能显示黄金分割线和江恩8分线,多谢


{黄金分割+江恩八分割  调整参数(K=1 为黄金分割;K=2为江恩八分线)}
input:w(2,1,3);   
年:=MA(CLOSE,26);
STICKLINE(C>=年 AND C>=O,C,O,7,0),COLORRED;
STICKLINE(C>=年 AND C>=O,H,L,0,0),COLORRED;
STICKLINE(C>=年 AND C<O,C,O,7,1),COLORRED;
STICKLINE(C>=年 AND C<O,O,H,0,0),COLORRED;
STICKLINE(C>=年 AND C<O,C,L,0,0),COLORRED;

STICKLINE(C<年 AND C>O,C,O,7,1),COLORffff00;
STICKLINE(C<年 AND C<=O,C,O,7,0),COLORffff00;
STICKLINE(C<年 AND C<=O,H,L,0,1),COLORffff00;
STICKLINE(C<年 AND C>O,C,H,0,1),COLORffff00;
STICKLINE(C<年 AND C>O,O,L,0,1),COLORffff00;

u1:=sysparam(3);
u:=u1-sysparam(2)+1;
hh:=hhv(H,u);
ll:=llv(L,u);
最高:=hh[u1],COLORYELLOW;
PARTLINE(C and w<>3,最高),COLORYELLOW;
最低:ll[u1],COLORred;
PARTLINE(C and w<>3,最低),COLORred;
PARTLINE(C and w=1,最低+(最高-最低)*0.191),LINEDOT,COLORWHITE;
PARTLINE(C and w=1,最低+(最高-最低)*0.382),LINEDOT,COLORWHITE;
PARTLINE(C and w<>3,最低+(最高-最低)*0.5),COLORGREEN;
PARTLINE(C and w=1,最低+(最高-最低)*0.618),LINEDOT,COLORWHITE;
PARTLINE(C and w=1,最低+(最高-最低)*0.809),LINEDOT,COLORWHITE;
DRAWTEXT(BARSCOUNT(C)=SYSPARAM(3) and w<>3,REF(最低,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'最低↓'),ALIGN2,COLORred;
DRAWTEXT(BARSCOUNT(C)=SYSPARAM(3) and w<>3,REF(最高,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'最高↑'),ALIGN2,COLORYELLOW;

DRAWTEXT(BARPOS=SYSPARAM(2) and w=1,REF((最低+(最高-最低)*0.191)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'黄金 0.191↑'+NUMTOSTR(最低+(最高-最低)*0.191,2)),COLORWHITE;
DRAWTEXT(BARPOS=SYSPARAM(2) and w=1,REF((最低+(最高-最低)*0.382)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'黄金 0.382↑'+NUMTOSTR(最低+(最高-最低)*0.382,2)),COLORWHITE;
DRAWTEXT(BARPOS=SYSPARAM(2) and w<>3,REF((最低+(最高-最低)*0.5)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM (2))),'     50%  ↑'+NUMTOSTR(最低+(最高-最低)*0.5,2)),COLORGREEN;
DRAWTEXT(BARPOS=SYSPARAM(2) and w=1,REF((最低+(最高-最低)*0.618)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'黄金 0.618↑'+NUMTOSTR(最低+(最高-最低)*0.618,2)),COLORWHITE;
DRAWTEXT(BARPOS=SYSPARAM(2) and w=1,REF((最低+(最高-最低)*0.809)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'黄金 0.809↑'+NUMTOSTR(最低+(最高-最低)*0.809,2)),COLORWHITE;

PARTLINE(C and w=2,最低+(最高-最低)*1/8),LINEDOT,Color0095BC;
PARTLINE(C and w=2,最低+(最高-最低)*1/4),LINEDOT,Color0095BC;
PARTLINE(C and w=2,最低+(最高-最低)*3/8),LINEDOT,Color0095BC;
PARTLINE(C and w=2,最低+(最高-最低)*5/8),LINEDOT,Color0095BC;
PARTLINE(C and w=2,最低+(最高-最低)*7/8),LINEDOT,Color0095BC;
PARTLINE(C and w=2,最低+(最高-最低)*3/4),LINEDOT,Color0095BC;

DRAWTEXT(BARPOS=SYSPARAM(2) and w=2,REF((最低+(最高-最低)*1/8)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'江恩 1/8↑'+NUMTOSTR(最低+(最高-最低)*1/8,2)),Color0095BC;
DRAWTEXT(BARPOS=SYSPARAM(2) and w=2,REF((最低+(最高-最低)*1/4)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'江恩 1/4↑'+NUMTOSTR(最低+(最高-最低)*1/4,2)),Color0095BC;
DRAWTEXT(BARPOS=SYSPARAM(2) and w=2,REF((最低+(最高-最低)*3/8)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'江恩 3/8↑'+NUMTOSTR(最低+(最高-最低)*3/8,2)),Color0095BC;
DRAWTEXT(BARPOS=SYSPARAM(2) and w=2,REF((最低+(最高-最低)*5/8)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'江恩 5/8↑'+NUMTOSTR(最低+(最高-最低)*5/8,2)),Color0095BC;
DRAWTEXT(BARPOS=SYSPARAM(2) and w=2,REF((最低+(最高-最低)*7/8)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'江恩 7/8↑'+NUMTOSTR(最低+(最高-最低)*7/8,2)),Color0095BC;
DRAWTEXT(BARPOS=SYSPARAM(2) and w=2,REF((最低+(最高-最低)*3/4)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'江恩 3/4↑'+NUMTOSTR(最低+(最高-最低)*3/4,2)),Color0095BC;



G:=ZIG(3,5)>REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)<=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)<=REF(ZIG(3,5),3);
X:=ZIG(3,5)<REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)>=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)>=REF(ZIG(3,5),3);
DRAWTEXT(G,L*0.997,'▲'),ALIGN1,Colorff00ff;
DRAWTEXT(G,L,' ̄'),ALIGN1,Color00ff00;
DRAWTEXT(X,H*1.002,'▼'),ALIGN1,Color00ffff;
DRAWTEXT(X,H,' ̄'),ALIGN1,Color00ffff;
ED:=barslast(G);
EF:=barslast(X);
买入到卖出天数:ED,LINETHICK0,ColorFFFFFF;
卖出到买入天数:EF,LINETHICK0,ColorFFFFFF;
作者: 0.618    时间: 2020-11-10 11:56
标题: 黄金分割+江恩八分割
{黄金分割+江恩八分割  调整参数(K=1 为黄金分割;K=2为江恩八分线)}
input:w(2,1,3);   
年:=MA(CLOSE,26);
STICKLINE(C>=年 AND C>=O,C,O,8,0),COLORRED;
STICKLINE(C>=年 AND C>=O,H,L,0,0),COLORRED;
STICKLINE(C>=年 AND C<O,C,O,8,1),COLORRED;
STICKLINE(C>=年 AND C<O,O,H,0,0),COLORRED;
STICKLINE(C>=年 AND C<O,C,L,0,0),COLORRED;

STICKLINE(C<年 AND C>O,C,O,8,1),COLORffff00;
STICKLINE(C<年 AND C<=O,C,O,8,0),COLORffff00;
STICKLINE(C<年 AND C<=O,H,L,0,1),COLORffff00;
STICKLINE(C<年 AND C>O,C,H,0,1),COLORffff00;
STICKLINE(C<年 AND C>O,O,L,0,1),COLORffff00;

最高:=sysparam(4),COLORYELLOW;
PARTLINE(C and w<>3,最高),COLORYELLOW;
最低:=sysparam(5),COLORred;
PARTLINE(C and w<>3,最低),COLORred;
PARTLINE(C and w=1,最低+(最高-最低)*0.191),LINEDOT,COLORWHITE;
PARTLINE(C and w=1,最低+(最高-最低)*0.382),LINEDOT,COLORWHITE;
PARTLINE(C and w<>3,最低+(最高-最低)*0.5),COLORGREEN;
PARTLINE(C and w=1,最低+(最高-最低)*0.618),LINEDOT,COLORWHITE;
PARTLINE(C and w=1,最低+(最高-最低)*0.809),LINEDOT,COLORWHITE;
DRAWTEXT(BARSCOUNT(C)=SYSPARAM(3) and w<>3,REF(最低,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'最低↓'),ALIGN2,COLORred;
DRAWTEXT(BARSCOUNT(C)=SYSPARAM(3) and w<>3,REF(最高,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'最高↑'),ALIGN2,COLORYELLOW;

DRAWTEXT(BARPOS=SYSPARAM(2) and w=1,REF((最低+(最高-最低)*0.191)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'黄金 0.191↑'+NUMTOSTR(最低+(最高-最低)*0.191,2)),COLORWHITE;
DRAWTEXT(BARPOS=SYSPARAM(2) and w=1,REF((最低+(最高-最低)*0.382)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'黄金 0.382↑'+NUMTOSTR(最低+(最高-最低)*0.382,2)),COLORWHITE;
DRAWTEXT(BARPOS=SYSPARAM(2) and w<>3,REF((最低+(最高-最低)*0.5)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM (2))),'     50%  ↑'+NUMTOSTR(最低+(最高-最低)*0.5,2)),COLORGREEN;
DRAWTEXT(BARPOS=SYSPARAM(2) and w=1,REF((最低+(最高-最低)*0.618)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'黄金 0.618↑'+NUMTOSTR(最低+(最高-最低)*0.618,2)),COLORWHITE;
DRAWTEXT(BARPOS=SYSPARAM(2) and w=1,REF((最低+(最高-最低)*0.809)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'黄金 0.809↑'+NUMTOSTR(最低+(最高-最低)*0.809,2)),COLORWHITE;

PARTLINE(C and w=2,最低+(最高-最低)*1/8),LINEDOT,Color0095BC;
PARTLINE(C and w=2,最低+(最高-最低)*1/4),LINEDOT,Color0095BC;
PARTLINE(C and w=2,最低+(最高-最低)*3/8),LINEDOT,Color0095BC;
PARTLINE(C and w=2,最低+(最高-最低)*5/8),LINEDOT,Color0095BC;
PARTLINE(C and w=2,最低+(最高-最低)*7/8),LINEDOT,Color0095BC;
PARTLINE(C and w=2,最低+(最高-最低)*3/4),LINEDOT,Color0095BC;

DRAWTEXT(BARPOS=SYSPARAM(2) and w=2,REF((最低+(最高-最低)*1/8)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'江恩 1/8↑'+NUMTOSTR(最低+(最高-最低)*1/8,2)),Color0095BC;
DRAWTEXT(BARPOS=SYSPARAM(2) and w=2,REF((最低+(最高-最低)*1/4)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'江恩 1/4↑'+NUMTOSTR(最低+(最高-最低)*1/4,2)),Color0095BC;
DRAWTEXT(BARPOS=SYSPARAM(2) and w=2,REF((最低+(最高-最低)*3/8)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'江恩 3/8↑'+NUMTOSTR(最低+(最高-最低)*3/8,2)),Color0095BC;
DRAWTEXT(BARPOS=SYSPARAM(2) and w=2,REF((最低+(最高-最低)*5/8)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'江恩 5/8↑'+NUMTOSTR(最低+(最高-最低)*5/8,2)),Color0095BC;
DRAWTEXT(BARPOS=SYSPARAM(2) and w=2,REF((最低+(最高-最低)*7/8)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'江恩 7/8↑'+NUMTOSTR(最低+(最高-最低)*7/8,2)),Color0095BC;
DRAWTEXT(BARPOS=SYSPARAM(2) and w=2,REF((最低+(最高-最低)*3/4)*0.996,BARSLAST(BARSCOUNT(C)=SYSPARAM(2))),'江恩 3/4↑'+NUMTOSTR(最低+(最高-最低)*3/4,2)),Color0095BC;


G:=ZIG(3,5)>REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)<=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)<=REF(ZIG(3,5),3);
X:=ZIG(3,5)<REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)>=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2)>=REF(ZIG(3,5),3);
DRAWTEXT(G,L*0.997,'▲'),ALIGN1,Colorff00ff;
DRAWTEXT(G,L,' ̄'),ALIGN1,Color00ff00;
DRAWTEXT(X,H*1.002,'▼'),ALIGN1,Color00ffff;
DRAWTEXT(X,H,' ̄'),ALIGN1,Color00ffff;
ED:=barslast(G);
EF:=barslast(X);
买入到卖出天数:ED,LINETHICK0,ColorFFFFFF;
卖出到买入天数:EF,LINETHICK0,ColorFFFFFF;
作者: logoslogos    时间: 2020-11-10 15:45
f非常感谢618兄的热心帮助。。。祝交易顺利!!!
作者: mzyma1355    时间: 2020-11-10 22:21
原帖由 logoslogos 于 2020-11-8 21:45 发表
求助把这个论坛里的飞狐公式修改一下,让KT交易师能正常使用。现在KT交易师不能显示黄金分割线和江恩8分线,多谢


{黄金分割+江恩八分割  调整参数(K=1 为黄金分割;K=2为江恩八分线)}
input:w(2,1,3);   
年 ...

飞狐公式:
作者: logoslogos    时间: 2020-11-11 21:46
多谢M版的加分鼓励。。。交易顺利。。。。!!!




欢迎光临 【阳光飞狐__与财富同行】 (http://bbs.88158.cn/) Powered by Discuz! X3.2