TA的每日心情 | 开心 2024-9-20 00:45 |
---|
签到天数: 949 天 [LV.10]签到十级
六段
- 积分
- 36750
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式5 z/ [7 ~! a' z- O* w7 K1 \4 H
我这里发一个,MACD指标公式,可以在图中标出顶和底的背离
4 |3 l0 @, ?$ Q) \$ |1 F! b, Y2 E7 @7 |7 b
在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”4 @1 r4 d% }& `1 m, [/ G) o/ k6 M( }
: ^* u1 D/ O; h1 K& ?
7 d& [3 L. p1 j# LDIFF:EMA(CLOSE,12) - EMA(CLOSE,26);# z6 ~* X F( N3 U
DEA:EMA(DIFF,9);0 \ R5 n8 \" O. H3 l
MACD:2*(DIFF-DEA), COLORSTICK;
5 [% |6 D. r2 I+ C; `1 JA1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
]% S( D* C) x底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);9 t& M8 _0 a6 V# D( a7 o
STICKLINE(底背离,0,0.1,8,0),COLORRED;# M$ V* X+ _# e g+ W. U5 A- `
DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;
# m5 c! S( f: S r5 g0 qA2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
! S) g1 o3 a. O顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
, a+ l! N, k2 Z& C# hDRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;7 _) n7 E& J2 T# L4 ^
|
|