TA的每日心情 | 开心 2024-9-20 00:45 |
---|
签到天数: 949 天 [LV.10]签到十级
六段
- 积分
- 36750
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式+ z e) l2 p0 m# Y0 B4 M8 E
我这里发一个,MACD指标公式,可以在图中标出顶和底的背离
* t# Y+ e2 }; e# _) [
0 @3 [/ P- A. c& |在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”3 N* j8 g( Q$ W6 b8 E
7 ]$ X& d) k( s
/ N' J5 Z7 J/ Z) ?1 u \DIFF:EMA(CLOSE,12) - EMA(CLOSE,26);
. Q$ v) l" B& ~8 O1 d5 FDEA:EMA(DIFF,9);5 W; g: v# T% h7 C) ^
MACD:2*(DIFF-DEA), COLORSTICK; 5 ~& x4 w5 T# u+ D: Z) b# r @
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
3 ?; D+ u# N% k" w9 h% |底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
3 {% f( X: |1 WSTICKLINE(底背离,0,0.1,8,0),COLORRED;3 d. ]1 p; N* t* _/ f$ m% j- @
DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;2 `" V6 _: e! q* X0 N5 A! d
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));- I3 H. G+ D0 b( I- K( V
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
, y c/ v2 F/ i6 S7 `# kDRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;3 ?3 J1 L1 x D9 ^0 \3 X g
|
|