TA的每日心情 | 开心 2024-9-20 00:45 |
---|
签到天数: 949 天 [LV.10]签到十级
六段
- 积分
- 36750
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式3 X- S- J7 V( W9 ~% C$ I
我这里发一个,MACD指标公式,可以在图中标出顶和底的背离
4 g z! F- t5 n1 W; ~) F" j! [' X; V* D
在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”( n* @) o$ j1 Q+ b, e% q
. p2 Z9 ^* N4 J' C. l5 Y6 S
* E) m5 } d# L1 T f+ D, s
DIFF:EMA(CLOSE,12) - EMA(CLOSE,26);" J, S; ^& Y7 W4 t& m9 m" j& ?
DEA:EMA(DIFF,9);- \) M$ @" d2 u
MACD:2*(DIFF-DEA), COLORSTICK; 4 a* b, k. U6 @8 k' t0 l
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));' V, a4 X. G' N ]% X
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);& m: V/ A+ C1 U9 g
STICKLINE(底背离,0,0.1,8,0),COLORRED;
. `' e# K; D; }6 p3 M/ J2 nDRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;; F. o" E( `1 {/ L. ]
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
/ ]; g3 ?/ w o0 j3 ~顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);$ M& j% V7 H. _
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;
3 Q7 f' j! I9 h* q }- }) C$ O3 S
; [/ O! c6 l7 `" C* y8 l6 G& d8 e# b9 l
) w: l' S& T d; `! ?+ m" O |
% W. \; f& A' X* g2 Y6 d' i; j
|
|