TA的每日心情 | 开心 2019-5-15 08:50 |
---|
签到天数: 134 天 [LV.7]签到七级
四段
- 积分
- 9950
|
网上抄来的,先看效果,下面第二栏就是,第三栏是传统的MACD,相比传统的MACD图,这个用颜色标明了红绿柱长短变化. [+ p% m! @. V( d, Q; s# m/ W! W
, e) S" R ~2 i, t
公式:
& b! V, I& E& Q6 _. l. E4 E6 dP:=13;S:=5;M:=1;
6 f4 z) k4 p" h- w6 p* B z H, F/ u& e$ dDIFF:EMA(C,S)-EMA(C,P);
/ y4 }1 M# E9 Y: aDEA:EMA(DIFF,M),COLORRED;4 Q A, }6 S4 S$ M
MACD:2*(DIFF-DEA),COLORSTICK;
7 w1 t! ^/ R* r# @& cP1:=P;S1:=S;9 E9 D! p4 z4 B! A$ X
DIFF1:EMA(C,S1)-EMA(C,P1);
" b9 y9 z# F/ s3 J+ g/ N# qDEA1:EMA(DIFF,M),COLORRED;/ b/ {4 O# R* r' J; _
MACD1:=2*(DIFF1-DEA1);2 r& d0 A+ I7 O& p' ^5 b# T
MACD2:=DEA;% S* V2 r% b6 |4 g- P7 U
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,3,0 ),COLOR00AAFF;
8 [, a" h2 z2 I* [1 R$ d3 q' v8 @. wSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.8,0 ),COLOR00BBFF;* p2 R$ ~ r! S+ |
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.3,0 ),COLOR00CCFF;: [! r* y" i+ E7 k0 x: {/ E/ | N8 H
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.2,0 ),COLOR00DDFF; k. L* w# e" X/ u. M
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1,0 ),COLOR00EEFF;5 ]# D& M0 [0 D$ f. T
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0 ),COLOR00FFFF;) B- D; h; B: T$ z/ F# `
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.4,0 ),COLOR0000AA;
' Z* W, l+ A2 xSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.2,0),COLOR0011BB; y9 e7 a# `( W, X
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3,0),COLOR0022CC;
% L' w1 i2 S& F$ kSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,2,0),COLOR0033DD;7 a1 D g `. \3 E7 Z0 d5 a
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,1,0),COLOR0044EE;
: D+ s" L4 F4 l! p, I; iSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0),COLOR0055FF;) x$ J% F3 o- h3 w, q" Q% p, m
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.4,0),COLORAA00BB;4 @/ ?7 q! I, ~! {5 ?$ U
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.2,0),COLORBB11BB;
2 @- F6 J8 f8 ^; a6 h; R' HSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0),COLORCC22BB;3 J, b3 M) p% B+ w1 k2 V0 R
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,2,0 ),COLORDD33BB;# O* h' t- {, L. g
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,1,0),COLOREE44BB;+ v9 ^9 K u/ z8 p, p7 @/ A
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5,0 ),COLORFF55BB;
' ]* ~! R6 |. z. Q2 OSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0 ),COLORFF7700;, N8 |: _( X* x5 i$ q5 y
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.5 ,0 ),COLORFF8811;+ m9 \3 `; S* }( R" A& k
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.2,0 ),COLORFFAA22;8 P1 R4 G- u( b" ~! Y! \
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.0 ,0 ),COLORFFBB33;
& z) e- a* L" u2 i* y2 DSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.8 ,0 ),COLORFFDD44; w3 ~4 |3 F1 Z: }
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5 ,0 ),COLORFFFF55;4 C0 a) K1 B6 r
R:=(HHV(DEA,100)+ABS(LLV(DEA ,100)))/2;/ J! P! a2 t7 B# S- e! ~
R/4,POINTDOT,COLORFFFF00;
0 A6 G: b# U6 ER/2,POINTDOT,COLORFFFF00;- Z. ^! c0 R7 Q4 u/ L5 x% r
R/4*3,POINTDOT,COLORFFFF00;
4 Z! J' E! y, `- c7 R-R/4,POINTDOT,COLORFFFF00;: _- M! m. m# k, x& U& l
-R/2,POINTDOT,COLORFFFF00;# r" ?8 ]$ U0 U) f# }* y; t
-R/4*3,POINTDOT,COLORFFFF00;
' q0 _& g" D+ A8 G- Y. W- g: g6 \
d3 |' D% Z. ~) ]) a
使用方法:按CTRL+F打开公式管理器,公式组选定技术指标公式后,点右边新建按钮打开指标公式编辑器,公式名称MACD2,公式类型趋势型,画线方法附图,上面公式内容复制到编辑框内,点确定编辑完毕,如下图9 {5 d( g: f/ S% ^* Q: `7 A, u t" U
6 {1 U. s6 j4 _9 a4 ~% K4 ^6 q, i
Z~后在K线图窗口下的某个副图上点一下,输入公式名称MACD2,回车就可以了/ Q( p4 Q n/ j6 g. t
|
|