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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信黄金十字擒涨停优化源码分时主图


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

以下是通达信黄金十字擒涨停优化源码分时主图

时间:=TIME2=100100;
N:=BARSLAST(时间);
C1:CONST(IF(N,MAX(REF(HHV(H,0),N+1),DYNAINFO(4)),HHV(H,0))),DOTLINE,COLORRED;
C2:CONST(IF(N,MIN(REF(LLV(L,0),N+1),DYNAINFO(4)),LLV(L,0))),DOTLINE,COLORGREEN;
C3:(C1+C2)/2,DOTLINE,COLORYELLOW;
VV:=HHV(V,0);
ZF:=(C1/C2-1)*100;
DRAWTEXT(CURRBARSCOUNT=2,C1,VARCAT(VARCAT(VARCAT(VARCAT('上限:',VAR2STR(C1,2)),'元,'),VARCAT('振幅:',VAR2STR(ZF,2))),'%')),COLORRED;
DRAWTEXT(CURRBARSCOUNT=2,C3,VARCAT(VARCAT('中限:',VAR2STR(C3,2)),'元')),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=2,C2,VARCAT(VARCAT('下限:',VAR2STR(C2,2)),'元')),COLORGREEN;
DRAWTEXT(C1/C2<=1.03 AND CROSS(C,C1) AND V>=VV,C1*1.005,'★买入')COLORRED;
DRAWTEXT(C1/C2<=1.03 AND CROSS(C2,C) AND V>=VV,C2*0.998,'★卖出')COLORGREEN;
STICKLINE(C1/C2<1.03 AND CROSS(C,C1) AND V>=VV,DYNAINFO(3)*1.03,DYNAINFO(3)*0.97,1,0),COLORRED;

时间:=TIME2=100100;
N:=BARSLAST(时间);
C1:=CONST(IF(N,MAX(REF(HHV(H,0),N+1),DYNAINFO(4)),HHV(H,0)));
C2:=CONST(IF(N,MIN(REF(LLV(L,0),N+1),DYNAINFO(4)),LLV(L,0)));
C3:=(C1+C2)/2;
VV:=HHV(V,0);
C1/C2<=1.03 AND CROSS(C,C1) AND V>=VV;





回复

举报

QQ|

GMT+8, 2024-11-17 23:46

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