TA的每日心情 | 开心 2024-9-20 00:45 |
---|
签到天数: 949 天 [LV.10]签到十级
六段
- 积分
- 36750
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式
1 [( C! I! @" l: X我这里发一个,MACD指标公式,可以在图中标出顶和底的背离
1 Q; j3 \& w" L2 b' M8 t* m2 h) ~: M9 B3 l C
在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”# d$ f: T* x A5 X L e
, @0 }! u3 j$ {1 p
7 T5 x" w" K- Y) c( ]DIFF:EMA(CLOSE,12) - EMA(CLOSE,26);
' f2 D9 ]$ a- q8 _8 @3 BDEA:EMA(DIFF,9);
7 q U8 u' Y) H1 N. k5 g# h3 ?MACD:2*(DIFF-DEA), COLORSTICK;
, k) R5 I$ }9 y/ h, f/ TA1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
- w, a1 T3 T, i" x; d底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
4 h2 O+ G, r9 @* [ M+ FSTICKLINE(底背离,0,0.1,8,0),COLORRED;
5 M, v; D8 F. v4 T, pDRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;
4 _; N3 g" |7 e1 ]: W" D2 r. | sA2:=BARSLAST(REF(CROSS(DEA,DIFF),1));) B4 n6 l- K J8 b+ D. \+ ^
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);+ d8 s2 ~" y+ y; `
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;
" P6 ]- `* ^6 z
& R5 Q! G6 o9 y# N
& ~* a3 t# w9 L$ u
5 b+ B/ p. Y! {" }9 i% K | * I4 ]! D" w6 V; D
|
|