TA的每日心情 | 开心 2019-5-15 08:50 |
---|
签到天数: 134 天 [LV.7]签到七级
四段
- 积分
- 9950
|
网上抄来的,先看效果,下面第二栏就是,第三栏是传统的MACD,相比传统的MACD图,这个用颜色标明了红绿柱长短变化
. A+ w; k& y- P& `3 f
# z. p \( s7 T. n1 K
公式:
! e' {0 b2 P8 c! G. _$ @- L7 @P:=13;S:=5;M:=1;
, A V, t' C& h+ ^; E) fDIFF:EMA(C,S)-EMA(C,P);
4 M. g- t) [: x+ b: R) pDEA:EMA(DIFF,M),COLORRED;
, N: C; u, D- TMACD:2*(DIFF-DEA),COLORSTICK;( W/ N% t p R
P1:=P;S1:=S;. { \/ A2 _! C) n7 P. {
DIFF1:EMA(C,S1)-EMA(C,P1);
k, ]" o" q- F. iDEA1:EMA(DIFF,M),COLORRED;
# H. G- f" X( w* `MACD1:=2*(DIFF1-DEA1);. D; j) d- Z$ b2 j8 W; a
MACD2:=DEA;' J s$ m: H+ D N$ ?
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,3,0 ),COLOR00AAFF;3 Q( p( e( b+ R5 U+ _3 \
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.8,0 ),COLOR00BBFF;
% }% `+ i# t r- ?* oSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.3,0 ),COLOR00CCFF;5 g k% _5 h3 |" Z( o5 Q
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.2,0 ),COLOR00DDFF;
7 _/ a D+ Y" t$ w8 A! Y/ x* fSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1,0 ),COLOR00EEFF;3 a$ Z+ S. W5 \" M) i
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0 ),COLOR00FFFF;. m5 K: k5 a! ]
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.4,0 ),COLOR0000AA;
5 p+ ^% s/ [0 f6 Z1 e0 XSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.2,0),COLOR0011BB;
" A% j! V0 `/ W( | ~STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3,0),COLOR0022CC;
0 O! g+ Y$ Q- Q2 A8 L9 F7 TSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,2,0),COLOR0033DD;
, W; D) R3 q- T& TSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,1,0),COLOR0044EE;# [" l" O3 @( e |2 X1 e8 I
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0),COLOR0055FF;
, k) U& R5 _2 Z! f' L: {/ fSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.4,0),COLORAA00BB;6 s3 _0 H* U( U' Z
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.2,0),COLORBB11BB;* X2 k7 ~, u. J e' v
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0),COLORCC22BB;$ `1 T. ^, Q, x; H' ?2 r) M/ V F+ V
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,2,0 ),COLORDD33BB;0 q5 \/ c, W" E5 W1 @9 @
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,1,0),COLOREE44BB;
5 `, C8 Y/ k" WSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5,0 ),COLORFF55BB;
8 R, k0 f. V/ C4 f7 n/ NSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0 ),COLORFF7700;
) N' {, l. C8 L% ~0 a/ i4 X6 f" |STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.5 ,0 ),COLORFF8811;2 u1 B. G& k1 V7 A- ^
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.2,0 ),COLORFFAA22;
7 k( I5 _1 b$ C6 L8 ]) MSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.0 ,0 ),COLORFFBB33;/ ~; d# d6 v1 P) w! L: x/ v
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.8 ,0 ),COLORFFDD44;9 w7 U+ y$ x" T5 J
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5 ,0 ),COLORFFFF55;& k0 ^+ V! M- @ d, ^2 ]
R:=(HHV(DEA,100)+ABS(LLV(DEA ,100)))/2;
" e, H2 e1 `9 ^, C2 N8 S: @7 d% l1 zR/4,POINTDOT,COLORFFFF00;, j) t' {) T' m# g+ a
R/2,POINTDOT,COLORFFFF00;
9 V5 w+ B: J. M) A' x. XR/4*3,POINTDOT,COLORFFFF00;
4 |: m: w5 c2 E: W. ]: i) @-R/4,POINTDOT,COLORFFFF00;
% q( m4 ?' E# U; b u-R/2,POINTDOT,COLORFFFF00;
. M; q4 A, T# m-R/4*3,POINTDOT,COLORFFFF00;$ R1 R. O( X9 C# D
1 |+ q, d! a1 i& @7 n) r, U, r, V, R6 t* \2 u2 C
使用方法:按CTRL+F打开公式管理器,公式组选定技术指标公式后,点右边新建按钮打开指标公式编辑器,公式名称MACD2,公式类型趋势型,画线方法附图,上面公式内容复制到编辑框内,点确定编辑完毕,如下图
5 x8 ~/ x. ]5 |, r4 ]5 l
$ E1 J. M/ H) A) u; e
Z~后在K线图窗口下的某个副图上点一下,输入公式名称MACD2,回车就可以了) A( G3 K& H' a5 Z+ ^: {/ H( {$ {
|
|