TA的每日心情 | 开心 2025-3-4 09:47 |
---|
签到天数: 953 天 [LV.10]签到十级
六段
 
- 积分
- 36960
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式. w) T3 J2 U# b) o4 ]0 w1 ]
我这里发一个,MACD指标公式,可以在图中标出顶和底的背离
6 l, W1 m' `* G, t/ K+ u
, p! Q. G7 @- H6 K在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”
: n) E7 K% v2 U' t4 I0 a
5 _, m" E+ |4 e1 g) a1 `8 }" V1 E1 x z P/ n
DIFF:EMA(CLOSE,12) - EMA(CLOSE,26);
2 P$ c4 ?" ?$ N4 r3 O3 bDEA:EMA(DIFF,9);
2 p% V* m: L; L7 Y! W* v CMACD:2*(DIFF-DEA), COLORSTICK; + ` V2 d, G% R6 ?
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));! V4 _; I1 b/ h# P
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);3 T: R& d+ [1 F
STICKLINE(底背离,0,0.1,8,0),COLORRED;! m; @# b9 c$ m
DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;
& c+ g4 ^# ^. Z/ ?A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
) N# I" O; @0 Q# Y顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);8 s% m2 A+ ~5 E/ r0 X
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;
; m9 t& a/ ^$ O2 J! d& U) S6 ^
|
|