TA的每日心情 | 开心 2019-5-15 08:50 |
---|
签到天数: 134 天 [LV.7]签到七级
四段
- 积分
- 9950
|
网上抄来的,先看效果,下面第二栏就是,第三栏是传统的MACD,相比传统的MACD图,这个用颜色标明了红绿柱长短变化
6 z7 N+ Q/ S9 q# }& H, E; I% l
" ?( n& k" d* Y$ [+ w
公式:4 C& v F* [3 s
P:=13;S:=5;M:=1;
0 u8 C- I* Q$ h/ C1 xDIFF:EMA(C,S)-EMA(C,P);
7 {' y. R& L+ hDEA:EMA(DIFF,M),COLORRED;
6 `" k* L/ [) h7 E2 F; f5 v9 N* y, X* IMACD:2*(DIFF-DEA),COLORSTICK;) t9 ]$ X& x% A' Q
P1:=P;S1:=S;
+ a9 {) J! _+ ~8 B/ KDIFF1:EMA(C,S1)-EMA(C,P1);' Z" i& s2 p" h, i" y
DEA1:EMA(DIFF,M),COLORRED;
, Y k' ?% c6 e8 uMACD1:=2*(DIFF1-DEA1);$ {0 ~# {; M9 A) }: A
MACD2:=DEA;6 I. s& a, x3 A
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,3,0 ),COLOR00AAFF;' s/ J; O, M) z9 _
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.8,0 ),COLOR00BBFF;) k* o5 y8 C* J+ b2 r
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.3,0 ),COLOR00CCFF;
. |; X1 Y$ n- f: iSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.2,0 ),COLOR00DDFF;. k: l3 P5 T+ e' v
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1,0 ),COLOR00EEFF;, B. B" D( X/ c" \
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0 ),COLOR00FFFF;
1 w) Z3 h% Z1 k9 W8 K/ `" @, V0 l' }STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.4,0 ),COLOR0000AA;& B1 o5 q7 z% U
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.2,0),COLOR0011BB;
" m) ^) b# S C. ^STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3,0),COLOR0022CC;3 k, {9 F. q: \! t- N
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,2,0),COLOR0033DD;- D& x4 w% F8 g; t6 }7 m
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,1,0),COLOR0044EE;
* ^* L, _- f; u2 k; T- KSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0),COLOR0055FF;
( v* @4 b" b; U1 TSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.4,0),COLORAA00BB;) u1 z; X! e/ P6 z- ?- _0 [. p
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.2,0),COLORBB11BB;! D" _0 a' w3 R! r$ j
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0),COLORCC22BB;
% i8 s) o3 V/ lSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,2,0 ),COLORDD33BB;/ f; S# z& I) ]7 K# T/ s
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,1,0),COLOREE44BB;# w! \9 s' o% J6 j4 [% i; n, f# Q/ p
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5,0 ),COLORFF55BB;
/ w, E6 @% r' g* I' KSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0 ),COLORFF7700;: ^) [8 n+ w: m( S8 V7 Q
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.5 ,0 ),COLORFF8811;( f4 |+ g i" l1 ~" }; `, U! R3 t& o
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.2,0 ),COLORFFAA22;8 c6 g1 \: V& R' s4 I& d% [
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.0 ,0 ),COLORFFBB33;8 j7 X7 R) r- p+ V) Z
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.8 ,0 ),COLORFFDD44;
+ D. n" `/ U( _0 D, k/ WSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5 ,0 ),COLORFFFF55;
. g$ z2 I9 S' x( p+ S% X9 ZR:=(HHV(DEA,100)+ABS(LLV(DEA ,100)))/2;. x: i, A, m4 U8 L- f# h
R/4,POINTDOT,COLORFFFF00;
1 |3 ?% q2 S0 X) w9 P4 lR/2,POINTDOT,COLORFFFF00;
+ J2 _4 B: _# K* j9 k4 Y3 tR/4*3,POINTDOT,COLORFFFF00;) h) V, d, k5 z; m
-R/4,POINTDOT,COLORFFFF00;7 e$ p- f/ u6 g" {! J0 d
-R/2,POINTDOT,COLORFFFF00;
! M9 _( `( U! i. y-R/4*3,POINTDOT,COLORFFFF00;& |5 ~6 z2 E5 C
0 A" X7 b6 R! v: Z) K | Z. p) N( M/ x. ~8 x
使用方法:按CTRL+F打开公式管理器,公式组选定技术指标公式后,点右边新建按钮打开指标公式编辑器,公式名称MACD2,公式类型趋势型,画线方法附图,上面公式内容复制到编辑框内,点确定编辑完毕,如下图
0 H3 Q* A1 ]7 ~7 Z) }. P7 `0 g
" I. w9 P' m6 L
Z~后在K线图窗口下的某个副图上点一下,输入公式名称MACD2,回车就可以了: p+ C# {7 z- }" x( V
|
|