TA的每日心情 | 开心 2019-5-15 08:50 |
---|
签到天数: 134 天 [LV.7]签到七级
四段
- 积分
- 9950
|
网上抄来的,先看效果,下面第二栏就是,第三栏是传统的MACD,相比传统的MACD图,这个用颜色标明了红绿柱长短变化
% Q! j: A3 y: I
: C% t, u2 j$ J9 h6 v: u$ k公式:
, @+ n: d0 B6 P$ }P:=13;S:=5;M:=1;1 ?5 a3 u1 K. y) M+ I
DIFF:EMA(C,S)-EMA(C,P);- Z, u9 U5 S; z
DEA:EMA(DIFF,M),COLORRED;3 I3 Q1 `4 O- `) h
MACD:2*(DIFF-DEA),COLORSTICK;, e" G, Z% ^; i3 R' E* }" k+ g$ b0 S
P1:=P;S1:=S;
K4 W1 ~/ { v' `# bDIFF1:EMA(C,S1)-EMA(C,P1);+ U; n. n8 @ ]0 V. I
DEA1:EMA(DIFF,M),COLORRED;2 e6 k0 Z2 T: @- z. U
MACD1:=2*(DIFF1-DEA1);& v) n! R1 ^/ X# h1 Z3 z
MACD2:=DEA; e* u& H- ]+ q1 P
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,3,0 ),COLOR00AAFF;
2 z- w$ r8 @0 J0 a0 F& `' ~STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.8,0 ),COLOR00BBFF;
; ^7 K# q" i0 r( r4 K1 f) F4 KSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.3,0 ),COLOR00CCFF;
# r6 u1 {8 j$ rSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.2,0 ),COLOR00DDFF;0 T0 k2 ~$ q7 t/ x. K4 e# q
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1,0 ),COLOR00EEFF;
& D y+ E* q9 A( l+ m- hSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0 ),COLOR00FFFF;1 I& h) k* K# [% r. v7 S8 p9 G2 p
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.4,0 ),COLOR0000AA;7 W' j# z, j: ]( i p/ L& N0 `" x
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.2,0),COLOR0011BB;
2 H+ b, s, S% \7 s3 GSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3,0),COLOR0022CC;
/ I3 ^& Y" H7 BSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,2,0),COLOR0033DD;
( f: n5 J0 J5 m) a" B) I m) OSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,1,0),COLOR0044EE;' e9 N% \5 T# Y# h: }- t5 |
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0),COLOR0055FF;
$ `; H3 E5 l( p' `6 K& J2 DSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.4,0),COLORAA00BB;
' U" |/ J9 e1 USTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.2,0),COLORBB11BB;; X! D! _% s" y3 ^) v# j( l
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0),COLORCC22BB;
; z0 N Z% _+ I$ d& p* j& ~3 PSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,2,0 ),COLORDD33BB;
) E! p0 t; L( g( V% p# gSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,1,0),COLOREE44BB;
- ^( v2 }) X# i1 J @0 eSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5,0 ),COLORFF55BB;
) D( h# U/ L: x) m) l1 ?! JSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0 ),COLORFF7700;
) y- B% E9 G$ zSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.5 ,0 ),COLORFF8811;" X9 Q& B) y3 m
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.2,0 ),COLORFFAA22;
; |, N9 @& G2 ~1 ?STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.0 ,0 ),COLORFFBB33;2 H: E0 _0 R( h$ x; h
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.8 ,0 ),COLORFFDD44;
, W0 a! ]( O, t& i0 V* rSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5 ,0 ),COLORFFFF55;
2 o9 [" f: ~: \. cR:=(HHV(DEA,100)+ABS(LLV(DEA ,100)))/2;8 {. o$ H; } j# }" z- f& Z
R/4,POINTDOT,COLORFFFF00;
) c9 s' j$ B6 G2 ~7 Z, LR/2,POINTDOT,COLORFFFF00;- C: ]9 G; t$ ?: D/ }* e2 `
R/4*3,POINTDOT,COLORFFFF00;: f; G0 x7 m+ d
-R/4,POINTDOT,COLORFFFF00;
! h1 ^/ P5 @& k' D; s3 W-R/2,POINTDOT,COLORFFFF00;. B% A1 x0 D/ D: Q( a( A
-R/4*3,POINTDOT,COLORFFFF00;; N; A D7 d* Y; Z$ c
& V2 L/ x4 @' T+ C H* f
' g; k( a8 m: G+ B6 R
使用方法:按CTRL+F打开公式管理器,公式组选定技术指标公式后,点右边新建按钮打开指标公式编辑器,公式名称MACD2,公式类型趋势型,画线方法附图,上面公式内容复制到编辑框内,点确定编辑完毕,如下图; |; k8 E' H$ v, }0 |8 d
, A8 j+ i7 K' U$ { u6 ZZ~后在K线图窗口下的某个副图上点一下,输入公式名称MACD2,回车就可以了8 o# J# B0 a5 K$ |9 v; u0 `" N
|
|