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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信日周月k线主图源码


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

以下是通达信日周月k线主图源码

日周月同图

{月}
MC:=C#MONTH,NODRAW;
MH:=H#MONTH,NODRAW;
ML:=L#MONTH,NODRAW;
MO1:=IF(DAY<REF(DAY,1),O,DRAWNULL);
MO:=HHV(MO1,DAY),NODRAW;
STICKLINE(MC>=MO,MH,ML,4,-1)COLOR00009C;
STICKLINE(MC<=MO,MH,ML,4,-1),COLOR4F2F4F;
K1:XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1,LINETHICK2,COLORRED;
K2:EMA(K1,25),LINETHICK2;
DRAWBAND(K1,RGB(80,0,0),K2,RGB(0,91,0));
{周}
周O1:=IF(WEEKDAY<REF(WEEKDAY,1),O,DRAWNULL);
周开:HHV(周O1,WEEKDAY)COLORRED,NODRAW;
周高:HHV(H,WEEKDAY)COLORYELLOW,NODRAW;
周低:LLV(L,WEEKDAY)COLOR32CD32,NODRAW;
周收:C#WEEK, COLORFF6EC7,NODRAW;
STICKLINE(周收>=周开,周收,周高,4,0)COLOR600060;
STICKLINE(周收>=周开,周低,周收,4,0)COLOR000066;
STICKLINE(周收<周开,周收,周高,4,0),COLOR9F3333;
STICKLINE(周收<周开,周开,周低,4,0),COLOR9F3333;
{日}
AQ:=O#WEEK;
B:=C#WEEK;
AAQ:=H#WEEK;
BB:=L#WEEK;
IF(AAQ<AAQ+1,AAQ,DRAWNULL),LINETHICK1,COLORLIGRAY,DOTLINE;
IF(BB<BB+1,BB,DRAWNULL),LINETHICK1,COLORLIGRAY,DOTLINE;
STICKLINE(WEEKDAY=1,AAQ,BB,0,0),COLORGRAY;
STICKLINE(WEEKDAY=6-1,AAQ,BB,0,0),COLORGRAY;
中位线1:(AAQ+BB)/2,LINETHICK1,COLORGRAY;
(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1+XMA(XMA(H,25),25),DOTLINE,COLORGREEN;
DRAWKLINE(H,O,L,C);
STICKLINE(C<O,H,L,0,0),COLORFF9900;
STICKLINE(C<O,O,C,3,1),COLORFF9900;
MA5:=MA(C,5);
MA10:=MA(C,10);
MA20:=MA(C,20);
MA40:=MA(C,40);
MA60:=MA(C,60);
MA120:=MA(C,120);
STICKLINE(MA5>=MA60 AND MA60>=MA10,MA10,MA60,1,-1),COLORBLUE;
STICKLINE(MA5>=MA10 AND MA5<=MA60,MA10,MA5,1,-1),COLORBLUE;
STICKLINE(MA20>=MA60 AND MA60>=MA40,MA40,MA60,1,-1),COLORFF00FF;
STICKLINE(MA20>=MA40 AND MA20<MA60,MA40,MA20,1,-1),COLORFF00FF;
STICKLINE(MA5>=MA20 AND MA20>=MA10,MA10,MA20,1,-1),COLORYELLOW;
STICKLINE(MA5>=MA10 AND MA5<MA20,MA10,MA5,1,-1),COLORYELLOW;





回复

举报

GMT+8, 2025-2-1 06:58

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