同花顺红娘子量波副图源码分享
long:=26; m:=9; short:=12;DIFF1:=EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);DEA1:=EMA(DIFF1,M);MACD:=2*(DIFF1-DEA1);DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG),colorff00ff,linethick2;DEA : EMA(DIFF1,M),colorwhite,linethick2;AH:=HHV(DIFF1,55),COLOR6600ff,linethick2;AL:=LLV(DIFF1,55);DD:=C=HHV(C,100);EE:=DEA1< REF(DEA1,1) AND REF(DEA1< REF(DEA1,1),1)=1;CC:=C> REF(C,1) AND REF(C> REF(C,1),1)=1;FF:=C=LLV(C,100);GG:= DEA1> REF(DEA1,1) AND REF(DEA1> REF(DEA1,1),1)=1;LL:=C< REF(C,1) AND REF(C< REF(C,1),1)=1;PARTLINE(DEA,DEA>0,RGB(255,0,255)),LINETHICK2;PARTLINE(DEA,DEA<0,RGB(255,255,225)),LINETHICK2;PARTLINE(DIFF,DIFF>0,RGB(255,255,0)),LINETHICK2;PARTLINE(DIFF,DIFF<0,RGB(0,0,255)),LINETHICK2;STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,8,0 ),COLOr008800;STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,7,0 ),COLOR009900;STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,6,0 ),COLOR00aa00;STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,5,0 ),COLOR00bb00;STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,4,0 ),COLOR00cc00;STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,3,0 ),COLOR00dd00;STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR00ee00;STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,1,0 ),COLOR00ff00;STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,8,0 ),COLOR000088;STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,7,0 ),COLOR000099;STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,6,0 ),COLOR0000aa;STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,5,0 ),COLOR0000bb;STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,4,0 ),COLOR0000cc;STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,3,0 ),COLOR0000dd;STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR0000ee;STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,1,0 ),COLOR0000ff;STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,8,0 ),COLOR338fdd;STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,7,0 ),COLOR339fdd;STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,6,0 ),COLOR33afdd;STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,5,0 ),COLOR33bfdd;STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,4,0 ),COLOR33cfdd;STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,3,0 ),COLOR33dfdd;STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLOR33efdd;STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,1,0 ),COLOR33ffdd;STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,8,0 ),COLORFF4400;STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,7,0 ),COLORFF6600;STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,6,0 ),COLORFF7700;STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,5,0 ),COLORFF8800;STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,4,0 ),COLORFF9900;STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,3,0 ),COLORFFaa00;STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORFFbb00;STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,1,0 ),COLORFFcc00;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
LONG赋值:26
M赋值:9
SHORT赋值:12
DIFF1赋值:收盘价的SHORT日指数移动平均 - 收盘价的LONG日指数移动平均
DEA1赋值:DIFF1的M日指数移动平均
MACD:=2*(DIFF1-DEA1)
DIFF : 收盘价的SHORT日指数移动平均 - 收盘价的LONG日指数移动平均,COLORFF00FF, 线宽为2
DEA : DIFF1的M日指数移动平均,画白色, 线宽为2
AH赋值:55日内DIFF1最高值,COLOR6600FF, 线宽为2
AL赋值:55日内DIFF1最低值
DD赋值:C=100日内C最高值
EE赋值:DEA1< 1日前的DEA1 AND 1日前的DEA1< 1日前的DEA1=1
CC赋值:C> 1日前的C AND 1日前的C> 1日前的C=1
FF赋值:C=100日内C最低值
GG赋值: DEA1> 1日前的DEA1 AND 1日前的DEA1> 1日前的DEA1=1
LL赋值:C< 1日前的C AND 1日前的C< 1日前的C=1
PARTLINE(DEA,DEA>0,RGB(255,0,255)), 线宽为2
PARTLINE(DEA,DEA<0,RGB(255,255,225)), 线宽为2
PARTLINE(DIFF,DIFF>0,RGB(255,255,0)), 线宽为2
PARTLINE(DIFF,DIFF<0,RGB(0,0,255)), 线宽为2
STICKLINE(MACD<1日前的MACDAND MACD>0,0,MACD,8,0 ),COLOR008800
STICKLINE(MACD<1日前的MACDAND MACD>0,0,MACD,7,0 ),COLOR009900
STICKLINE(MACD<1日前的MACDAND MACD>0,0,MACD,6,0 ),COLOR00AA00
STICKLINE(MACD<1日前的MACDAND MACD>0,0,MACD,5,0 ),COLOR00BB00
STICKLINE(MACD<1日前的MACDAND MACD>0,0,MACD,4,0 ),COLOR00CC00
STICKLINE(MACD<1日前的MACDAND MACD>0,0,MACD,3,0 ),COLOR00DD00
STICKLINE(MACD<1日前的MACDAND MACD>0,0,MACD,2,0 ),COLOR00EE00
STICKLINE(MACD<1日前的MACDAND MACD>0,0,MACD,1,0 ),COLOR00FF00
STICKLINE(MACD>=1日前的MACDAND MACD>0,0,MACD,8,0 ),COLOR000088
STICKLINE(MACD>=1日前的MACDAND MACD>0,0,MACD,7,0 ),COLOR000099
STICKLINE(MACD>=1日前的MACDAND MACD>0,0,MACD,6,0 ),COLOR0000AA
STICKLINE(MACD>=1日前的MACDAND MACD>0,0,MACD,5,0 ),COLOR0000BB
STICKLINE(MACD>=1日前的MACDAND MACD>0,0,MACD,4,0 ),COLOR0000CC
STICKLINE(MACD>=1日前的MACDAND MACD>0,0,MACD,3,0 ),COLOR0000DD
STICKLINE(MACD>=1日前的MACDAND MACD>0,0,MACD,2,0 ),COLOR0000EE
STICKLINE(MACD>=1日前的MACDAND MACD>0,0,MACD,1,0 ),COLOR0000FF
STICKLINE(MACD>1日前的MACDAND MACD<0,0,MACD,8,0 ),COLOR338FDD
STICKLINE(MACD>1日前的MACDAND MACD<0,0,MACD,7,0 ),COLOR339FDD
STICKLINE(MACD>1日前的MACDAND MACD<0,0,MACD,6,0 ),COLOR33AFDD
STICKLINE(MACD>1日前的MACDAND MACD<0,0,MACD,5,0 ),COLOR33BFDD
STICKLINE(MACD>1日前的MACDAND MACD<0,0,MACD,4,0 ),COLOR33CFDD
STICKLINE(MACD>1日前的MACDAND MACD<0,0,MACD,3,0 ),COLOR33DFDD
STICKLINE(MACD>1日前的MACDAND MACD<0,0,MACD,2,0 ),COLOR33EFDD
STICKLINE(MACD>1日前的MACDAND MACD<0,0,MACD,1,0 ),COLOR33FFDD
STICKLINE(MACD<=1日前的MACDAND MACD<0,0,MACD,8,0 ),COLORFF4400
STICKLINE(MACD<=1日前的MACDAND MACD<0,0,MACD,7,0 ),COLORFF6600
STICKLINE(MACD<=1日前的MACDAND MACD<0,0,MACD,6,0 ),COLORFF7700
STICKLINE(MACD<=1日前的MACDAND MACD<0,0,MACD,5,0 ),COLORFF8800
STICKLINE(MACD<=1日前的MACDAND MACD<0,0,MACD,4,0 ),COLORFF9900
STICKLINE(MACD<=1日前的MACDAND MACD<0,0,MACD,3,0 ),COLORFFAA00
STICKLINE(MACD<=1日前的MACDAND MACD<0,0,MACD,2,0 ),COLORFFBB00
STICKLINE(MACD<=1日前的MACDAND MACD<0,0,MACD,1,0 ),COLORFFCC00