MACD高低点划线源码 副图 通达信 贴图无未来函数的划线公式
NNN:=STRCAT(CON2STR(YEAR,0),' 年 ');
YYY:=STRCAT(CON2STR(MONTH,0),' 月 ');
RRR:=STRCAT(CON2STR(DAY,0),' 日 ');
WWW:=STRCAT('星期',CON2STR(WEEKDAY,0));
SSS:=STRCAT(STRCAT(STRCAT(NNN,YYY), RRR),WWW);
DRAWTEXT_FIX(C>0,0.77,0,0,SSS);
DRAWTEXT_FIX(C>0,0.004,1,0,DYBLOCK),COLORYELLOW,LINETHICK2;
DRAWTEXT_FIX(C>0,0.06,1,0,HYBLOCK),COLORRED,LINETHICK2;
DRAWTEXT_FIX(C>0,0.12,1,0,GNBLOCK),COLORWHITE,LINETHICK2;
快量:(EMA(CLOSE,12) - EMA(CLOSE,26));
慢量:EMA(快量,9),COLOR00FFFF;
MACD:=2*(快量-慢量);
资金线:=HHV(MACD,1)*0.98,LINETHICK1,COLORRED;
资金3日线:=HHV(MACD,3)*0.98,LINETHICK1;
资金5日线:=HHV(MACD,5)*0.98,COLORWHITE,LINETHICK1;
持股:=IF(资金线>=REF(资金线,1) AND 资金3日线>=资金线 AND 资金3日线>=REF(资金3日线,1) AND 资金3日线=资金5日线,1.5,0),COLORWHITE;
{DRAWICON(REF(持股<1.5,1) AND 持股,资金线,1);
DRAWICON(REF(资金线=资金5日线,1) AND 资金线<资金5日线,资金5日线,2);}
骑牛技术:0,COLORGRAY;
{通达信公式大全 股票指标网}
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,3,0),COLORRED;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,3,0),COLOR008080;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,3,0),COLOR00FF00;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,3,0),COLORFFFFFF;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,3,0 ),COLORFFAA00;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,3.3 ,0 ),COLORFFBB11;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,2.2,0 ),COLORFFCC22;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,1.65 ,0 ),COLORFFDD33;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,1.1 ,0 ),COLORFFEE44;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,0.55 ,0 ),COLORFFFF55;
STICKLINE(MACD<0 AND MACD<=REF(MACD,1),MACD,0,0,0 ),COLOR00E600;
STICKLINE(MACD<0 AND MACD<=REF(MACD,1),MACD,0,3.5,0 ),COLOR007700;
STICKLINE(MACD<0 AND MACD<=REF(MACD,1),MACD,0,2.7,0 ),COLOR008E00;
STICKLINE(MACD<0 AND MACD<=REF(MACD,1),MACD,0,2.1,0 ),COLOR009900;
STICKLINE(MACD<0 AND MACD<=REF(MACD,1),MACD,0,1.5,0 ),COLOR00B500;
STICKLINE(MACD<0 AND MACD<=REF(MACD,1),MACD,0,0.9,0 ),COLOR00D500;
STICKLINE(MACD<0 AND MACD<=REF(MACD,1),MACD,0,0.3,0 ),COLOR00E600;
STICKLINE(MACD<0 AND MACD<=REF(MACD,1),MACD,0,0,1 ),COLOR00E600;
STICKLINE(MACD>0 AND MACD<=REF(MACD,1),MACD,0,3.5,0),COLOR0044AA;
STICKLINE(MACD>0 AND MACD<=REF(MACD,1),MACD,0,3.4,0),COLOR0055AA;
STICKLINE(MACD>0 AND MACD<=REF(MACD,1),MACD,0,3.2,0),COLOR0066BB;
STICKLINE(MACD>0 AND MACD<=REF(MACD,1),MACD,0,3.0,0),COLOR0077BB;
STICKLINE(MACD>0 AND MACD<=REF(MACD,1),MACD,0,2.7,0),COLOR0088CC;
STICKLINE(MACD>0 AND MACD<=REF(MACD,1),MACD,0,2.4,0),COLOR0099CC;
STICKLINE(MACD>0 AND MACD<=REF(MACD,1),MACD,0,2.1,0),COLOR00AADD;
STICKLINE(MACD>0 AND MACD<=REF(MACD,1),MACD,0,1.8,0),COLOR00BBDD;
STICKLINE(MACD>0 AND MACD<=REF(MACD,1),MACD,0,1.4,0),COLOR00CCEE;
STICKLINE(MACD>0 AND MACD<=REF(MACD,1),MACD,0,1.0,0),COLOR00DDEE;
STICKLINE(MACD>0 AND MACD<=REF(MACD,1),MACD,0,0.6,0),COLOR00EEEE;
STICKLINE(MACD>0 AND MACD<=REF(MACD,1),MACD,0,0.2,0),COLOR00F0F3;
STICKLINE(MACD>0 AND MACD<=REF(MACD,1),MACD,0,0.05,0),COLOR00F6F3;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,3.5,0) ,COLOR00005A;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,3.4,0) ,COLOR00006A;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,3.3,0) ,COLOR00007A;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,3.2,0) ,COLOR00008A;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,3.1,0) ,COLOR00009A;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,2.8,0) ,COLOR0000AA;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,2.5,0) ,COLOR0000BA;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,2.1,0) ,COLOR0000CA;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,1.7,0) ,COLOR0000DA;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,1.2,0) ,COLOR0000EA;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,0.7,0) ,COLOR0000F5;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,0.2,0) ,COLOR0000FC;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,0.05,0),COLOR0000FF;
A:=BARSLAST(FILTERX(MACD=HHV(MACD,BARSLAST(MACD<0)),BARSLAST(MACD<0)));
DRAWTEXT_FIX(1,0.88,5,0,'~☆~股票指标网~☆~'),COLORYELLOW;
B:=REF(MACD,A);
STICKLINE(A,B*1.05,B,4,0);
A1:=BARSLAST(FILTERX(MACD=LLV(MACD,BARSLAST(MACD>0)),BARSLAST(MACD>0)));
B1:=REF(MACD,A1);
STICKLINE(A1,B1*1.1,B1,4,2);
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
NNN赋值:STRCAT(CON2STR(YEAR,0),' 年 ')
YYY赋值:STRCAT(CON2STR(MONTH,0),' 月 ')
RRR赋值:STRCAT(CON2STR(DAY,0),' 日 ')
WWW赋值:STRCAT('星期',CON2STR(WEEKDAY,0))
SSS赋值:STRCAT(STRCAT(STRCAT(NNN,YYY), RRR),WWW)
当满足条件C>0时,在横轴0.77纵轴0位置书写文字
当满足条件C>0时,在横轴0.004纵轴1位置书写文字
当满足条件C>0时,在横轴0.06纵轴1位置书写文字
当满足条件C>0时,在横轴0.12纵轴1位置书写文字
输出快量:(收盘价的12日指数移动平均 - 收盘价的26日指数移动平均)
输出慢量:快量的9日指数移动平均,COLOR00FFFF
MACD赋值:2*(快量-慢量)
资金线赋值:1日内MACD最高值*0.98,LINETHICK1,画红色
资金3日线赋值:3日内MACD最高值*0.98,LINETHICK1
资金5日线赋值:5日内MACD最高值*0.98,画白色,LINETHICK1
持股赋值:IF(资金线>=1日前的资金线 AND 资金3日线>=资金线 AND 资金3日线>=1日前的资金3日线 AND 资金3日线=资金5日线,1.5,0),画白色
{DRAWICON(1日前的持股<1.5 AND 持股,资金线,1)
DRAWICON(1日前的资金线=资金5日线 AND 资金线<资金5日线,资金5日线,2)
输出}
骑牛技术:0,COLORGRAY
{通达信公式大全 股票指标网}
STICKLINE(MACD>0 AND MACD>1日前的MACD,MACD,0,3,0),画红色
STICKLINE(MACD>0 AND MACD<1日前的MACD,MACD,0,3,0),COLOR008080
STICKLINE(MACD<0 AND MACD<1日前的MACD,MACD,0,3,0),COLOR00FF00
STICKLINE(MACD<0 AND MACD>1日前的MACD,MACD,0,3,0),COLORFFFFFF
STICKLINE(MACD<0 AND MACD>1日前的MACD,MACD,0,3,0 ),COLORFFAA00
STICKLINE(MACD<0 AND MACD>1日前的MACD,MACD,0,3.3 ,0 ),COLORFFBB11
STICKLINE(MACD<0 AND MACD>1日前的MACD,MACD,0,2.2,0 ),COLORFFCC22
STICKLINE(MACD<0 AND MACD>1日前的MACD,MACD,0,1.65 ,0 ),COLORFFDD33
STICKLINE(MACD<0 AND MACD>1日前的MACD,MACD,0,1.1 ,0 ),COLORFFEE44
STICKLINE(MACD<0 AND MACD>1日前的MACD,MACD,0,0.55 ,0 ),COLORFFFF55
STICKLINE(MACD<0 AND MACD<=1日前的MACD,MACD,0,0,0 ),COLOR00E600
STICKLINE(MACD<0 AND MACD<=1日前的MACD,MACD,0,3.5,0 ),COLOR007700
STICKLINE(MACD<0 AND MACD<=1日前的MACD,MACD,0,2.7,0 ),COLOR008E00
STICKLINE(MACD<0 AND MACD<=1日前的MACD,MACD,0,2.1,0 ),COLOR009900
STICKLINE(MACD<0 AND MACD<=1日前的MACD,MACD,0,1.5,0 ),COLOR00B500
STICKLINE(MACD<0 AND MACD<=1日前的MACD,MACD,0,0.9,0 ),COLOR00D500
STICKLINE(MACD<0 AND MACD<=1日前的MACD,MACD,0,0.3,0 ),COLOR00E600
STICKLINE(MACD<0 AND MACD<=1日前的MACD,MACD,0,0,1 ),COLOR00E600
STICKLINE(MACD>0 AND MACD<=1日前的MACD,MACD,0,3.5,0),COLOR0044AA
STICKLINE(MACD>0 AND MACD<=1日前的MACD,MACD,0,3.4,0),COLOR0055AA
STICKLINE(MACD>0 AND MACD<=1日前的MACD,MACD,0,3.2,0),COLOR0066BB
STICKLINE(MACD>0 AND MACD<=1日前的MACD,MACD,0,3.0,0),COLOR0077BB
STICKLINE(MACD>0 AND MACD<=1日前的MACD,MACD,0,2.7,0),COLOR0088CC
STICKLINE(MACD>0 AND MACD<=1日前的MACD,MACD,0,2.4,0),COLOR0099CC
STICKLINE(MACD>0 AND MACD<=1日前的MACD,MACD,0,2.1,0),COLOR00AADD
STICKLINE(MACD>0 AND MACD<=1日前的MACD,MACD,0,1.8,0),COLOR00BBDD
STICKLINE(MACD>0 AND MACD<=1日前的MACD,MACD,0,1.4,0),COLOR00CCEE
STICKLINE(MACD>0 AND MACD<=1日前的MACD,MACD,0,1.0,0),COLOR00DDEE
STICKLINE(MACD>0 AND MACD<=1日前的MACD,MACD,0,0.6,0),COLOR00EEEE
STICKLINE(MACD>0 AND MACD<=1日前的MACD,MACD,0,0.2,0),COLOR00F0F3
STICKLINE(MACD>0 AND MACD<=1日前的MACD,MACD,0,0.05,0),COLOR00F6F3
STICKLINE(MACD>0 AND MACD>1日前的MACD,MACD,0,3.5,0) ,COLOR00005A
STICKLINE(MACD>0 AND MACD>1日前的MACD,MACD,0,3.4,0) ,COLOR00006A
STICKLINE(MACD>0 AND MACD>1日前的MACD,MACD,0,3.3,0) ,COLOR00007A
STICKLINE(MACD>0 AND MACD>1日前的MACD,MACD,0,3.2,0) ,COLOR00008A
STICKLINE(MACD>0 AND MACD>1日前的MACD,MACD,0,3.1,0) ,COLOR00009A
STICKLINE(MACD>0 AND MACD>1日前的MACD,MACD,0,2.8,0) ,COLOR0000AA
STICKLINE(MACD>0 AND MACD>1日前的MACD,MACD,0,2.5,0) ,COLOR0000BA
STICKLINE(MACD>0 AND MACD>1日前的MACD,MACD,0,2.1,0) ,COLOR0000CA
STICKLINE(MACD>0 AND MACD>1日前的MACD,MACD,0,1.7,0) ,COLOR0000DA
STICKLINE(MACD>0 AND MACD>1日前的MACD,MACD,0,1.2,0) ,COLOR0000EA
STICKLINE(MACD>0 AND MACD>1日前的MACD,MACD,0,0.7,0) ,COLOR0000F5
STICKLINE(MACD>0 AND MACD>1日前的MACD,MACD,0,0.2,0) ,COLOR0000FC
STICKLINE(MACD>0 AND MACD>1日前的MACD,MACD,0,0.05,0),COLOR0000FF
A赋值:上次FILTERX(MACD=HHV(MACD,BARSLAST(MACD<0距今天数),BARSLAST(MACD<0)))
当满足条件1时,在横轴0.88纵轴5位置书写文字
B赋值:A日前的MACD
当满足条件A时,在B*1.05和B之间画柱状线
A1:=上次FILTERX(MACD=LLV(MACD,BARSLAST(MACD>0距今天数),BARSLAST(MACD>0)))
B1:=A1日前的MACD
当满足条件A1时,在B1*1.1和B1之间画柱状线