TA的每日心情 | 开心 2024-9-20 00:45 |
---|
签到天数: 949 天 [LV.10]签到十级
六段
- 积分
- 36750
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式# N( b1 X* C) C8 q
我这里发一个,MACD指标公式,可以在图中标出顶和底的背离8 [0 g1 j7 j! O: n& ]/ l4 F5 T+ u
1 G* ], L% H% g在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”: M+ I' O+ {$ s+ H) U' V, z) [
9 Q2 m- A/ X, o' O8 ?- [
9 F* G7 w X, t7 G$ @
DIFF:EMA(CLOSE,12) - EMA(CLOSE,26);2 z+ F' D8 [8 \ C- l
DEA:EMA(DIFF,9);5 U- h8 H1 `+ C! R. o8 o6 T/ Z! \
MACD:2*(DIFF-DEA), COLORSTICK;
( q, Y& m+ m* rA1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
1 H# M2 `; G3 ?* E底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
" p4 `8 p. } b2 i2 K/ vSTICKLINE(底背离,0,0.1,8,0),COLORRED;9 a/ P/ i" ]! |& ~; m O
DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;
1 H$ i6 M* t# E9 x3 fA2:=BARSLAST(REF(CROSS(DEA,DIFF),1));$ A0 m- W- T# X7 Z: ]
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
j D3 N M$ o& TDRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;! w: g% c p3 W) M! x5 a; e
: e6 q' U7 `7 X7 q( x2 k7 y# }3 D2 K
4 A. F+ t5 a+ D8 n* E7 o
1 B/ D* T, `- ] |
. d( N0 K: M" m, |0 o; D# r" i' Y
|
|