TA的每日心情 | 开心 2019-5-15 08:50 |
---|
签到天数: 134 天 [LV.7]签到七级
四段
- 积分
- 9950
|
网上抄来的,先看效果,下面第二栏就是,第三栏是传统的MACD,相比传统的MACD图,这个用颜色标明了红绿柱长短变化
2 B! A1 ^! ~0 |
* d* Z+ f1 O+ x公式:
" @+ V% @6 {) a! j- NP:=13;S:=5;M:=1;& K Z' k( d* q+ h+ h7 b
DIFF:EMA(C,S)-EMA(C,P);3 v. J2 E' V- D8 E
DEA:EMA(DIFF,M),COLORRED;
3 S: @ x% i% h) ~5 uMACD:2*(DIFF-DEA),COLORSTICK;
% W+ l9 m) p$ R- }6 NP1:=P;S1:=S;
) E; ~$ F( G1 b2 p6 {7 f% ]! YDIFF1:EMA(C,S1)-EMA(C,P1);! B& j3 r& a0 Y. H5 _3 C
DEA1:EMA(DIFF,M),COLORRED;0 K9 F0 P& ]- q6 O! s
MACD1:=2*(DIFF1-DEA1);6 }- }' n. L9 D# }5 I! U2 A8 [
MACD2:=DEA;! Y+ W6 }- ?# w- a) e2 Q
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,3,0 ),COLOR00AAFF;
1 s. C* v! B! m2 ASTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.8,0 ),COLOR00BBFF;
+ @3 ?* O+ e/ L- ?. RSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.3,0 ),COLOR00CCFF;
/ [4 ~5 I- D3 [$ T' ^7 |! b" pSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1.2,0 ),COLOR00DDFF;
! ^& w* r T" H! [8 BSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,1,0 ),COLOR00EEFF;
S& l5 Q2 a' T }( B% k" X: dSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0 ),COLOR00FFFF;
' f9 ~% y. T% P' }) o9 y+ GSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.4,0 ),COLOR0000AA;
& j$ P0 @& T& e2 d8 d o; W$ ISTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3.2,0),COLOR0011BB;
5 `1 S( f3 F7 ]0 i$ e1 bSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,3,0),COLOR0022CC;
6 Z. G! |7 L4 _8 ~' V# OSTICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,2,0),COLOR0033DD;( {) k% K3 k# i& V* }
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,1,0),COLOR0044EE;! {4 o& U/ Q7 V+ |; S% b4 y; i
STICKLINE(MACD2>REF(MACD2,1)AND MACD2>0,0,MACD2,0.5,0),COLOR0055FF;8 P1 ~4 o" D2 x& l7 u8 u' G
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.4,0),COLORAA00BB;/ {" e; j* S& c/ x8 X# I
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3.2,0),COLORBB11BB;& P1 Y# L/ U1 s
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0),COLORCC22BB;, G+ o, S; A( ?; q; _( S1 a% S: v
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,2,0 ),COLORDD33BB;
4 E% z, D& E* lSTICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,1,0),COLOREE44BB;. r# S5 s5 F. Q
STICKLINE(MACD2>REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5,0 ),COLORFF55BB;
8 A* x# k* ~( x+ t7 z8 h8 pSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,3,0 ),COLORFF7700;3 B" H8 c* N# O% B
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.5 ,0 ),COLORFF8811;
) j- }; [4 G3 v: R6 Q% ?STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.2,0 ),COLORFFAA22;
- E) m0 E1 O U( B! D; x2 H- u2 FSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,1.0 ,0 ),COLORFFBB33;8 l$ ~5 ^5 u6 _3 t/ F) v" { _
STICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.8 ,0 ),COLORFFDD44;
$ M( W9 ^, M. j! h/ g, M" CSTICKLINE(MACD2<=REF(MACD2,1)AND MACD2<=0,0,MACD2,0.5 ,0 ),COLORFFFF55;, M$ O. Z- S" l7 [7 A% B( `
R:=(HHV(DEA,100)+ABS(LLV(DEA ,100)))/2;
/ `: \1 f$ @' t+ H7 P! k* S6 ?R/4,POINTDOT,COLORFFFF00;2 |& _9 I6 _$ u1 l) `
R/2,POINTDOT,COLORFFFF00;
+ h7 G7 |: t4 W6 J7 [, b' K* {; nR/4*3,POINTDOT,COLORFFFF00;
( E. {8 I9 ?' t( X6 ]-R/4,POINTDOT,COLORFFFF00;
' r( t2 n* t% ]* k ]6 o3 J6 Z2 [* j-R/2,POINTDOT,COLORFFFF00;
" Q5 \, ~" a- \$ O" ?-R/4*3,POINTDOT,COLORFFFF00;
3 o4 J3 P3 I4 B' q) w+ `4 n h* v! j8 _7 y5 \" Z
7 V' E3 w2 v5 W, h4 @! z使用方法:按CTRL+F打开公式管理器,公式组选定技术指标公式后,点右边新建按钮打开指标公式编辑器,公式名称MACD2,公式类型趋势型,画线方法附图,上面公式内容复制到编辑框内,点确定编辑完毕,如下图/ W# w# U+ `! a- n/ k8 e- u
, v0 \. w2 F/ l* R& M! h) r$ ~9 Y
Z~后在K线图窗口下的某个副图上点一下,输入公式名称MACD2,回车就可以了7 Q7 E' e2 z9 G. f2 W$ u: K
|
|