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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[公式答疑] 想在K线上加一条16天均线,K线(在其上为红色其下变绿色)-通达信答疑


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

编写条件:

编写方法:

网友求助:

想在k线上加一条16天均线,但我想K线边成以下 ,K线在16天上为红色,下面为绿色

MA20:=MA(CLOSE,16);
STICKLINE(O>C AND C>MA20,O,C,2,0),colorred;
STICKLINE(O>C AND C>MA20,L,H,0.5,0),colorred;
STICKLINE(O<C AND C>MA20,O,C,2,0),colorred;
STICKLINE(O<C AND C>MA20,C,H,0.5,0),colorred;
STICKLINE(O<C AND C>MA20,O,L,0.5,0),colorred;
STICKLINE(O=C AND C>MA20,O,C,2,0),colorred;
STICKLINE(O=C AND C>MA20,L,H,0.5,0),colorred;
STICKLINE(O>C AND C<MA20,O,C,2,0),colorblue;
STICKLINE(O>C AND C<MA20,L,H,0.5,0),colorblue;
STICKLINE(O<C AND C<MA20,O,C,2,0),colorblue;
STICKLINE(O<C AND C<MA20,C,H,0.5,0),colorblue;
STICKLINE(O<C AND C<MA20,O,L,0.5,0),colorblue;
STICKLINE(O=C AND C<MA20,O,C,2,0),colorblue;
STICKLINE(O=C AND C<MA20,L,H,0.5,0),colorblue;

解答如下: 

MA20:MA(CLOSE,16),COLORGREEN,LINETHICK2;
IF(C>=MA20,MA20,DRAWNULL),COLORRED,LINETHICK2;
STICKLINE(O>C AND C>MA20,O,C,2,0),COLORRED;
STICKLINE(O>C AND C>MA20,L,H,0,0),COLORRED;
STICKLINE(O<C AND C>MA20,O,C,2,0),COLORRED;
STICKLINE(O<C AND C>MA20,C,H,0,0),COLORRED;
STICKLINE(O<C AND C>MA20,O,L,0,0),COLORRED;
STICKLINE(O=C AND C>MA20,O,C,2,0),COLORRED;
STICKLINE(O=C AND C>MA20,L,H,0,0),COLORRED;
STICKLINE(O>C AND C<MA20,O,C,2,0),COLORBLUE;
STICKLINE(O>C AND C<MA20,L,H,0,0),COLORBLUE;
STICKLINE(O<C AND C<MA20,O,C,2,0),COLORBLUE;
STICKLINE(O<C AND C<MA20,C,H,0,0),COLORBLUE;
STICKLINE(O<C AND C<MA20,O,L,0,0),COLORBLUE;
STICKLINE(O=C AND C<MA20,O,C,2,0),COLORBLUE;
STICKLINE(O=C AND C<MA20,L,H,0,0),COLORBLUE;


回复

举报

QQ|

GMT+8, 2024-11-15 16:45

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