TA的每日心情 | 开心 2024-9-20 00:45 |
---|
签到天数: 949 天 [LV.10]签到十级
六段
- 积分
- 36750
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式+ u7 i# V0 F6 \3 ?
我这里发一个,MACD指标公式,可以在图中标出顶和底的背离
! {5 q/ f' f3 M9 b( f' v5 }9 V) k9 n* u9 w
在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”# l4 _0 q: J8 P* w; \7 G
! N/ C" N, W3 ?2 ?6 } T `/ J) B6 o3 K" y% n% W
DIFF:EMA(CLOSE,12) - EMA(CLOSE,26); _2 c% C$ J; ^# r5 ?5 `6 `
DEA:EMA(DIFF,9);
4 m' r b0 h: x6 w( a$ \, U3 RMACD:2*(DIFF-DEA), COLORSTICK; 9 h& D5 {- O# [; a. s6 x! l- ~+ u
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
+ a5 ^" m1 T; ~( B' g9 ^) k底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
7 f3 u8 E3 [; ~1 w$ j* pSTICKLINE(底背离,0,0.1,8,0),COLORRED;
, f7 ], t. g/ N" L+ d! v! vDRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;
) M, A ^, d1 o. `+ L# iA2:=BARSLAST(REF(CROSS(DEA,DIFF),1));7 x0 ]" a: W2 V) x" d; V
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);+ x. `6 ?' ~) S, N8 c
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2; M q7 R7 u4 s4 q2 R
|
|