通达信黄金汇聚主图公式指标源码

[复制链接]
查看251 | 回复0 | 2022-7-24 08:18:47 | 显示全部楼层 |阅读模式

通达信黄金汇聚主图公式指标源码

通达信可以用
{INPUT:N(14,1,100), N1(37,1,200);}
A:=BACKSET(BARSTATUS=2,HHVBARS(H,N)+1);
B:=COUNT(A,N)=1;
前高:REF(H,BARSLAST(B)),COLORGREEN,LINETHICK1;
{DRAWTEXT(BARSTATUS=2,前高,''+NUMTOSTRN(前高,2)),COLORGREEN;}
A2:=BACKSET(BARSTATUS=2,LLVBARS(L,N)+1);
B2:=A2>REF(A2,1);
前低:REF(L,BARSLAST(B2)) ,COLORGREEN,LINETHICK1;
{DRAWTEXT(BARSTATUS=2,前低,''+NUMTOSTRN(前低,2)),COLORYELLOW;}
F2:((前高-前低)*0.382)+前低,COLORGREEN,DOTLINE;
{DRAWTEXT(BARSTATUS=2,F2,''+NUMTOSTRN(F2,2)),COLORGREEN;}
DRAWTEXT(BARSLAST(B)>BARSLAST(B2) AND BARSTATUS=2,F2,'(0.382)'),COLORGREEN;
DRAWTEXT(BARSLAST(B)<BARSLAST(B2) AND BARSTATUS=2,F2,'(0.618)'),COLORGREEN;
F4:((前高-前低)*0.618)+前低,COLORGREEN,DOTLINE;
{DRAWTEXT(BARSTATUS=2,F4,''+NUMTOSTRN(F4,2)),COLORGREEN,ALIGN2;}
DRAWTEXT(BARSLAST(B)>BARSLAST(B2) AND BARSTATUS=2,F4,'(0.618)'),COLORGREEN;
DRAWTEXT(BARSLAST(B)<BARSLAST(B2) AND BARSTATUS=2,F4,'(0.382)'),COLORGREEN;
A1:=BACKSET(BARSTATUS=2,HHVBARS(H,N1)+1);
B1:=COUNT(A1,N1)=1;
前高1:REF(H,BARSLAST(B1)),COLORFF00FF,LINETHICK2;
A12:=BACKSET(BARSTATUS=2,LLVBARS(L,N1)+1);
B12:=A12>REF(A12,1);
前低1:REF(L,BARSLAST(B12)),COLORFF00FF,LINETHICK2;
{DRAWTEXT(BARSTATUS=2,前低1,''+NUMTOSTRN(前低1,2)),COLORWHITE;}
F12:((前高1-前低1)*0.382)+前低1,COLORFF00FF,DOTLINE{LINEDASHDOT};
{DRAWTEXT(BARSTATUS=2,F12,''+NUMTOSTRN(F12,2)),COLORFF00FF,ALIGN2;}
DRAWTEXT(BARSLAST(B1)>BARSLAST(B12) AND BARSTATUS=2,F12,'(0.382)'),COLORFF00FF;
DRAWTEXT(BARSLAST(B1)<BARSLAST(B12) AND BARSTATUS=2,F12,'(0.618)'),COLORFF00FF;
F13:((前高1-前低1)*0.5)+前低1,COLORRED;
{DRAWTEXT(BARSTATUS=2,F13,''+NUMTOSTRN(F13,2)),COLORFF00FF,ALIGN2;}
F14:((前高1-前低1)*0.618)+前低1,COLORFF00FF,DOTLINE{LINEDASHDOT};
{DRAWTEXT(BARSTATUS=2,F14,''+NUMTOSTRN(F14,2)),COLORFF00FF,ALIGN2;}
DRAWTEXT(BARSLAST(B1)>BARSLAST(B12) AND BARSTATUS=2,F14,'(0.618)'),COLORFF00FF;
DRAWTEXT(BARSLAST(B1)<BARSLAST(B12) AND BARSTATUS=2,F14,'(0.382)'),COLORFF00FF;
MM1:=REF(EMA(C,3),3);
MM2:=REF(EMA(C,7),5);
MM3:=REF(EMA(C,25),5);
D3×3:MM1,COLORC08000,LINETHICK1;
D7×5:MM2,COLORRED,LINETHICK1;
D25×5:MM3,COLORBLUE,LINETHICK1;

843311189.png

843311189.png

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则