TA的每日心情 | 开心 2024-9-20 00:45 |
---|
签到天数: 949 天 [LV.10]签到十级
六段
- 积分
- 36750
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式
; |- V9 d# w) H9 N+ {我这里发一个,MACD指标公式,可以在图中标出顶和底的背离
" _: _3 O$ |7 c: Y1 i! B6 q0 T" S
在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”
4 k5 q1 y$ h7 v
! r* @9 N7 B; n* y4 q
- o) U# g2 K8 F$ p. jDIFF:EMA(CLOSE,12) - EMA(CLOSE,26);) D3 k4 c7 L U; ]1 w
DEA:EMA(DIFF,9);3 k$ h, O0 {' j8 I
MACD:2*(DIFF-DEA), COLORSTICK; * }( V8 Q2 H! `2 H% }$ [! D
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));9 K6 b% y. l: i7 z$ W5 O, t4 e
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
9 k: e3 T, [$ N+ o, nSTICKLINE(底背离,0,0.1,8,0),COLORRED;
, V* W8 X3 U& e8 A7 c& tDRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;
7 G, h8 Z7 m2 A) RA2:=BARSLAST(REF(CROSS(DEA,DIFF),1));% D% m) A1 u6 X% n& i y; i, ~
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
/ H# T! ~* z5 H# VDRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;
- r" @: w: j0 _/ _, F% w; ]- q. l
|
|