TA的每日心情 | 开心 2019-5-15 08:50 |
---|
签到天数: 134 天 [LV.7]签到七级
四段
- 积分
- 9950
|
网上抄来的,先看效果,下面第二栏就是,第三栏是传统的MACD,相比传统的MACD图,这个用颜色标明了红绿柱长短变化" ?# B9 k4 T ^8 k" j* Q) L
# ~. g2 {) ^' X公式:0 | a9 a/ l% h
P:=13;S:=5;M:=1;
3 G) f" u* C3 L# }DIFF:EMA(C,S)-EMA(C,P);( m2 @( t$ m2 @& b/ B a
DEA:EMA(DIFF,M),COLORRED;
) `& k" l# I, C- D8 t4 J" BMACD:2*(DIFF-DEA),COLORSTICK;) Y0 H* i% I+ ~! [
P1:=P;S1:=S;
: M( f( W6 z, V' g# {1 T8 LDIFF1:EMA(C,S1)-EMA(C,P1);8 v1 ^; |5 y9 D! R: F Q2 }% b
DEA1:EMA(DIFF,M),COLORRED;/ g8 t* O1 B/ l1 A' G2 C' @
MACD1:=2*(DIFF1-DEA1);
7 x4 W/ w0 ~' T: _7 @! k6 XMACD2:=DEA;( U% K& u5 w- \9 k: b+ S
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,3,0 ),COLOR00AAFF;( I* W) E5 [8 K- p S; q
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.8,0 ),COLOR00BBFF;8 b4 X' D3 { @; i5 ^! o
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.3,0 ),COLOR00CCFF;9 M" A/ |" U5 c0 k5 c
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.2,0 ),COLOR00DDFF;
4 `: u8 M4 S' j1 E8 r0 q. ?) MSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1,0 ),COLOR00EEFF;
; y, q! c" j" v5 C* @; _6 BSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0 ),COLOR00FFFF;
+ M% s7 |/ I. d* U" t- I8 @7 FSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.4,0 ),COLOR0000AA;
$ u0 v7 C$ c5 L' G4 J2 NSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.2,0),COLOR0011BB;
7 ]! P4 p3 W3 r( B; S, F) n7 BSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3,0),COLOR0022CC;
v/ D3 o( K: N2 }) N# FSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,2,0),COLOR0033DD; s/ c1 ?. Z) D: I! Y8 Z6 }. T5 @
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,1,0),COLOR0044EE;6 S S' W7 C' I3 Y/ j1 w+ E
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0),COLOR0055FF;
L. w% h. K! F3 |STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.4,0),COLORAA00BB;
7 Q3 r! _( h+ W/ ~2 ISTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.2,0),COLORBB11BB;
7 x( ^) O9 C/ z2 j4 f6 Y$ q% F7 pSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0),COLORCC22BB;. j( K' l c0 ~& c6 a! w: ]* j
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,2,0 ),COLORDD33BB;7 j7 L) P/ ^! m" [, z$ P* z: B
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,1,0),COLOREE44BB;
, b) p& `9 j% E9 iSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5,0 ),COLORFF55BB;/ V6 J$ x; G4 u1 A5 K- s
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0 ),COLORFF7700;" K; Y, d4 m! B# I# ~ X2 `9 b& M
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.5 ,0 ),COLORFF8811;( O {! g2 W5 l0 B
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.2,0 ),COLORFFAA22;$ |9 Q: M/ X' O/ H) d1 p
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.0 ,0 ),COLORFFBB33;" C4 i: {( r. ?* Z
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.8 ,0 ),COLORFFDD44;8 X/ \7 P0 r v" a% r5 F
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5 ,0 ),COLORFFFF55;6 `2 \# g+ x2 l: A5 R! F; ?
R:=(HHV(DEA,100)+ABS(LLV(DEA ,100)))/2;
- _5 y4 T$ U, R6 [7 G- B& H- X6 UR/4,POINTDOT,COLORFFFF00;
5 i* t5 A5 {( M: TR/2,POINTDOT,COLORFFFF00;# y$ ^* t+ A9 g- x7 X% ]% \
R/4*3,POINTDOT,COLORFFFF00;
! }& U3 c3 A E& T4 a-R/4,POINTDOT,COLORFFFF00;
1 r' C( N+ F+ Q-R/2,POINTDOT,COLORFFFF00;6 t& N( F" Q) }7 C% G1 P, B
-R/4*3,POINTDOT,COLORFFFF00;
8 m, y1 }% {* w: T" u$ |5 B7 T& H2 F; f
) E$ ]7 g4 t' A' i2 z, e
- Q/ l( Y( {0 A& y7 G2 p使用方法:按CTRL+F打开公式管理器,公式组选定技术指标公式后,点右边新建按钮打开指标公式编辑器,公式名称MACD2,公式类型趋势型,画线方法附图,上面公式内容复制到编辑框内,点确定编辑完毕,如下图$ K* b2 q3 \4 A6 b+ e
7 G' ]8 j" v: g6 I8 x' zZ~后在K线图窗口下的某个副图上点一下,输入公式名称MACD2,回车就可以了
, F$ V( x9 e0 d
|
|