TA的每日心情 | 开心 2024-9-20 00:45 |
---|
签到天数: 949 天 [LV.10]签到十级
六段
- 积分
- 36750
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式
- N/ ~6 t# n, r2 F我这里发一个,MACD指标公式,可以在图中标出顶和底的背离
- v5 K5 Z+ W& f5 w' O5 N* T2 h) R
8 S& S% ~4 {' L8 ^- b在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”2 R% w, }* I. r I* J
8 W, O/ R+ b9 R: P8 t8 F
' V) u5 f/ M. i3 a% o+ m ]DIFF:EMA(CLOSE,12) - EMA(CLOSE,26);
" o! T) S& ]4 ?9 cDEA:EMA(DIFF,9); r0 }) V% d, ~. x
MACD:2*(DIFF-DEA), COLORSTICK;
5 H) f, ^2 W5 i9 G+ aA1:=BARSLAST(REF(CROSS(DIFF,DEA),1));1 B+ X. T6 S; V' `, M: n+ t
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
3 H# J+ m/ L5 a T, x% S# WSTICKLINE(底背离,0,0.1,8,0),COLORRED;
! S; v: ^$ x3 U! ?1 b( MDRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;
" @8 s* {9 g. eA2:=BARSLAST(REF(CROSS(DEA,DIFF),1));& p( k4 F) B6 z! }
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);7 _9 z# _) M% V0 Q
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;
$ P! C, Y3 K$ h* q4 J$ v; P& x, u% S2 T) V
( z6 Z2 O1 Z7 F G- k
% @1 {+ E9 _9 B R, P8 R5 O7 {
| ! s# s' b/ ^0 i
|
|