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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[大智慧] 大智慧MACD面积副图源码 贴图


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2024-3-15 15:38:24
大智慧MACD面积副图源码 贴图介绍

大智慧MACD面积副图源码 贴图

请教,如何把圆圈中红柱前的4个数值在数值栏显示出来,谢谢





DIFF:EMA(CLOSE,12) - EMA(CLOSE,26),LAYER0;
DEA:EMA(DIFF,9),LAYER0;
MACD:2*(DIFF-DEA),LINETHICK0;
绿柱面积:10*IF (MACD<0,SUM(MACD,BARSLAST(MACD>0)),0),LINETHICK0,Color00ff00,PRECIS2;
红柱面积:10*IF (MACD>0,SUM(MACD,BARSLAST(MACD<0)),0),LINETHICK0,colorred,PRECIS2;
DRAWTEXT(ref(MACD,1)>0 and MACD<=0 ,HHV(MACD,4),''+ref(红柱面积,1)),PRECIS1,ALIGN1,VALIGN1,colorred;
DRAWTEXT(ref(MACD,1)<0 and MACD>=0 ,LLV(MACD,4),''+ref(abs(绿柱面积),1)),ALIGN1,Color00ff00,PRECIS1;
DRAWTEXT(BARSTATUS=2 AND MACD<0,LLV(MACD,8),''+abs(绿柱面积)),align2,Colorwhite{004A00},PRECIS0;
DRAWTEXT(BARSTATUS=2 AND MACD>0,HHV(MACD,4),''+abs(红柱面积)),align2,VALIGN1,colorred;
MACDhs:=IF(MACD>0 AND MACD>REF(MACD,1),MACD,0);
MACDhx:=IF(MACD>0 AND MACD<REF(MACD,1),MACD,0);
MACDlx:=IF(MACD<0 AND MACD<REF(MACD,1),MACD,0);
MACDls:=IF(MACD<0 AND MACD>REF(MACD,1),MACD,0);
STICKLINE(MACDhs>0,0,MACD,8,0),Color0000BB;
STICKLINE(MACDhs>0,0,MACD,7,0),Color0000CC;
STICKLINE(MACDhs>0,0,MACD,6,0),Color0000CC;
STICKLINE(MACDhs>0,0,MACD,5,0),Color0000DD;
STICKLINE(MACDhs>0,0,MACD,4,0),Color0033DD;
STICKLINE(MACDhs>0,0,MACD,3,0),Color3355EE;
STICKLINE(MACDhs>0,0,MACD,2,0),Color6677EE;
STICKLINE(MACDhs>0,0,MACD,1,0),Color8888FF;
STICKLINE(MACDhs>0,0,MACD,1,0),Color9999FF;
STICKLINE(MACDhx>0,0,MACD,8,0),Color0077BB;
STICKLINE(MACDhx>0,0,MACD,7,0),Color0088CC;
STICKLINE(MACDhx>0,0,MACD,6,0),Color0099CC;
STICKLINE(MACDhx>0,0,MACD,5,0),Color00AADD;
STICKLINE(MACDhx>0,0,MACD,4,0),Color11BBDD;
STICKLINE(MACDhx>0,0,MACD,3,0),Color22CCEE;
STICKLINE(MACDhx>0,0,MACD,2,0),Color33DDEE;
STICKLINE(MACDhx>0,0,MACD,1,0),Color44EEFF;
STICKLINE(MACDhx>0,0,MACD,1,0),Color55FFFF;

STICKLINE(MACDlx<0,MACD,0,8,0),COLOR007700;
STICKLINE(MACDlx<0,MACD,0,7,0),COLOR009900;
STICKLINE(MACDlx<0,MACD,0,6,0),COLOR00AA00;
STICKLINE(MACDlx<0,MACD,0,5,0),COLOR00BB00;
STICKLINE(MACDlx<0,MACD,0,4,0),COLOR11CC11;
STICKLINE(MACDlx<0,MACD,0,3,0),COLOR22DD22;
STICKLINE(MACDlx<0,MACD,0,2,0),COLOR33FF33;
STICKLINE(MACDlx<0,MACD,0,1,0),COLOR44FF44;
STICKLINE(MACDlx<0,MACD,0,1,0),COLOR55FF55;
STICKLINE(MACDls<0,MACD,0,8,0),ColorBB0000;
STICKLINE(MACDls<0,MACD,0,7,0),ColorCC0000;
STICKLINE(MACDls<0,MACD,0,6,0),ColorCC2200;
STICKLINE(MACDls<0,MACD,0,5,0),ColorDD4400;
STICKLINE(MACDls<0,MACD,0,4,0),ColorDD6611;
STICKLINE(MACDls<0,MACD,0,3,0),ColorEE8822;
STICKLINE(MACDls<0,MACD,0,2,0),ColorEEAA33;
STICKLINE(MACDls<0,MACD,0,1,0),ColorFFBB44;
STICKLINE(MACDls<0,MACD,0,1,0),Color55FF55;
{STICKLINE(MACDlx<0,MACD,0,8,0),ColorBB0000;
STICKLINE(MACDlx<0,MACD,0,7,0),ColorCC0000;
STICKLINE(MACDlx<0,MACD,0,6,0),ColorCC2200;
STICKLINE(MACDlx<0,MACD,0,5,0),ColorDD4400;
STICKLINE(MACDlx<0,MACD,0,4,0),ColorDD6611;
STICKLINE(MACDlx<0,MACD,0,3,0),ColorEE8822;
STICKLINE(MACDlx<0,MACD,0,2,0),ColorEEAA33;
STICKLINE(MACDlx<0,MACD,0,1,0),ColorFFBB44;
STICKLINE(MACDlx<0,MACD,0,1,0),ColorFFCC55;
STICKLINE(MACDls<0,MACD,0,8,0),Color007700;
STICKLINE(MACDls<0,MACD,0,7,0),Color009900;
STICKLINE(MACDls<0,MACD,0,6,0),Color00AA00;
STICKLINE(MACDls<0,MACD,0,5,0),Color00BB00;
STICKLINE(MACDls<0,MACD,0,4,0),Color11CC11;
STICKLINE(MACDls<0,MACD,0,3,0),Color22DD22;
STICKLINE(MACDls<0,MACD,0,2,0),Color33FF33;
STICKLINE(MACDls<0,MACD,0,1,0),Color44EF44;
 



gd44691

回复

举报

QQ|

GMT+8, 2024-11-16 13:26

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