TA的每日心情 | 开心 2024-9-20 00:45 |
---|
签到天数: 949 天 [LV.10]签到十级
六段
- 积分
- 36750
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式
6 s& Z" I4 U9 [! ~- b, X# _我这里发一个,MACD指标公式,可以在图中标出顶和底的背离' ~, e6 u- r4 p% ?
/ u9 j2 k# y {4 F) P
在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”4 f" o4 h# H6 m3 }
/ g5 s# G0 [, [. W6 u
' D; a& ]! V) Y& H
DIFF:EMA(CLOSE,12) - EMA(CLOSE,26);
- d3 w8 Q$ j6 y# w) B* BDEA:EMA(DIFF,9);
1 w; ]$ C7 f+ p& YMACD:2*(DIFF-DEA), COLORSTICK; $ a6 `0 L; h2 F7 q+ b5 W
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
1 z+ u' v. L* ~7 w底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
" F/ f$ \& z* y# `STICKLINE(底背离,0,0.1,8,0),COLORRED;7 d; \2 @8 \. P: K2 f( }+ _7 [
DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;: j+ E3 l- p. z
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
( Y. `0 @1 V2 ~, y顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);0 Q( L3 p& g( J: d
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;+ r ? W3 f, W2 O( U: Z
|
|