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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信季线月线周线画矩形公式


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

以下是通达信季线月线周线画矩形公式

通达信季线月线周线画矩形公式

源码

WO:=O#WEEK;
WC:=C#WEEK;
WH:=H#WEEK;
WL:=L#WEEK;
T:=BARSLAST(WEEKOFYEAR!=REF(WEEKOFYEAR,1));
T1:=CROSS(BACKSET(T=0,2),0.5);
YO:=O#MONTH;
YC:=C#MONTH;
YH:=H#MONTH;
YL:=L#MONTH;
YT:=BARSLAST(MONTH!=REF(MONTH,1));
YT1:=CROSS(BACKSET(YT=0,2),0.5);
A0:=MOD(MONTH,3);
JD:=BARSLAST(CROSS(A0,0.5));
JT:=BARSLAST(JD<REF(JD,1));
JT1:=CROSS(BACKSET(JT=0,2),0.5);
JO:=O#SEASON;
JC:=C#SEASON;
JH:=H#SEASON;
JL:=L#SEASON;{www.guziyuan.cn}
STICKLINE(IF(ISLASTBAR,JT1=1,JC>=JO AND JT>0 AND JT1=0 ),JH,JH,8,0),COLORLIMAGENTA;
STICKLINE(IF(ISLASTBAR,JT1=1,JC>=JO AND JT>0 AND JT1=0 ),JL,JL,8,0),COLORLIMAGENTA;
STICKLINE(JC>=JO AND (JT=0 OR JT1=1 OR ISLASTBAR),JH,JL,0,0),COLORLIMAGENTA;
STICKLINE(IF(ISLASTBAR,JT1=1,JC<JO AND JT>0 AND JT1=0),JH,JH,8,0),COLORWHITE;
STICKLINE(IF(ISLASTBAR,JT1=1,JC<JO AND JT>0 AND JT1=0),JL,JL,8,0),COLORWHITE;
STICKLINE(JC<JO AND (JT=0 OR JT1=1 OR ISLASTBAR),JH,JL,0,0),COLORWHITE;
STICKLINE(IF(ISLASTBAR,T1=1,WC>=WO AND T>0 AND T1=0 ),WH,WH,8,-1),COLORYELLOW;
STICKLINE(IF(ISLASTBAR,T1=1,WC>=WO AND T>0 AND T1=0 ),WL,WL,8,-1),COLORYELLOW;
STICKLINE(WC>=WO AND (T=0 OR T1=1 OR ISLASTBAR),WH,WL,0,-1),COLORYELLOW;
STICKLINE(IF(ISLASTBAR,T1=1,WC<WO AND T>0 AND T1=0),WH,WH,8,-1),COLORBLUE;
STICKLINE(IF(ISLASTBAR,T1=1,WC<WO AND T>0 AND T1=0),WL,WL,8,-1),COLORBLUE;
STICKLINE(WC<WO AND (T=0 OR T1=1 OR ISLASTBAR),WH,WL,0,-1),COLORBLUE;
STICKLINE(IF(ISLASTBAR,YT1=1,YC>=YO AND YT>0 AND YT1=0 ),YH,YH,8,-1),COLORRED;
STICKLINE(IF(ISLASTBAR,YT1=1,YC>=YO AND YT>0 AND YT1=0 ),YL,YL,8,-1),COLORRED;
STICKLINE(YC>=YO AND (YT=0 OR YT1=1 OR ISLASTBAR),YH,YL,0,-1),COLORRED;
STICKLINE(IF(ISLASTBAR,YT1=1,YC<YO AND YT>0 AND YT1=0),YH,YH,8,-1),COLORGREEN;
STICKLINE(IF(ISLASTBAR,YT1=1,YC<YO AND YT>0 AND YT1=0),YL,YL,8,-1),COLORGREEN;
STICKLINE(YC<YO AND (YT=0 OR YT1=1 OR ISLASTBAR),YH,YL,0,-1),COLORGREEN;





回复

举报

QQ|

GMT+8, 2024-11-19 22:49

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