TA的每日心情 | 开心 2024-9-20 00:45 |
---|
签到天数: 949 天 [LV.10]签到十级
六段
- 积分
- 36750
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式
- y: U" s8 _$ g( U8 i: ]: P" U我这里发一个,MACD指标公式,可以在图中标出顶和底的背离
( z; ]' v% @8 p/ U- K# V
( h+ o$ o1 p* ?; n6 z在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”
: i6 B- ] E- P- D" J( d. w/ K. ~% l
) e' F0 k1 v+ |- f) rDIFF:EMA(CLOSE,12) - EMA(CLOSE,26);# T' G* W+ ~4 S$ g% c8 Z* h
DEA:EMA(DIFF,9);1 ~: A4 y) ~- G) c. e
MACD:2*(DIFF-DEA), COLORSTICK;
: Y% Y x$ d( Y1 Z4 a& ?A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));" c1 |' a0 D) n( x
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
" O3 z; E `3 |& pSTICKLINE(底背离,0,0.1,8,0),COLORRED;$ y3 i, [3 R5 u4 ]# E! Q
DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;
5 M6 U" Z4 G. s: s& D$ e! S2 j( j. F0 HA2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
5 @# F" Z( g8 i3 M顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
" |/ A+ {& J S- D5 T1 Y/ z/ PDRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;
" z2 O. w7 ~4 {9 C1 ~5 h, U$ b
3 m6 t" \+ d! G1 B) u$ u
& ~5 ^/ T0 ?$ m1 Z' t- g* T( J$ q/ S: x2 q2 k# c7 g0 L
|
) `9 X' F$ A- `1 C
|
|