TA的每日心情 | 开心 2024-9-20 00:45 |
---|
签到天数: 949 天 [LV.10]签到十级
六段
- 积分
- 36750
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式
! A P4 p0 S: S) L2 u; c ^我这里发一个,MACD指标公式,可以在图中标出顶和底的背离0 t0 B( y& B2 ~* V! {
- A" } _! `. ]9 [7 G9 Q( _
在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”
, O5 m8 p6 k3 k5 T/ {) L3 v+ `; T; l& e8 w8 v
0 e+ H* E0 T4 FDIFF:EMA(CLOSE,12) - EMA(CLOSE,26);3 V( o- L' {7 A ]9 G+ ?
DEA:EMA(DIFF,9);: ?; h, i4 X6 `! B
MACD:2*(DIFF-DEA), COLORSTICK; 5 B2 n: K" C) E; ^$ U
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
! s% Q% {/ x! V. x; T: v; r底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);; I: [% Q5 `8 A d& e+ S$ ^& E
STICKLINE(底背离,0,0.1,8,0),COLORRED;3 q0 q3 ~; F8 m7 l- B& y
DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;4 l# ? L; F' x- X
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1)); c, g. h+ @* K! U8 B/ m- n
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);, X, {9 t, A" L+ ?3 [; K7 J, M
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;: @( b, G! S1 D- W/ |7 i
|
|