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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信一分钟主图画矩形公式


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

以下是通达信一分钟主图画矩形公式

通达信一分钟主图画矩形公式

源码

T:=IF(PERIOD=0,BARSLAST(DATE!=REF(DATE,1)),DRAWNULL);
H1:=FINDHIGH(H,T=20,20,1);
H2:=FINDHIGH(H,T=40,20,1);
H3:=FINDHIGH(H,T=60,20,1);
H4:=FINDHIGH(H,T=80,20,1);
H5:=FINDHIGH(H,T=100,20,1);
H6:=FINDHIGH(H,T=120,20,1);
H7:=FINDHIGH(H,T=140,20,1);
H8:=FINDHIGH(H,T=160,20,1);
H9:=FINDHIGH(H,T=180,20,1);
H10:=FINDHIGH(H,T=200,20,1);
H11:=FINDHIGH(H,T=220,20,1);
H12:=FINDHIGH(H,0,20,1);
L1:=FINDLOW(L,T=20,20,1);
L2:=FINDLOW(L,T=40,20,1);
L3:=FINDLOW(L,T=60,20,1);
L4:=FINDLOW(L,T=80,20,1);
L5:=FINDLOW(L,T=100,20,1);
L6:=FINDLOW(L,T=120,20,1);
L7:=FINDLOW(L,T=140,20,1);
L8:=FINDLOW(L,T=160,20,1);
L9:=FINDLOW(L,T=180,20,1);
L10:=FINDLOW(L,T=200,20,1);
L11:=FINDLOW(L,T=220,20,1);
L12:=FINDLOW(L,0,20,1);
STICKLINE(BETWEEN(T,1,18) AND CURRBARSCOUNT<=240,CONST(REF(H1,BARSLAST(T=19))),CONST(REF(H1,BARSLAST(T=19))),6,0),COLORYELLOW;
STICKLINE(BETWEEN(T,1,18)AND CURRBARSCOUNT<=240,CONST(REF(L1,BARSLAST(T=19))),CONST(REF(L1,BARSLAST(T=19))),6,0),COLORYELLOW;
STICKLINE((T=0 OR T=19)AND CURRBARSCOUNT<=240,CONST(REF(H1,BARSLAST(T=19))),CONST(REF(L1,BARSLAST(T=19))),0,0),COLORYELLOW;
STICKLINE(BETWEEN(T,21,38)AND CURRBARSCOUNT<=240,CONST(REF(H2,BARSLAST(T=39))),CONST(REF(H2,BARSLAST(T=39))),6,0),COLORYELLOW;
STICKLINE(BETWEEN(T,21,38)AND CURRBARSCOUNT<=240,CONST(REF(L2,BARSLAST(T=39))),CONST(REF(L2,BARSLAST(T=39))),6,0),COLORYELLOW;
STICKLINE((T=20 OR T=39)AND CURRBARSCOUNT<=240,CONST(REF(H2,BARSLAST(T=39))),CONST(REF(L2,BARSLAST(T=39))),0,0),COLORYELLOW;
STICKLINE(BETWEEN(T,41,58)AND CURRBARSCOUNT<=240,CONST(REF(H3,BARSLAST(T=59))),CONST(REF(H3,BARSLAST(T=59))),6,0),COLORYELLOW;
STICKLINE(BETWEEN(T,41,58)AND CURRBARSCOUNT<=240,CONST(REF(L3,BARSLAST(T=59))),CONST(REF(L3,BARSLAST(T=59))),6,0),COLORYELLOW;
STICKLINE((T=40 OR T=59)AND CURRBARSCOUNT<=240,CONST(REF(H3,BARSLAST(T=59))),CONST(REF(L3,BARSLAST(T=59))),0,0),COLORYELLOW;
STICKLINE(BETWEEN(T,61,78)AND CURRBARSCOUNT<=240,CONST(REF(H4,BARSLAST(T=79))),CONST(REF(H4,BARSLAST(T=79))),6,0),COLORYELLOW;
STICKLINE(BETWEEN(T,61,78)AND CURRBARSCOUNT<=240,CONST(REF(L4,BARSLAST(T=79))),CONST(REF(L4,BARSLAST(T=79))),6,0),COLORYELLOW;
STICKLINE((T=60 OR T=79)AND CURRBARSCOUNT<=240,CONST(REF(H4,BARSLAST(T=79))),CONST(REF(L4,BARSLAST(T=79))),0,0),COLORYELLOW;
STICKLINE(BETWEEN(T,81,98)AND CURRBARSCOUNT<=240,CONST(REF(H5,BARSLAST(T=99))),CONST(REF(H5,BARSLAST(T=99))),6,0),COLORYELLOW;
STICKLINE(BETWEEN(T,81,98)AND CURRBARSCOUNT<=240,CONST(REF(L5,BARSLAST(T=99))),CONST(REF(L5,BARSLAST(T=99))),6,0),COLORYELLOW;
STICKLINE((T=80 OR T=99)AND CURRBARSCOUNT<=240,CONST(REF(H5,BARSLAST(T=99))),CONST(REF(L5,BARSLAST(T=99))),0,0),COLORYELLOW;
STICKLINE(BETWEEN(T,101,118)AND CURRBARSCOUNT<=240,CONST(REF(H6,BARSLAST(T=119))),CONST(REF(H6,BARSLAST(T=119))),6,0),COLORYELLOW;
STICKLINE(BETWEEN(T,101,118)AND CURRBARSCOUNT<=240,CONST(REF(L6,BARSLAST(T=119))),CONST(REF(L6,BARSLAST(T=119))),6,0),COLORYELLOW;
STICKLINE((T=100 OR T=119)AND CURRBARSCOUNT<=240,CONST(REF(H6,BARSLAST(T=119))),CONST(REF(L6,BARSLAST(T=119))),0,0),COLORYELLOW;
STICKLINE(BETWEEN(T,121,138)AND CURRBARSCOUNT<=240,CONST(REF(H7,BARSLAST(T=139))),CONST(REF(H7,BARSLAST(T=139))),6,0),COLORYELLOW;
STICKLINE(BETWEEN(T,121,138)AND CURRBARSCOUNT<=240,CONST(REF(L7,BARSLAST(T=139))),CONST(REF(L7,BARSLAST(T=139))),6,0),COLORYELLOW;
STICKLINE((T=120 OR T=139)AND CURRBARSCOUNT<=240,CONST(REF(H7,BARSLAST(T=139))),CONST(REF(L7,BARSLAST(T=139))),0,0),COLORYELLOW;
STICKLINE(BETWEEN(T,141,158)AND CURRBARSCOUNT<=240,CONST(REF(H8,BARSLAST(T=159))),CONST(REF(H8,BARSLAST(T=159))),6,0),COLORYELLOW;
STICKLINE(BETWEEN(T,141,158)AND CURRBARSCOUNT<=240,CONST(REF(L8,BARSLAST(T=159))),CONST(REF(L8,BARSLAST(T=159))),6,0),COLORYELLOW;
STICKLINE((T=140 OR T=159)AND CURRBARSCOUNT<=240,CONST(REF(H8,BARSLAST(T=159))),CONST(REF(L8,BARSLAST(T=159))),0,0),COLORYELLOW;
STICKLINE(BETWEEN(T,161,178)AND CURRBARSCOUNT<=240,CONST(REF(H9,BARSLAST(T=179))),CONST(REF(H9,BARSLAST(T=179))),6,0),COLORYELLOW;
STICKLINE(BETWEEN(T,161,178)AND CURRBARSCOUNT<=240,CONST(REF(L9,BARSLAST(T=179))),CONST(REF(L9,BARSLAST(T=179))),6,0),COLORYELLOW;
STICKLINE((T=160 OR T=179)AND CURRBARSCOUNT<=240,CONST(REF(H9,BARSLAST(T=179))),CONST(REF(L9,BARSLAST(T=179))),0,0),COLORYELLOW;
STICKLINE(BETWEEN(T,181,198)AND CURRBARSCOUNT<=240,CONST(REF(H10,BARSLAST(T=199))),CONST(REF(H10,BARSLAST(T=199))),6,0),COLORYELLOW;
STICKLINE(BETWEEN(T,181,198)AND CURRBARSCOUNT<=240,CONST(REF(L10,BARSLAST(T=199))),CONST(REF(L10,BARSLAST(T=199))),6,0),COLORYELLOW;
STICKLINE((T=180 OR T=199)AND CURRBARSCOUNT<=240,CONST(REF(H10,BARSLAST(T=199))),CONST(REF(L10,BARSLAST(T=199))),0,0),COLORYELLOW;
STICKLINE(BETWEEN(T,201,218)AND CURRBARSCOUNT<=240,CONST(REF(H11,BARSLAST(T=219))),CONST(REF(H11,BARSLAST(T=219))),6,0),COLORYELLOW;
STICKLINE(BETWEEN(T,201,218)AND CURRBARSCOUNT<=240,CONST(REF(L11,BARSLAST(T=219))),CONST(REF(L11,BARSLAST(T=219))),6,0),COLORYELLOW;
STICKLINE((T=200 OR T=219)AND CURRBARSCOUNT<=240,CONST(REF(H11,BARSLAST(T=219))),CONST(REF(L11,BARSLAST(T=219))),0,0),COLORYELLOW;
STICKLINE(BETWEEN(T,221,238)AND CURRBARSCOUNT<=240,CONST(REF(H12,BARSLAST(T=239))),CONST(REF(H12,BARSLAST(T=239))),6,0),COLORYELLOW;
STICKLINE(BETWEEN(T,221,238)AND CURRBARSCOUNT<=240,CONST(REF(L12,BARSLAST(T=239))),CONST(REF(L12,BARSLAST(T=239))),6,0),COLORYELLOW;
STICKLINE((T=220 OR T=239)AND CURRBARSCOUNT<=240,CONST(REF(H12,BARSLAST(T=239))),CONST(REF(L12,BARSLAST(T=239))),0,0),COLORYELLOW;
DRAWTEXT(T=0 AND CURRBARSCOUNT<=240,CONST(REF(H1,BARSLAST(T=19)))*1.003,STRCAT(STRCAT('最高价:',VAR2STR(CONST(REF(H1,BARSLAST(T=19))),2)),'元'))COLORYELLOW;
DRAWTEXT(T=20 AND CURRBARSCOUNT<=240,CONST(REF(H2,BARSLAST(T=39)))*1.003,STRCAT(STRCAT('最高价:',VAR2STR(CONST(REF(H2,BARSLAST(T=39))),2)),'元'))COLORYELLOW;
DRAWTEXT(T=40 AND CURRBARSCOUNT<=240,CONST(REF(H3,BARSLAST(T=59)))*1.003,STRCAT(STRCAT('最高价:',VAR2STR(CONST(REF(H3,BARSLAST(T=59))),2)),'元'))COLORYELLOW;
DRAWTEXT(T=60 AND CURRBARSCOUNT<=240,CONST(REF(H4,BARSLAST(T=79)))*1.003,STRCAT(STRCAT('最高价:',VAR2STR(CONST(REF(H4,BARSLAST(T=79))),2)),'元'))COLORYELLOW;
DRAWTEXT(T=80 AND CURRBARSCOUNT<=240,CONST(REF(H5,BARSLAST(T=99)))*1.003,STRCAT(STRCAT('最高价:',VAR2STR(CONST(REF(H5,BARSLAST(T=99))),2)),'元'))COLORYELLOW;
DRAWTEXT(T=100 AND CURRBARSCOUNT<=240,CONST(REF(H6,BARSLAST(T=119)))*1.003,STRCAT(STRCAT('最高价:',VAR2STR(CONST(REF(H6,BARSLAST(T=119))),2)),'元'))COLORYELLOW;
DRAWTEXT(T=120 AND CURRBARSCOUNT<=240,CONST(REF(H7,BARSLAST(T=139)))*1.003,STRCAT(STRCAT('最高价:',VAR2STR(CONST(REF(H7,BARSLAST(T=139))),2)),'元'))COLORYELLOW;
DRAWTEXT(T=140 AND CURRBARSCOUNT<=240,CONST(REF(H8,BARSLAST(T=159)))*1.003,STRCAT(STRCAT('最高价:',VAR2STR(CONST(REF(H8,BARSLAST(T=159))),2)),'元'))COLORYELLOW;
DRAWTEXT(T=160 AND CURRBARSCOUNT<=240,CONST(REF(H9,BARSLAST(T=179)))*1.003,STRCAT(STRCAT('最高价:',VAR2STR(CONST(REF(H9,BARSLAST(T=179))),2)),'元'))COLORYELLOW;
DRAWTEXT(T=180 AND CURRBARSCOUNT<=240,CONST(REF(H10,BARSLAST(T=199)))*1.003,STRCAT(STRCAT('最高价:',VAR2STR(CONST(REF(H10,BARSLAST(T=199))),2)),'元'))COLORYELLOW;
DRAWTEXT(T=200 AND CURRBARSCOUNT<=240,CONST(REF(H11,BARSLAST(T=219)))*1.003,STRCAT(STRCAT('最高价:',VAR2STR(CONST(REF(H11,BARSLAST(T=219))),2)),'元'))COLORYELLOW;
DRAWTEXT(T=220 AND CURRBARSCOUNT<=240,CONST(REF(H12,BARSLAST(T=239)))*1.003,STRCAT(STRCAT('最高价:',VAR2STR(CONST(REF(H12,BARSLAST(T=239))),2)),'元'))COLORYELLOW;





回复

举报

QQ|

GMT+8, 2024-11-19 10:46

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