TA的每日心情 | 开心 2019-5-15 08:50 |
---|
签到天数: 134 天 [LV.7]签到七级
四段
- 积分
- 9950
|
网上抄来的,先看效果,下面第二栏就是,第三栏是传统的MACD,相比传统的MACD图,这个用颜色标明了红绿柱长短变化
T( V- x5 m4 c2 s+ O7 o/ z
3 E& Y7 S; X* a+ ]- j( F! U& h0 M公式:. u% k& i* A+ ~4 ~9 G5 [
P:=13;S:=5;M:=1;
) v. B' V z: DDIFF:EMA(C,S)-EMA(C,P);
" w% l z: P. v+ t# n B3 ^DEA:EMA(DIFF,M),COLORRED;
# x5 v% P& G( h# x* e* OMACD:2*(DIFF-DEA),COLORSTICK;
! y& |- O7 y8 I; UP1:=P;S1:=S;! f' F$ d3 S! ^
DIFF1:EMA(C,S1)-EMA(C,P1);
) D4 n6 ?6 `6 V8 X/ CDEA1:EMA(DIFF,M),COLORRED;
9 t0 h' K0 J6 \. u" PMACD1:=2*(DIFF1-DEA1);
% F& v2 n4 e& F+ QMACD2:=DEA;
8 u* k* t6 f- f2 NSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,3,0 ),COLOR00AAFF;" l; Z6 {0 x4 q5 z6 M- R) M6 ~
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.8,0 ),COLOR00BBFF;
, u. i+ M# n/ U: I. HSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.3,0 ),COLOR00CCFF;5 i5 d+ w" e) `' a& ~, ^) B
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.2,0 ),COLOR00DDFF;2 V6 a0 i7 @' [4 }: C4 Q( W
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1,0 ),COLOR00EEFF;. U& N6 E# Z" {- c) W
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0 ),COLOR00FFFF;- y0 M2 n# b5 p2 O/ T. a: Z: L
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.4,0 ),COLOR0000AA;
9 I! F0 S- {4 G0 _5 q- u' rSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.2,0),COLOR0011BB;
. ~8 p5 k5 {% ~9 wSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3,0),COLOR0022CC;
5 w, J6 A f# P" }4 dSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,2,0),COLOR0033DD;9 W5 T/ G6 A4 |
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,1,0),COLOR0044EE;( B- S. k6 @3 @
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0),COLOR0055FF;
" k% r* c, t0 @5 ^- p) p) e, rSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.4,0),COLORAA00BB;
0 P6 e+ W3 @2 p* q% T5 q2 ~+ KSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.2,0),COLORBB11BB;! s0 [4 [' U" c: ~
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0),COLORCC22BB;
L! d" j2 k0 G$ x+ A5 s i, ASTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,2,0 ),COLORDD33BB;' ?2 B% z# n8 e( Z
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,1,0),COLOREE44BB;
; `1 u- d" k) o, GSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5,0 ),COLORFF55BB;
( r& j" }0 V7 L% eSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0 ),COLORFF7700;( j5 _1 q' f7 P/ K/ Y- l
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.5 ,0 ),COLORFF8811;
; m0 |% E9 C! P) C! \STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.2,0 ),COLORFFAA22;
6 b) j; ^) w- `STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.0 ,0 ),COLORFFBB33;5 [& X v5 k; p; }! F
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.8 ,0 ),COLORFFDD44;
6 F. n3 C* h7 M& j! w3 nSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5 ,0 ),COLORFFFF55;
, U. [' T6 p$ u+ y& Z5 _8 j$ OR:=(HHV(DEA,100)+ABS(LLV(DEA ,100)))/2; ?/ w+ c4 R8 z- \; {* K* M# M
R/4,POINTDOT,COLORFFFF00;# o3 g' Q0 x, S1 T% k% l& u
R/2,POINTDOT,COLORFFFF00;* M+ ?. U- m2 W) o( U
R/4*3,POINTDOT,COLORFFFF00;' e/ i9 w# x9 k _0 [7 Y/ C
-R/4,POINTDOT,COLORFFFF00;
5 _" a; ^9 L3 V* X* i# D: u1 s-R/2,POINTDOT,COLORFFFF00;4 l2 N/ m$ S3 M& q# e5 E! c
-R/4*3,POINTDOT,COLORFFFF00;
6 ^9 J$ @2 ^. {7 p( |
0 ?; N% T/ v. p5 j8 U9 d$ @
& _+ @' ]/ Q% r3 A; e, z& m使用方法:按CTRL+F打开公式管理器,公式组选定技术指标公式后,点右边新建按钮打开指标公式编辑器,公式名称MACD2,公式类型趋势型,画线方法附图,上面公式内容复制到编辑框内,点确定编辑完毕,如下图8 x9 k' a, G9 L% a
' z' l6 f/ Y1 U; ~3 @0 b; ` mZ~后在K线图窗口下的某个副图上点一下,输入公式名称MACD2,回车就可以了
. n. V# v' W) E0 H2 W
|
|