未来函数检测结果如下:
该公式包含未来函数:DYNAINFO
该公式包含未来函数:DCLOSE
指标源码:
原理解析:
DRAWGBK(OPEN>0,RGB(0,0,250),RGB(0,0,0),0,'02',0)
DIFF赋值:D收盘价的12日指数移动平均-D收盘价的26日指数移动平均
DEA赋值:DIFF的9日指数移动平均,COLORFFFF00
MACD赋值:(DIFF-DEA)*2
输出A1:上次DIFF<1日前的DIFF距今天数,画黄色,LINETHICK1
A11:A1*-1,COLOR00FFFF,LINETHICK1
输出A2:上次DEA<1日前的DEA距今天数,COLORRED,LINETHICK1
A22:A2*-1,COLORRED,LINETHICK1
DRAWBAND(A2,RGB(150,50,20),A1,RGB(150,100,150))
DRAWBAND(A22,RGB(150,100,150),A11, RGB(150,50,20))
STICKLINE(DIFF上穿DEA AND DIFF<0,A11,0,2,0),COLORRED
STICKLINE(DIFF上穿DEA AND DIFF> 0,0,A1,2,0),COLORRED
STICKLINE(DEA上穿DIFF AND DIFF<0,A11,0,2,0),画白色
STICKLINE(DEA上穿DIFF AND DIFF> 0,0,A1,2,0),画白色
MACD底背离:STICKLINE( A1+1日前的收盘价>收盘价 AND DIFF> A1+1日前的DIFF AND DIFF上穿DEA,-25,25,0.00001,0),画黄色
当满足条件A1>0 AND A2>0时,在A2和A1之间画柱状线
当满足条件A1>0 AND A2>0时,在A22和A11之间画柱状线
当满足条件A1>0 AND A2>0时,在0和A1之间画柱状线
DRAWTEXT(DIFF上穿DEA AND DIFF<0,-5,'0'),COLORCYAN
DRAWTEXT(DIFF上穿DEA AND DIFF<0,-12,'0'),COLORCYAN
DRAWTEXT(DIFF上穿DEA AND DIFF>0,5,'0'),COLORGREEN
DRAWTEXT(DIFF上穿DEA AND DIFF>0,12,'0'),COLORGREEN
当满足条件A2>A1 AND A22
STICKLINE(DIFF上穿DEA AND DIFF> 0,0,A1,2,0),COLORRED
STICKLINE(DEA上穿DIFF AND DIFF<0,A11,0,2,0),画黄色
STICKLINE(DEA上穿DIFF AND DIFF> 0,0,A1,2,0),画黄色
N赋值: 5
M1赋值:5
RSV赋值:(收盘价-N日内最低价最低值)/(N日内最高价最高值-N日内最低价最低值)*100
RSV的5日[1日权重]移动平均
K的M1日[5日权重]移动平均
J赋值:3*K-2*D
VARB2赋值:(RSV/2+22)*1
量赋值:成交量的13日指数移动平均
资金赋值: AMOUNT的13日指数移动平均
过滤赋值:((资金/量) / 100)
输出提纯:(((收盘价 -过滤) /过滤) * 100)
黄金赋值:(提纯<0 AND ZXNH)
如果黄金 AND RSV
上涨分界赋值:25
KDJ提前金叉: (上涨分界上穿低买),COLORFF00FF,NODRAW
当满足条件KDJ提前金叉时,在0和'O'位置书写文字
当满足条件KDJ提前金叉时,在-2和'买'位置书写文字
当满足条件C>O时,在横轴0.01纵轴0.9位置书写文字
AAA1赋值:STRCAT('------- 沪深总上涨家数: ',CON2STR(DYNAINFO(60),0))
AAA2赋值:STRCAT('沪深总下跌家数:',CON2STR(DYNAINFO(61),0))
当满足条件ISLASTBAR时,在横轴0纵轴0位置书写文字
当满足条件ISLASTBAR时,在横轴0纵轴0.06位置书写文字
25,画白色