TA的每日心情 | 开心 2025-3-4 09:47 |
---|
签到天数: 953 天 [LV.10]签到十级
六段
 
- 积分
- 36960
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式; _$ v' G& z# z6 a4 z
我这里发一个,MACD指标公式,可以在图中标出顶和底的背离- Z7 J+ [& v4 j5 z- \% h
) B3 [8 E% C& ~: f7 c; @
在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”
' m# h2 T& g1 i2 \
! s: n2 o2 ?' v5 _1 H* B8 o- A& k% T
DIFF:EMA(CLOSE,12) - EMA(CLOSE,26);
/ j/ s! f% U/ D; S4 |( Y# z; p7 _DEA:EMA(DIFF,9);
, i9 H% z/ j+ K, ~% a# r& T7 TMACD:2*(DIFF-DEA), COLORSTICK; ; `0 C0 G- |7 ?( p. { M
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
: }1 r8 ?) M& W" C7 E底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
; n8 p* x% T, @! y3 g FSTICKLINE(底背离,0,0.1,8,0),COLORRED;. ^. [& h& r* ~+ e9 z0 h
DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;
& a" \' L8 W1 K) V; F- s% H5 W7 NA2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
7 z3 ]1 M- C# B6 C/ X顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF); \# T# G' X% j" e, D, R, I4 [
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;+ s! y( G4 v; _$ ~; G. i3 E+ s
|
|