未来函数检测结果如下:
该公式包含未来函数:#MONTH
该公式包含未来函数:#WEEK
指标源码:
原理解析:
SHORT赋值:24
LONG赋值:152
MID赋值:18
输出
DIF:收盘价的SHORT日指数移动平均-收盘价的LONG日指数移动平均,NODRAW
输出
DEA:DIF的MID日指数移动平均,NODRAW
输出
MACD:(DIF-DEA)*2,COLORSTICK
输出
{多周期统计}
当红:IF(上次MACD<0距今天数,上次MACD<0距今天数,0),NODRAW,画红色
输出
当绿:IF(上次MACD>0距今天数,上次MACD>0距今天数,0),NODRAW,画绿色
{MACD周值}{}
周DIF赋值:"MACD.DIF#WEEK"
周DEA赋值:"MACD.DEA#WEEK"
周MACD赋值:(周DIF-周DEA)*2
输出
周红天数:IF(周MACD>0,上次周MACD上穿0距今天数,DRAWNULL)+1,画黄色,NODRAW
输出
周绿天数:IF(周MACD<0,上次0上穿周MACD距今天数,DRAWNULL)+1,画青色,NODRAW
{MACD月值}
月DIF赋值:"MACD.DIF#MONTH"
月DEA赋值:"MACD.DEA#MONTH"
月MACD赋值:(月DIF-月DEA)*2
输出
月红天数:IF(月MACD>0,上次月MACD上穿0距今天数,DRAWNULL)+1,画红色,NODRAW
输出
月绿天数:IF(月MACD<0,上次0上穿月MACD距今天数,DRAWNULL)+1,画绿色,NODRAW
A1赋值:LAST(MACD>=1日前的MACD,3,1)
B1赋值:MACD<1日前的MACD
C1赋值:LAST(MACD<=1日前的MACD,3,1)
D1赋值:MACD>1日前的MACD
GD赋值:MACD=30日内MACD最高值
GJ赋值:上次FILTER(0.8上穿GD,2距今天数)+1
E1赋值:GJ日前的MACD,POINTDOT,画洋红色
DA赋值:MACD=30日内MACD最低值
DJ赋值:上次FILTER(0.8上穿DA,2距今天数)+1
F1赋值:DJ日前的MACD
{}
CS赋值:上次MACD<1日前的MACD距今天数
STICKLINE(MACD>1日前的MACD AND MACD<0 AND CS=1,0,MACD,2,1),COLORFFFF99
STICKLINE(MACD>1日前的MACD AND MACD<0 AND CS=2,0,MACD,2,1),COLORFFFFAA
STICKLINE(MACD>1日前的MACD AND MACD<0 AND CS=3,0,MACD,2,1),COLOREEEEBB
STICKLINE(MACD>1日前的MACD AND MACD<0 AND CS=4,0,MACD,2,1),COLORDDDDCC
STICKLINE(MACD>1日前的MACD AND MACD<0 AND CS=5,0,MACD,2,1),COLORCCCCDD
STICKLINE(MACD>1日前的MACD AND MACD<0 AND CS=6,0,MACD,2,1),COLORBBBBEE
STICKLINE(MACD>1日前的MACD AND MACD<0 AND CS=7,0,MACD,2,1),COLORAAAAFF
STICKLINE(MACD>1日前的MACD AND MACD<0 AND CS=8,0,MACD,2,1),COLOR9999FF
STICKLINE(MACD>1日前的MACD AND MACD<0 AND CS=9,0,MACD,2,1),COLOR8888FF
STICKLINE(MACD>1日前的MACD AND MACD<0 AND CS>9,0,MACD,2,1),COLOR8888FF
STICKLINE(MACD>1日前的MACD AND MACD>0 AND CS=2,0,MACD,1,1),COLOR000099
STICKLINE(MACD>1日前的MACD AND MACD>0 AND CS=2,0,MACD,2,1),COLOR0000AA
STICKLINE(MACD>1日前的MACD AND MACD>0 AND CS=3,0,MACD,2,1),COLOR1100BB
STICKLINE(MACD>1日前的MACD AND MACD>0 AND CS=4,0,MACD,2,1),COLOR1100CC
STICKLINE(MACD>1日前的MACD AND MACD>0 AND CS=5,0,MACD,2,1),COLOR3300DD
STICKLINE(MACD>1日前的MACD AND MACD>0 AND CS=6,0,MACD,2,1),COLOR3300EE
STICKLINE(MACD>1日前的MACD AND MACD>0 AND CS=7,0,MACD,2,1),COLOR5500FF
STICKLINE(MACD>1日前的MACD AND MACD>0 AND CS=8,0,MACD,2,1),COLOR5500FF
STICKLINE(MACD>1日前的MACD AND MACD>0 AND CS=9,0,MACD,2,1),COLOR7700FF
STICKLINE(MACD>1日前的MACD AND MACD>0 AND CS>9,0,MACD,2,1),COLOR7700FF
当满足条件MACD>E1 AND E1>0时,在E1和E1之间画柱状线
当满足条件MACD
当满足条件C1 AND D1 AND MACD<0时,在MACD和0之间画柱状线
DRAWBAND(DIF,RGB(250,250,250),DIF,RGB(0,0,0))
DRAWBAND(DEA,RGB(250,250,0),DEA,RGB(0,0,0))