杨天 2008-10-4 10:22
macd经典战法
短线趋势:= EMA(CLOSE,12) - EMA(CLOSE,26);
tm:=EMA(短线趋势+短线趋势*0.34,9);
tm1:=ema(tm,1);
tm2:=ema(tm,2);
tm3:=ema(tm,3);
tm4:=ema(tm,4);
tm5:=ema(tm,5);
上升:IF(tm>tm3 and tm>0,tm1,tm),COLORRED,linethick1;
IF(tm>tm3 and tm>0,tm2,tm),COLORRED,linethick2;
IF(tm>tm3 and tm>0,tm3,tm),COLORRED,linethick2;
IF(tm>tm3 and tm>0,tm4,tm),COLORRED,linethick2;
IF(tm>tm3 and tm>0,tm5,tm),COLORRED,linethick2;
IF(tm>tm3 and tm<0,tm1,tm),colorff00ff,linethick2;
IF(tm>tm3 and tm<0,tm2,tm),colorff00ff,linethick2;
IF(tm>tm3 and tm<0,tm3,tm),colorff00ff,linethick2;
IF(tm>tm3 and tm<0,tm4,tm),colorff00ff,linethick2;
IF(tm>tm3 and tm<0,tm5,tm),colorff00ff,linethick2;
下降:IF(tm<tm3 and tm>0,tm1,tm),colorwhite,linethick2;
IF(tm<tm3 and tm>0,tm2,tm),colorwhite,linethick2;
IF(tm<tm3 and tm>0,tm3,tm),colorwhite,linethick2;
IF(tm<tm3 and tm>0,tm4,tm),colorwhite,linethick2;
IF(tm<tm3 and tm>0,tm5,tm),colorwhite,linethick2;
IF(tm<tm3 and tm<0,tm1,tm),color00ff00,linethick2;
IF(tm<tm3 and tm<0,tm2,tm),color00ff00,linethick2;
IF(tm<tm3 and tm<0,tm3,tm),color00ff00,linethick2;
IF(tm<tm3 and tm<0,tm4,tm),color00ff00,linethick2;
IF(tm<tm3 and tm<0,tm5,tm),color00ff00,linethick2;
EMA(短线趋势+短线趋势*0.34,20),COLOR225599;
0,color00ff00;
买线:=EMA(C,5),colorred,linethick2;
A:=(REF(买线,1));
卖线:=EMA(SLOPE(C,21)*20+C,42),linethick2;
b:=cross(买线,卖线);
s:=cross(卖线,买线);
drawtext(b,0,'买 '),colorf00ff0,linethick1;
drawtext(s,0,'卖'),coloryellow,linethick1;
DIFF:= EMA(CLOSE,12) - EMA(CLOSE,26),COLORff00ff;
DEA:= EMA(DIFF,12);
MACD: 2*(DIFF-DEA), COLORSTICK ,linethick2;
STICKLINE(macd<ref(macd,1),macd,0,2,1),color00ff00 ,linethick2;
[[i] 本帖最后由 杨天 于 2008-10-4 10:29 编辑 [/i]]
639舰 2008-10-4 10:59
:handshake :handshake :handshake
六六顺顺 2008-10-5 10:55
:victory: :victory: :victory: