TA的每日心情 | 开心 2019-5-15 08:50 |
---|
签到天数: 134 天 [LV.7]签到七级
四段

- 积分
- 9950
|
网上抄来的,先看效果,下面第二栏就是,第三栏是传统的MACD,相比传统的MACD图,这个用颜色标明了红绿柱长短变化
: e% H! g+ B2 K8 z/ ?5 ~7 t
1 w" y* P6 }" w( L5 D/ Q公式:; _: [# R, u. J$ F0 P6 J
P:=13;S:=5;M:=1;' D* U" S. J: l8 W7 h, `
DIFF:EMA(C,S)-EMA(C,P);) J: ^0 { k; j4 w; C4 T
DEA:EMA(DIFF,M),COLORRED;
: j# N; J' m/ |" ~1 TMACD:2*(DIFF-DEA),COLORSTICK; R. t/ q# [& H; F
P1:=P;S1:=S;
F. j9 O9 J7 eDIFF1:EMA(C,S1)-EMA(C,P1);
3 X Q- T' ?( T* x% d( L) R+ DDEA1:EMA(DIFF,M),COLORRED;
/ v8 ?5 O& b9 _% R Z8 u# GMACD1:=2*(DIFF1-DEA1);
/ |. k% ]8 P/ UMACD2:=DEA;
0 ~. ^, E T' I' u$ JSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,3,0 ),COLOR00AAFF;
1 z! u/ l- {6 g# t4 nSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.8,0 ),COLOR00BBFF;3 I2 U$ [. }2 @; d4 G' |/ x
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.3,0 ),COLOR00CCFF;. i5 ~1 b5 d7 A- D
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.2,0 ),COLOR00DDFF;
& m$ g$ W: a. qSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1,0 ),COLOR00EEFF;: c+ J3 c5 o* B; a- e# T
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0 ),COLOR00FFFF;. }4 d8 ^- v8 \7 n2 l& t
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.4,0 ),COLOR0000AA;
+ x1 R9 r& u$ c" VSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.2,0),COLOR0011BB;
+ s f$ _' W: ^& }9 eSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3,0),COLOR0022CC;0 D* A. ]- Z" p2 j3 ~8 J
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,2,0),COLOR0033DD;
7 q8 W- Z5 U5 oSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,1,0),COLOR0044EE;
; q8 _2 |# c% R, `" G: I5 C& ySTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0),COLOR0055FF;
. a6 y7 _8 l2 |; V( m: `STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.4,0),COLORAA00BB;& [& k( s0 l2 Q8 t. N
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.2,0),COLORBB11BB;7 f# k" z6 Y% i& B2 A% ^5 m, [
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0),COLORCC22BB;8 h- h5 O) A: _% Z! R- ^7 r
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,2,0 ),COLORDD33BB;
% |! g$ O; E5 D$ P; WSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,1,0),COLOREE44BB;& Y0 }% I$ v% w9 o
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5,0 ),COLORFF55BB;# F7 ]9 V8 c0 J' g
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0 ),COLORFF7700;
: k+ v9 ^1 _( w0 ?STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.5 ,0 ),COLORFF8811;
5 S6 S( j9 {+ W: S: w, \& O7 @$ DSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.2,0 ),COLORFFAA22;
0 J5 B L+ K. Q5 t/ `' i. B2 eSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.0 ,0 ),COLORFFBB33;. e2 l! Q7 f0 u) |3 X' d
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.8 ,0 ),COLORFFDD44;
4 P0 p5 @& J, U2 R! _STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5 ,0 ),COLORFFFF55;! [5 _ F! D O( @
R:=(HHV(DEA,100)+ABS(LLV(DEA ,100)))/2;% _3 ~. i2 T3 K1 D# D
R/4,POINTDOT,COLORFFFF00;# [/ ]1 L) R1 U+ X4 E3 W4 B
R/2,POINTDOT,COLORFFFF00;$ j5 M5 ]1 E' H1 V& I1 E
R/4*3,POINTDOT,COLORFFFF00;$ G- b- g+ J2 j$ [* d- H+ f
-R/4,POINTDOT,COLORFFFF00;" Q# q. z% Y2 T* ?# q( P
-R/2,POINTDOT,COLORFFFF00;- E% Y; r. e- `, u( x
-R/4*3,POINTDOT,COLORFFFF00;
$ \0 V% y( c4 C- E. z
2 {8 c2 E# x) M& }! g( E* P( `+ H' w7 s: b# R
使用方法:按CTRL+F打开公式管理器,公式组选定技术指标公式后,点右边新建按钮打开指标公式编辑器,公式名称MACD2,公式类型趋势型,画线方法附图,上面公式内容复制到编辑框内,点确定编辑完毕,如下图
+ J% [' n6 X1 S
: t3 \# F/ |; G2 \( L9 Q4 lZ~后在K线图窗口下的某个副图上点一下,输入公式名称MACD2,回车就可以了
" f0 w5 }, ~) T
|
|