设为首页加入收藏

微信关注
官方微信号:71712643
加关注获取每日精选资讯
股票入门欢迎您加入
广告服务联系我们网站地图

大智慧K线上运用MACD+BOLL公式源码 大智慧指标公式大全(3)

2015-11-2 9:03:42 股票入门 http://rumen.southmoney.com

DRAWGBKlast(c>0,strip(RGB(0,0,0),RGB(0,0,50),0));
{MACD+BTX线+BOLL}
DRAWGBKlast(c>0,strip(RGB(0,0,0),RGB(0,0,50),0));
CC:=FORCAST(C,3); OO:=FORCAST(O,3); HH:=FORCAST(H,3); LL:=FORCAST(L,3);
SHORT:=12; LONG:=26; M:=9;
{1.MACD}
DIFF:=EMA(CC,SHORT) - EMA(CC,LONG);
DEA:=EMA(DIFF,M);
MACD:WMA((DIFF-DEA),3)*4;
partline(MACD,MACD>=ref(MACD,1),rgb(255,0,0),MACD<ref(MACD,1),rgb(0,255,0)),linethick2,layer0;

{2.MACD的宝塔线}
{差可能是正,是负-----相当与DIFF}
DC:=WMA(CC,SHORT/2)-WMA(CC,LONG/2); {收盘价的DIFF}
DK:=WMA(OO,SHORT/2)-WMA(OO,LONG/2); {开盘价的DIFF}
DH:=(WMA(HH,SHORT/2)-WMA(HH,LONG/2))*1.8; {最高价的DIFF}
DL:=(WMA(LL,SHORT/2)-WMA(LL,LONG/2))*1.8; {最低价的DIFF}

var1:=DC>REF(DC,1) AND DC>REF(DC,2);
var2:=REF(var1,1) AND DC<=REF(DC,1) AND DC>=REF(DC,2);
var3:=REF(var2,1) AND DC>=REF(DC,1) AND DC<=REF(DC,2);
var4:=REF(var3,1) AND DC<=REF(DC,1) AND DC>=REF(DC,2);
var5:=REF(var4,1) AND DC>=REF(DC,1) AND DC<=REF(DC,2);
var6:=REF(var5,1) AND DC<=REF(DC,1) AND DC>=REF(DC,2);
var7:=REF(var6,1) AND DC>=REF(DC,1) AND DC<=REF(DC,2);
var8:=REF(var7,1) AND DC<=REF(DC,1) AND DC>=REF(DC,2);
var9:=REF(var8,1) AND DC>=REF(DC,1) AND DC<=REF(DC,2);
varA:=REF(var9,1) AND DC<=REF(DC,1) AND DC>=REF(DC,2);
varB:=REF(varA,1) AND DC>=REF(DC,1) AND DC<=REF(DC,2);
varC:=REF(varB,1) AND DC<=REF(DC,1) AND DC>=REF(DC,2);
STICKLINE(var1 OR var2 OR var3 OR var4 OR var5 OR var6 OR var7 OR var8 OR var9 OR varA OR varB OR varC,DC,REF(DC,1),5,0),COLOR0F33AA;
STICKLINE(var1 OR var2 OR var3 OR var4 OR var5 OR var6 OR var7 OR var8 OR var9 OR varA OR varB OR varC,DC,REF(DC,1),3,0),COLOR0F66CC;
STICKLINE(var1 OR var2 OR var3 OR var4 OR var5 OR var6 OR var7 OR var8 OR var9 OR

上一页  [1] [2] [3] [4] 下一页

股票入门声明:资讯来源于互联网,属作者个人观点,仅供投资者参考,并不构成投资建议。投资者据此操作,风险自担。