私募

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz

[选股技巧] [通达信] MACD 经典指标

[复制链接]
发表于 2019-5-22 01:07:09 | 显示全部楼层 |阅读模式
{MACD实战0源码}( n3 ~- }; [2 x) a6 s5 U; b
中DIFFEMA(CLOSE,12) - EMA(CLOSE,26)),LINETHICK2,COLOR2A2AA5;& y, m! Y7 S9 c* U3 t
中DEA:EMA(中DIFF,9),COLORFFFF00;  W/ r' M9 x! S1 ~' r) J' I& k
MACD2:(2 * (中DIFF -中DEA)),LINETHICK0,COLORFFFF00;8 S5 W3 t9 m( w8 @' j- X1 U& n
STICKLINE((MACD2>=0),0,MACD2,1,1),COLORD700FF;) e1 _3 d' @. \/ o
STICKLINE(((MACD2>=0) AND (MACD2 < REF(MACD2,1))),0,MACD2,1,0),COLOR0099FF;: G# V; q; N' K8 l3 b7 ]/ j
STICKLINE((MACD2= REF(UDGLINE,1)) AND (CLOSE < UDGLINE)) AND (TUD0 < TDU0));
) q" S5 `/ Y0 X( ]5 w8 m. OJDU1:=(JDU0 AND (COUNT(JDU0,TDU0) = 1));
. S% N: |( `$ P' ?; m3 NJUD1:=(JUD0 AND (COUNT(JUD0,TUD0) = 1));* a& B0 l4 ~& g: a8 d
JDU2:=(JDU1 AND (REF(BARSLAST(JUD1),1) < REF(BARSLAST(JDU1),1)));
: c2 e3 T6 X# t. `JUD2:=(JUD1 AND (REF(BARSLAST(JUD1),1) > REF(BARSLAST(JDU1),1)));% u- {+ h; R8 u
JDU3:=(JDU1 AND (REF(BARSLAST(JUD1),1) > REF(BARSLAST(JDU1),1)));! b' C" N' i9 v6 Z2 b
JUD3:=(JUD1 AND (REF(BARSLAST(JUD1),1) < REF(BARSLAST(JDU1),1)));
$ |8 f9 K$ r6 c/ rBSLINE:=IF((BARSLAST(JDU2) < BARSLAST(JUD2)),IF(REF(CROSS(0,MACD2),1),LLV(LOW,2),REF(LLV(LOW,2),BARSLAST(REF(CROSS(0,MACD2),1)))),IF(REF(CROSS(MACD2,0),1),HHV(HIGH,2),REF(HHV(HIGH,2),BARSLAST(REF(CROSS(MACD2,0),1)))));) y2 M( |) C$ w( a4 @/ U

6 g+ g- N' t/ y& wDEFUT:=BARSLAST(CROSS(MACD2,0));! C+ ~0 n5 V2 `
DEFDT:=BARSLAST(CROSS(0,MACD2));# ]" [% u0 x( u) G; C2 b$ b
DEFUL:=IF((MACD2 >= 0),HHV(MACD2,(DEFUT + 1)),REF(HHV(MACD2,(DEFUT + 1)),(DEFDT + 1)));2 E+ l  k( ?1 h8 U1 U3 G8 _
DEFDL:=IF((MACD2 < 0),LLV(MACD2,(DEFDT + 1)),REF(LLV(MACD2,(DEFDT + 1)),(DEFUT + 1)));; I7 T9 _- U5 t- Y- y/ b
DEFU2L:=REF(DEFUL,(DEFUT + 1));
& Q, H; K$ E3 d+ T7 ]DEFD2L:=REF(DEFDL,(DEFDT + 1));
+ y% D$ E* E. _7 dSTICKLINE(中DIFF>=中DEA,中DIFF,中DEA,6,0),COLOR00FFFF;
( {, g; t! I  f- ]: m$ ySTICKLINE(中DIFF=短DEA,短DIFF,DRAWNULL),COLORRED,LINETHICK2;. d. Q" z' }/ K3 r

/ U. O% O( d  C' F0 h" WD1:=EMA(C,3)-EMA(C,8);6 r# I3 [( B+ f
D2:=EMA(O,3)-EMA(O,8);& d! r( s. O! N1 }( v! y; s& W
D3:=EMA(H,3)-EMA(H,8);/ ]2 T1 d. y9 m& ?, Y5 F; A2 `
D4:=EMA(L,3)-EMA(L,8);
" e, J) w. A+ G  c" s3 Q  `  _DRAWICON(((((LLV(MACD2,4) > 0) AND (MACD2 < REF(MACD2,1))) AND (REF(MACD2,1) > REF(MACD2,2))) AND (REF(MACD2,2) > REF(MACD2,3))),MACD2,6);9 Y" {# d  `7 M( U! j' p
DRAWICON(((((HHV(MACD2,4) < 0) AND (MACD2 > REF(MACD2,1))) AND (REF(MACD2,1) < REF(MACD2,2))) AND (REF(MACD2,2) < REF(MACD2,3))),MACD2,4);
7 u  B' B: m! |+ uDRAWICON(CROSS(中DIFF,D1) AND 中DIFF>0.1 ,D3+0.1,2);
" o1 c& U  l- H5 \$ ^1 ^EE:=CROSS(中DIFF,中DEA) AND MACD2>REF(MACD2,1) AND 短DIFF>=REF(短DIFF,1) AND 中DEA>=REF(中DEA,1);- U4 X) t* T: x8 {6 q: A1 R# v* m
出来:=FILTER(EE,10);! J3 v0 n2 ^( K
DRAWICON(出来,中DEA,1);
http://www.simu001.cn/x73643x1x1.html
最好的私募社区 | 第一私募论坛 | http://www.simu001.cn

精彩推荐

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Archiver| ( 桂ICP备12001440号-3 )|网站地图

GMT+8, 2024-11-24 01:05 , Processed in 0.999707 second(s), 26 queries .

Powered by www.simu001.cn X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表