TA的每日心情 | 开心 2024-9-20 00:45 |
---|
签到天数: 949 天 [LV.10]签到十级
六段
- 积分
- 36750
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式
+ X, s5 \+ y C. F3 n6 \4 w我这里发一个,MACD指标公式,可以在图中标出顶和底的背离
" r# `1 j9 p. `* P
- f m5 l: ^2 ~在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”, v7 G3 w, r- K; C L
6 {8 a5 ~4 }" L" f& q! h, r. ?$ {
6 N6 H1 k# k' N7 e2 k. s0 R, T
DIFF:EMA(CLOSE,12) - EMA(CLOSE,26);0 V8 F |! V" R$ ~& s" x K
DEA:EMA(DIFF,9);3 U, [0 Q; d7 |3 I
MACD:2*(DIFF-DEA), COLORSTICK;
3 t% m( k& G) {7 q# M4 SA1:=BARSLAST(REF(CROSS(DIFF,DEA),1));+ A5 I1 V- u1 c7 a5 ^. M O
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
3 x0 _! y6 P& O& M5 BSTICKLINE(底背离,0,0.1,8,0),COLORRED;
5 ?; p' T l$ x9 e3 \DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;& K# O) s8 i; [( m& ` q
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
* Z3 S, W3 g" Q6 U" l顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
2 b' h4 \' A6 h; |* d, jDRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;
5 d& m# }2 y2 Q" A; `7 h! F
P- ?6 z* Z' {) v, @7 D/ R- `
, C9 n4 R! ?) S$ e6 B* M. [7 t5 w- O" { G
|
3 F. p2 |1 B, B$ u
|
|