TA的每日心情 | 开心 2019-5-15 08:50 |
---|
签到天数: 134 天 [LV.7]签到七级
四段
- 积分
- 9950
|
网上抄来的,先看效果,下面第二栏就是,第三栏是传统的MACD,相比传统的MACD图,这个用颜色标明了红绿柱长短变化1 A- l" t i: s0 A8 D
5 @5 a8 t5 U* _& j, C5 k. a# n
公式:0 d$ y' `* B- T( a6 a
P:=13;S:=5;M:=1;" f6 k, v8 R7 q; b7 p# a& |: H
DIFF:EMA(C,S)-EMA(C,P);
: R% O4 w% e% u" i. l3 A |DEA:EMA(DIFF,M),COLORRED;
& r; P! I6 G% {) D/ b2 fMACD:2*(DIFF-DEA),COLORSTICK;
% k# `+ M* l" MP1:=P;S1:=S;
8 R9 h% D3 y7 S5 M d" SDIFF1:EMA(C,S1)-EMA(C,P1);
- U5 m. M- F+ q8 k' YDEA1:EMA(DIFF,M),COLORRED;
4 g' j& _: \' ?+ a2 K: }- gMACD1:=2*(DIFF1-DEA1);
0 ^, N( y9 R2 Y8 v% _MACD2:=DEA;/ X( }: w7 [7 _( \" |/ N
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,3,0 ),COLOR00AAFF;; m* s% g. h+ Q& ]0 o% R
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.8,0 ),COLOR00BBFF;
3 i+ F7 l- J3 l/ j6 DSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.3,0 ),COLOR00CCFF;
! M. [ U8 w R& G) P7 vSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.2,0 ),COLOR00DDFF;8 D9 ?5 n6 d5 z! C+ ?- ?$ g. V% D
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1,0 ),COLOR00EEFF;* c- u! Q$ J; j+ q) o8 y x
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0 ),COLOR00FFFF;9 I v+ c/ b9 G& ?" A
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.4,0 ),COLOR0000AA;
2 r5 d7 I0 H0 X! ^- K8 j) bSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.2,0),COLOR0011BB;3 S' W f: i3 {) t6 }
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3,0),COLOR0022CC;& w9 h: t! Y( x/ r: [9 T3 P
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,2,0),COLOR0033DD;" o4 V' T9 N" X/ T2 J; I+ O
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,1,0),COLOR0044EE;
; [% I) M3 Y9 w5 Z8 dSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0),COLOR0055FF;# z4 U7 Z3 P# N" \' ~+ n0 |
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.4,0),COLORAA00BB;
" O7 E/ y' O, L, j K0 M- kSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.2,0),COLORBB11BB;% W+ }6 C& c# G3 O7 z* V5 g; E6 b) @" F6 O
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0),COLORCC22BB;* C9 q/ \- @" y3 Y q
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,2,0 ),COLORDD33BB;
- N. @# G0 w/ Y6 NSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,1,0),COLOREE44BB;
9 E# g# q) t- s9 l3 SSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5,0 ),COLORFF55BB;+ [" ]1 c3 g& j- Y
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0 ),COLORFF7700;3 M0 A2 ]1 M: s B" Y
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.5 ,0 ),COLORFF8811;6 L0 }0 _0 i5 u0 R
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.2,0 ),COLORFFAA22;
* c* y a- v2 A/ ?1 C$ p+ nSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.0 ,0 ),COLORFFBB33;7 V$ t/ g0 ~. f4 X& @
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.8 ,0 ),COLORFFDD44;7 X/ t& k( L/ U( i, g1 u8 k$ e& ]
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5 ,0 ),COLORFFFF55;
g! X$ f, h* f1 g4 ` n0 c/ c; T# wR:=(HHV(DEA,100)+ABS(LLV(DEA ,100)))/2;
& m! W* m5 l n! aR/4,POINTDOT,COLORFFFF00;( Y3 Z4 S7 ^6 z- y6 W% ?, F: C
R/2,POINTDOT,COLORFFFF00;
6 l# H# H+ u9 q' a {2 x. xR/4*3,POINTDOT,COLORFFFF00;1 ?) e9 D1 h, h1 F
-R/4,POINTDOT,COLORFFFF00;) ]( d4 K% u5 Y% W' x; g
-R/2,POINTDOT,COLORFFFF00;
1 ^/ a7 Y6 P7 H9 T0 t: D8 E-R/4*3,POINTDOT,COLORFFFF00;4 [8 f2 h) i' V$ S- g& p: G) A. I' ^
0 H5 E' {4 n- {
" A. {+ P& w, Z# k' W6 _使用方法:按CTRL+F打开公式管理器,公式组选定技术指标公式后,点右边新建按钮打开指标公式编辑器,公式名称MACD2,公式类型趋势型,画线方法附图,上面公式内容复制到编辑框内,点确定编辑完毕,如下图( j9 K2 }3 K" `
0 X- I6 w, `( }2 J6 p6 }. F! A7 R1 t6 k
Z~后在K线图窗口下的某个副图上点一下,输入公式名称MACD2,回车就可以了
% e# v: l; D' ]0 ^1 N
|
|