股资源-股票学习站-学炒股-股票课程-炒股教程-分析选股指标-入门基础知识

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信股市红绿灯(鹏腾2009版本)主图源码


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2023-10-8 23:10:47

以下是通达信股市红绿灯(鹏腾2009版本)主图源码

{股市红绿灯主图}

n:=20;
CC:=ZIG(3,N);
GT1:PEAKBARS(1,N,1),NODRAW;
DT1:=TROUGHBARS(2,N,1);
H1:DRAWLINE(CURRBARSCOUNT=CONST(GT1)+1,H,ISLASTBAR,REF(H,CONST(GT1)),0),DOTLINE,LINETHICK1,COLORWHITE;
L1:DRAWLINE(CURRBARSCOUNT=CONST(DT1)+1,L,ISLASTBAR,REF(L,CONST(DT1)),0),DOTLINE,LINETHICK1,COLORCYAN;
HX0:=IF(H/L>1.04 AND V>=HHV(V,BARSLAST(CURRBARSCOUNT=CONST(GT1)+1)+1) AND LLV(L,N)=L,L,99);
HXW:=CONST(LLV(HX0,N))=L AND NOT(ISLASTBAR);
BW:=CURRBARSCOUNT=CONST(BARSLAST(HXW))+1;
YZX:REF(H,BARSLAST(BW))DOTLINE,COLORGREEN;
YZA:REF(L,BARSLAST(BW))DOTLINE,COLORYELLOW;
YZU:REF((H+L)/2,BARSLAST(BW))DOTLINE,COLORRED;
DRAWTEXT(BW,L*0.97,VAR2STR(L,2));
DRAWTEXT(ISLASTBAR,H1,'近期高点')COLORWHITE;
DRAWTEXT(ISLASTBAR,L1,'近期低点')COLORCYAN;
DRAWTEXT(ISLASTBAR,YZX,'上线就买')COLORGREEN;
DRAWTEXT(ISLASTBAR,(YZX+YZA)/2,'中线观望')COLORYELLOW;
DRAWTEXT(ISLASTBAR,YZA,'下线就卖')COLORRED;
DRAWICON(CROSS(C>YZX,0.5),H,1);
DRAWICON(CROSS(C<YZA,0.5),L,2);
IF(BW,H,DRAWNULL)COLORGREEN,CIRCLEDOT,LINETHICK3;
IF(BW,(H+L)/2,DRAWNULL)COLORYELLOW,CIRCLEDOT,LINETHICK3;
IF(BW,L,DRAWNULL)COLORRED,CIRCLEDOT,LINETHICK3;





回复

举报

QQ|

GMT+8, 2024-11-17 03:33

快速回复 返回顶部 返回列表