TA的每日心情 | 开心 2024-9-20 00:45 |
---|
签到天数: 949 天 [LV.10]签到十级
六段
- 积分
- 36750
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式
8 i) R0 q) {; o1 h我这里发一个,MACD指标公式,可以在图中标出顶和底的背离
$ @; m2 r6 [4 p! {6 C* f4 I4 r" Y c# e6 {3 a0 t, a, s& M
在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”
' |' `# i J2 {# _9 E# C9 g3 I4 M" u3 B1 c; t/ }
) z5 W e$ x) W- Z gDIFF:EMA(CLOSE,12) - EMA(CLOSE,26);5 Q# Y) @, v' T% \0 O
DEA:EMA(DIFF,9);
5 |0 ~9 l6 {/ X, O5 bMACD:2*(DIFF-DEA), COLORSTICK;
% v& E# `- |: {# ^" ]9 nA1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
, I% b5 I% F: l底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);* ?, [9 z2 r& {/ u6 H8 N
STICKLINE(底背离,0,0.1,8,0),COLORRED;
* O# s q' K: m& ^1 x$ @- XDRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;
/ O$ ` t' ?, m# ?$ ?" OA2:=BARSLAST(REF(CROSS(DEA,DIFF),1));8 p, b8 H t2 e! l: k" M
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
9 @3 t2 a, v5 P$ x& EDRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;
, Y6 ~! F. E0 O* Q7 @5 W- y8 o3 h. t9 I6 m, U" ~" W! Z
/ V6 I. r1 d6 @ S. T+ o! d- p" ]
4 u$ X/ X% @ p' g- f9 d& B) C4 c | , c8 i- r1 }9 V% E+ C6 y
|
|