TA的每日心情 | 开心 2019-5-15 08:50 |
---|
签到天数: 134 天 [LV.7]签到七级
四段
- 积分
- 9950
|
网上抄来的,先看效果,下面第二栏就是,第三栏是传统的MACD,相比传统的MACD图,这个用颜色标明了红绿柱长短变化$ K: w5 l, o9 m& D( ~& A$ s0 X
2 @- {) g- O* j$ t" s5 o5 R+ J0 Y
公式:
" \, d' \3 G. ?6 {: d0 dP:=13;S:=5;M:=1;
+ V. Q) K. a9 CDIFF:EMA(C,S)-EMA(C,P);
3 ^& O. k( o: E- I6 ~DEA:EMA(DIFF,M),COLORRED;
5 y1 v* v5 L) L& U, Q3 M7 CMACD:2*(DIFF-DEA),COLORSTICK;
! h" _9 u% \, ~1 I+ bP1:=P;S1:=S;" E! |8 Q7 `, X
DIFF1:EMA(C,S1)-EMA(C,P1);
$ g' m Y+ }. ]* e9 CDEA1:EMA(DIFF,M),COLORRED;" {7 L8 V; F9 ]+ T
MACD1:=2*(DIFF1-DEA1);
+ t" J/ T1 d1 p* C8 c6 wMACD2:=DEA;8 f$ B3 c2 _8 X6 A, D/ B
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,3,0 ),COLOR00AAFF;
) _3 L+ x- m( k- s; zSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.8,0 ),COLOR00BBFF;1 \ L$ E; I9 R% r9 }. g1 `3 y
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.3,0 ),COLOR00CCFF;. K/ N# F6 H0 h/ ?. G( y
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.2,0 ),COLOR00DDFF;
) c8 B: V. H( a8 R3 ~+ H U1 w/ KSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1,0 ),COLOR00EEFF;5 B" C0 X* ?& T4 \
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0 ),COLOR00FFFF;$ i5 _6 W* {, ?+ B5 r) W
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.4,0 ),COLOR0000AA;
3 A* d* H/ V1 ^2 R9 T1 RSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.2,0),COLOR0011BB;4 |2 L6 W' L9 ?$ n9 c) @( Y$ ]
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3,0),COLOR0022CC;
" Q7 [* [- x% ^+ p7 MSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,2,0),COLOR0033DD;6 [ g+ K9 w$ X) D! e' n
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,1,0),COLOR0044EE;
7 |7 ?, g# M2 ]' D, kSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0),COLOR0055FF;- Z% X& S0 A+ d6 k7 z9 V
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.4,0),COLORAA00BB;
1 Z8 d1 V* l1 N& W' _STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.2,0),COLORBB11BB;+ z+ f! D- S6 S3 S' R
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0),COLORCC22BB;4 ?- K K4 c% M- o/ h' [; Q' |! i% t
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,2,0 ),COLORDD33BB;
. A$ Y4 Q7 g, }6 gSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,1,0),COLOREE44BB;
1 g; o- [( x4 t# V* U+ j7 ^STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5,0 ),COLORFF55BB;
: e' |8 ?) r5 e' W; Y7 G( MSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0 ),COLORFF7700;
# y$ ~: X$ r$ e( a! e4 }STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.5 ,0 ),COLORFF8811;
5 w& |5 d, U* b2 OSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.2,0 ),COLORFFAA22;
# W0 V6 B9 n/ ]STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.0 ,0 ),COLORFFBB33;
' [- t2 ~; s" J, L0 ?$ s2 r6 hSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.8 ,0 ),COLORFFDD44;! a9 W8 [" f. h- N: [# F
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5 ,0 ),COLORFFFF55;
5 P9 M* ?8 Q, C/ @1 BR:=(HHV(DEA,100)+ABS(LLV(DEA ,100)))/2; ~- d$ p, O; t
R/4,POINTDOT,COLORFFFF00;! b; D& a- P- J! U0 {( U. L9 C+ w$ e
R/2,POINTDOT,COLORFFFF00;4 k$ o; f, L/ f# Q) e
R/4*3,POINTDOT,COLORFFFF00;
& \" q( e, u9 B# {1 x- x: n-R/4,POINTDOT,COLORFFFF00;
5 w& L$ ]9 S$ A/ H( l% S$ H; e5 n% r$ C-R/2,POINTDOT,COLORFFFF00;% R# M7 g7 }, U1 U
-R/4*3,POINTDOT,COLORFFFF00;! C" K4 Q& W7 s2 }# d1 P
* `, ?. _$ w% C8 C i& k2 V
8 M' @2 A) j7 N使用方法:按CTRL+F打开公式管理器,公式组选定技术指标公式后,点右边新建按钮打开指标公式编辑器,公式名称MACD2,公式类型趋势型,画线方法附图,上面公式内容复制到编辑框内,点确定编辑完毕,如下图# E3 q$ N% v/ s0 \3 q T) k1 T
8 L% i9 w" Y! q# SZ~后在K线图窗口下的某个副图上点一下,输入公式名称MACD2,回车就可以了 Y6 a. A/ g, u: C/ D$ S( `
|
|