TA的每日心情 | 开心 2024-9-20 00:45 |
---|
签到天数: 949 天 [LV.10]签到十级
六段
- 积分
- 36750
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式! v/ b" w5 B$ L# z% ]) }
我这里发一个,MACD指标公式,可以在图中标出顶和底的背离' s7 n+ Q3 s! i8 f8 a# c% g! L, k
4 A2 X$ Q# N2 h- [在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”
# K) y& H6 }0 ^- Y$ H1 B N8 g
; c# R' y# I( q# f0 f3 S5 o
+ E, N# d8 d5 @: }& U' WDIFF:EMA(CLOSE,12) - EMA(CLOSE,26);' x, P2 E @7 D Q5 T
DEA:EMA(DIFF,9);
/ T6 u }( K* NMACD:2*(DIFF-DEA), COLORSTICK;
% l4 j; v0 Q( _' J" V* U$ c% SA1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
2 [2 C9 @9 J- w8 ^底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);. K& C0 }6 A! d5 @3 g5 G! M% G
STICKLINE(底背离,0,0.1,8,0),COLORRED;
! Y" I3 |/ X. M3 lDRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;
; J) w; ~7 f+ TA2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
* I! D! n9 ~, B8 a顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
5 z9 H, G8 \1 XDRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;3 X* X' B$ E- k ~! t3 D' ?) X8 N
|
|