TA的每日心情 | 开心 2024-9-20 00:45 |
---|
签到天数: 949 天 [LV.10]签到十级
六段
- 积分
- 36750
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式
, k8 W: v6 a k2 k0 z我这里发一个,MACD指标公式,可以在图中标出顶和底的背离
: B( e+ C* u2 R7 E1 ?" j5 l5 |( J
在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”
, V) ?0 r1 G7 S2 A2 i: w0 g3 p0 {' O9 ~
8 n9 j7 g, W! D9 u- [DIFF:EMA(CLOSE,12) - EMA(CLOSE,26);( ?0 {' q5 D8 w' T7 m
DEA:EMA(DIFF,9);7 E8 v: m# h1 c. ^' N/ e" j
MACD:2*(DIFF-DEA), COLORSTICK;
& z W4 k- D- pA1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
: V' V0 d- d5 `* f k8 l5 a底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
3 `9 b9 c1 k9 V( d6 ySTICKLINE(底背离,0,0.1,8,0),COLORRED;
/ M2 p9 X/ p# {% r4 Z7 KDRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;1 ?' l% |: X- ?: }" W
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));2 S z u8 F5 X- o: |
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);! {0 N W! z' b3 c# F' B' ^
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;, ~' W# O- D4 e) n( s
# C# W; S; L7 {3 U1 S6 z
- O( N% {; X3 k" i# B
0 L( h! @5 |8 t) } |
1 P6 H( B4 m: U/ M
|
|