TA的每日心情 | 开心 2024-9-20 00:45 |
---|
签到天数: 949 天 [LV.10]签到十级
六段
- 积分
- 36750
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式
/ L: Y# T; y+ Y% M9 {9 G- m" F我这里发一个,MACD指标公式,可以在图中标出顶和底的背离3 h% ? P6 q1 ?( L- o Q+ S/ j% X4 h* N- j
( {7 z* Z5 v) Z2 Z
在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”, B# ?2 b/ e% r/ L
" q8 d- h8 F3 J6 V2 N1 u e
* k$ x/ X- h. v( {; p; vDIFF:EMA(CLOSE,12) - EMA(CLOSE,26);& R4 w% w' x4 _0 f- D# ]
DEA:EMA(DIFF,9);
_' {" w8 P( R6 U8 x+ fMACD:2*(DIFF-DEA), COLORSTICK; - h( J5 Z% k3 |5 v; g
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
! O$ Y+ t- d% j$ u( c2 C底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
( A5 @* ~/ I4 oSTICKLINE(底背离,0,0.1,8,0),COLORRED;
- }3 t7 q1 U6 ]* |9 P) x9 lDRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;
' u: \9 ~7 t4 q1 q5 eA2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
6 r2 E; P/ z: D# ~1 M. r顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
; w% g4 X/ T* S& u% rDRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;! ]- G Q) M1 j1 \1 N6 s8 K4 }4 L
|
|