TA的每日心情 | 开心 2024-9-20 00:45 |
---|
签到天数: 949 天 [LV.10]签到十级
六段
- 积分
- 36750
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式4 M O" V3 w( ?4 c
我这里发一个,MACD指标公式,可以在图中标出顶和底的背离* a3 U) r1 G1 U6 n% u+ Y) F& ^
9 o. @( V+ w! y" N! [- ^: V- N5 m0 i在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”; m+ v# }- ~: U0 J# p
1 r7 L% f$ b4 M- y: Y$ `" b1 l5 N/ `3 h: ]
DIFF:EMA(CLOSE,12) - EMA(CLOSE,26);
/ M8 k7 Z9 x1 I# ^' e7 QDEA:EMA(DIFF,9); t. e! O9 @3 S4 V
MACD:2*(DIFF-DEA), COLORSTICK;
' o- `3 V5 `; u: A0 s R; EA1:=BARSLAST(REF(CROSS(DIFF,DEA),1));9 A: q4 A! A: G; r& x- g/ v
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);! S, D9 z; s, N! L# S& k! u
STICKLINE(底背离,0,0.1,8,0),COLORRED;$ E: U1 _# @ V" {( c0 ~2 }
DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;
6 q& C/ r/ d9 Y, ]0 M2 K: E' W( NA2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
* O; \4 C& Q. M7 f9 H7 p顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
, `2 u0 P8 X2 C' B6 y! wDRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;
) d/ f0 o: g* i* S! b0 u
|
|