TA的每日心情 | 开心 2024-9-20 00:45 |
---|
签到天数: 949 天 [LV.10]签到十级
六段
- 积分
- 36750
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式
* I5 h) v; L7 `0 r: H9 j5 Q8 h我这里发一个,MACD指标公式,可以在图中标出顶和底的背离
' f1 p: I8 y; l9 w, N* N: g* f2 _, @1 D( d. z$ n
在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”9 P/ m# a0 j! o, G7 b; G
$ [! X% _' D$ L- a& X T6 t/ C: F" y0 a( G
DIFF:EMA(CLOSE,12) - EMA(CLOSE,26);
; E: N+ p$ o& g ?! p$ _( |DEA:EMA(DIFF,9);
) `$ C6 f! [. h% T. z- nMACD:2*(DIFF-DEA), COLORSTICK; 3 L& K; m/ A% Q( X* r- `# r& Y) J- J
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
2 R* @1 i7 V0 _2 V5 M底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);& Y+ I5 g( g* H# Z) G
STICKLINE(底背离,0,0.1,8,0),COLORRED;, [/ E0 g' [: N- O
DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;
3 E/ [1 z" u' BA2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
: J- \# R- h* U8 g顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);* Q! w) \6 O& C& {" b9 s
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;4 V8 p! K& b2 P
|
|