TA的每日心情 | 开心 2019-5-15 08:50 |
---|
签到天数: 134 天 [LV.7]签到七级
四段
- 积分
- 9950
|
网上抄来的,先看效果,下面第二栏就是,第三栏是传统的MACD,相比传统的MACD图,这个用颜色标明了红绿柱长短变化# y2 z7 x" Y' z+ M, t
6 V& q7 M1 S2 C- W. f9 m& w1 J公式:
+ J1 {' }3 \" ~2 u& UP:=13;S:=5;M:=1;3 a; n+ a& R- z- p: z
DIFF:EMA(C,S)-EMA(C,P);
) @3 `. {+ G6 E; D( [* [DEA:EMA(DIFF,M),COLORRED;
+ |2 [- @7 T7 Y2 \6 c0 OMACD:2*(DIFF-DEA),COLORSTICK;. p9 _# f3 E$ |8 ]- b+ X
P1:=P;S1:=S;
; g& s) w, t+ C" ?# `4 y2 y' k4 o- o( YDIFF1:EMA(C,S1)-EMA(C,P1);/ D m6 X; p& P9 m
DEA1:EMA(DIFF,M),COLORRED;
& g. ~! Y$ p0 W4 S4 U7 w* zMACD1:=2*(DIFF1-DEA1);* A1 w: v* l {8 ~
MACD2:=DEA;) k0 c) L1 s7 c5 o& L$ \: G6 S. V
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,3,0 ),COLOR00AAFF;. X" d. V2 R9 i( F
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.8,0 ),COLOR00BBFF;" B h& C. i- s& }3 X- d$ @
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.3,0 ),COLOR00CCFF; I) Q9 D: x: ^/ E* ?/ G6 @4 p |/ n0 Z
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.2,0 ),COLOR00DDFF;$ Q X) b6 X. @- P
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1,0 ),COLOR00EEFF;% u% K/ T, ~5 F. A3 i2 m4 f
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0 ),COLOR00FFFF;
; s6 Y I5 v" p1 bSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.4,0 ),COLOR0000AA;" Z1 a. Z* |) N: c# _! D8 |
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.2,0),COLOR0011BB;
7 o9 e" T; }/ W& J1 ~! U) n# CSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3,0),COLOR0022CC;! t0 ~0 l( \- T$ o- {" U$ g
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,2,0),COLOR0033DD;$ ?, ~. Q+ u+ z0 A, x6 B
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,1,0),COLOR0044EE;/ r4 p$ a) v2 ^& J: z0 P8 _
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0),COLOR0055FF;
4 \) J8 X6 z T. w6 {STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.4,0),COLORAA00BB;
( @7 F* R* c; U4 u2 {4 c% V7 ]STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.2,0),COLORBB11BB;
" v: r1 A% w( p$ O4 {STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0),COLORCC22BB;
% n+ _( n8 Q: \5 H4 Q T& FSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,2,0 ),COLORDD33BB;2 K% W4 s6 y0 ~
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,1,0),COLOREE44BB;3 H; L/ `5 s, a9 J( _% P
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5,0 ),COLORFF55BB;# J; k. |2 C1 f; c
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0 ),COLORFF7700;
S: l# e. w: {' fSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.5 ,0 ),COLORFF8811;+ b4 g+ i. M. b8 i7 L
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.2,0 ),COLORFFAA22;
1 e% q- v8 S/ {STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.0 ,0 ),COLORFFBB33;7 |6 k% t' c8 ?
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.8 ,0 ),COLORFFDD44;
7 i5 M) y' h6 |STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5 ,0 ),COLORFFFF55;% r, S& }: G; M0 _ V
R:=(HHV(DEA,100)+ABS(LLV(DEA ,100)))/2;
* P0 N0 i" q% p' U, R& N- kR/4,POINTDOT,COLORFFFF00;
1 s# i" ^, Y3 Y$ t0 C; eR/2,POINTDOT,COLORFFFF00;
+ t3 P2 }# p: Q" JR/4*3,POINTDOT,COLORFFFF00;
# A3 B8 F4 h5 {5 {1 r, d2 @0 j-R/4,POINTDOT,COLORFFFF00;# i, r' o! j! H$ O
-R/2,POINTDOT,COLORFFFF00;
W+ V7 ?% A! h& d T-R/4*3,POINTDOT,COLORFFFF00;
$ R; }! `& [2 E( ~( i t/ c2 o; p' O3 h% q5 r+ h
! E% G L/ C y9 J5 p5 |- R( ^使用方法:按CTRL+F打开公式管理器,公式组选定技术指标公式后,点右边新建按钮打开指标公式编辑器,公式名称MACD2,公式类型趋势型,画线方法附图,上面公式内容复制到编辑框内,点确定编辑完毕,如下图4 N! E" Q7 l1 s& C7 T# r
& N U( F& k, G6 I7 h& j6 OZ~后在K线图窗口下的某个副图上点一下,输入公式名称MACD2,回车就可以了
1 R+ `4 C N$ G! d6 M. C) H
|
|