TA的每日心情 | 开心 2019-5-15 08:50 |
---|
签到天数: 134 天 [LV.7]签到七级
四段
- 积分
- 9950
|
网上抄来的,先看效果,下面第二栏就是,第三栏是传统的MACD,相比传统的MACD图,这个用颜色标明了红绿柱长短变化! _0 H9 u8 B; U
" l7 Q V4 l! Y# \' r1 G& {1 J6 M公式:
3 o- [, Q0 \$ w, h" n% p# VP:=13;S:=5;M:=1;
+ _: y$ `0 N8 C! a# J/ o9 vDIFF:EMA(C,S)-EMA(C,P);' @5 K' ?4 s! V' A& c- e
DEA:EMA(DIFF,M),COLORRED;) S' c, B2 ]* A$ h% E( I+ ?" w
MACD:2*(DIFF-DEA),COLORSTICK;
& {: E, v W/ \8 V; t+ J4 yP1:=P;S1:=S;& h6 } }2 D. i& @9 B- l
DIFF1:EMA(C,S1)-EMA(C,P1);
) i6 _# N: n/ ]1 ~5 K; n1 @DEA1:EMA(DIFF,M),COLORRED;7 E8 ?( Y$ _; j; o/ a. Q* \
MACD1:=2*(DIFF1-DEA1);
: d# @: B5 p" g5 g/ I; RMACD2:=DEA;
4 n5 j8 N3 B8 K" y0 l* o2 d& vSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,3,0 ),COLOR00AAFF;
1 e& Q. w) X5 \! n9 OSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.8,0 ),COLOR00BBFF;
2 W7 F, F* z1 F% Z$ USTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.3,0 ),COLOR00CCFF;2 G8 Q5 O& B( e4 f% h
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.2,0 ),COLOR00DDFF;
8 ?2 v. ]% M$ w3 q1 dSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1,0 ),COLOR00EEFF;* S% g, @) l% O
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0 ),COLOR00FFFF;
( D' {0 L8 Q4 t7 \& \/ gSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.4,0 ),COLOR0000AA;
- _, D2 D+ j; x* j. V/ gSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.2,0),COLOR0011BB;
; [# T* K, ~; O( [4 e% A: tSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3,0),COLOR0022CC;! B$ N5 {1 W+ \6 y+ e0 ?& z
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,2,0),COLOR0033DD;: ?; W2 U; J( h# R; o7 e- @& ~
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,1,0),COLOR0044EE;- ?7 U1 l# Z2 A" u
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0),COLOR0055FF;$ h) M a r+ P- a
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.4,0),COLORAA00BB;
* n* y( d2 ]* L, u# W; DSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.2,0),COLORBB11BB;
% r1 m+ ^) P2 F" h9 O: D cSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0),COLORCC22BB;
$ S% R1 i o/ k& a/ R ZSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,2,0 ),COLORDD33BB;/ v9 [! T+ F2 L% B
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,1,0),COLOREE44BB;! H9 [9 w! G% h, m
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5,0 ),COLORFF55BB;
- c( u$ E4 T$ ?. h* _, |% GSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0 ),COLORFF7700;$ s" W0 T5 m5 k' g0 T' z0 T
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.5 ,0 ),COLORFF8811;1 M. m+ j4 ]; B7 j. i
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.2,0 ),COLORFFAA22;3 D' r( y# x1 G, n) Q! E+ X! |; M
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.0 ,0 ),COLORFFBB33;- G+ \ e3 c2 h$ |
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.8 ,0 ),COLORFFDD44;
! t& ?2 I, R6 c6 r# a* @STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5 ,0 ),COLORFFFF55;+ ^- d3 x" p. ~! J$ F$ p4 U% j5 Z6 u
R:=(HHV(DEA,100)+ABS(LLV(DEA ,100)))/2;) H- w! C) c2 y9 d( G w5 s
R/4,POINTDOT,COLORFFFF00;7 u& p* j, A. h7 h: g# n
R/2,POINTDOT,COLORFFFF00;
7 l) Y" O( Q1 P( ^6 ZR/4*3,POINTDOT,COLORFFFF00;9 L- L$ H6 i: y2 z
-R/4,POINTDOT,COLORFFFF00;
5 P {3 k- W1 M) \6 w0 ^-R/2,POINTDOT,COLORFFFF00;
0 U- U9 n# `2 w6 x-R/4*3,POINTDOT,COLORFFFF00;
/ G+ N: W! @! z v" j' c; C+ Q
q# R6 S. |! q. c7 G _# N% Y; I
% |9 ~0 |4 _7 z! }使用方法:按CTRL+F打开公式管理器,公式组选定技术指标公式后,点右边新建按钮打开指标公式编辑器,公式名称MACD2,公式类型趋势型,画线方法附图,上面公式内容复制到编辑框内,点确定编辑完毕,如下图
o- F! z4 c: D% o0 x9 E+ Q
% P) k7 G- ~: W3 Q/ I) K
Z~后在K线图窗口下的某个副图上点一下,输入公式名称MACD2,回车就可以了. Q) h w' }9 g" I- K
|
|