TA的每日心情 | 开心 2024-9-20 00:45 |
---|
签到天数: 949 天 [LV.10]签到十级
六段
- 积分
- 36750
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式0 _9 x8 Z2 q% z& y0 Q3 p
我这里发一个,MACD指标公式,可以在图中标出顶和底的背离% P9 R0 }3 Z) S! x S
8 `' h0 M' @4 }# H" r) j2 k8 `2 `$ {在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”
4 n% ?2 @( A% s- ]3 d( I
% g! @' Q9 j3 k
( { ]) X2 a; i- s* V0 O$ @DIFF:EMA(CLOSE,12) - EMA(CLOSE,26);2 O$ e/ \5 J! O0 x# y. e$ g
DEA:EMA(DIFF,9);; h ]; c( x* \3 U, b+ |' F
MACD:2*(DIFF-DEA), COLORSTICK;
$ I* f# n; k6 P* mA1:=BARSLAST(REF(CROSS(DIFF,DEA),1));! L \3 H# Z$ s: j7 ]7 D3 A
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
3 ?* M; R( I+ ~% D, l! _STICKLINE(底背离,0,0.1,8,0),COLORRED;
# L: W8 k i% LDRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;
# |# O/ d1 \: `4 MA2:=BARSLAST(REF(CROSS(DEA,DIFF),1)); p# j1 G: L7 A0 x1 f
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
* s* M3 b7 m8 {- w* M5 [DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;" ^# W x- i) x9 C
|
|