TA的每日心情 | 开心 2024-9-20 00:45 |
---|
签到天数: 949 天 [LV.10]签到十级
六段
- 积分
- 36750
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式
" @" k+ v/ b) e8 O6 Q) Z我这里发一个,MACD指标公式,可以在图中标出顶和底的背离
) C3 |& B3 q! E9 o, v8 j. P
. U& S& v' a. @; ~2 S5 S- c) _在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”
1 W" y3 T: ~5 n, v$ m4 H6 B2 F3 k- s# E- M6 S6 j
0 X; r: ]* {% v( k1 {) [# DDIFF:EMA(CLOSE,12) - EMA(CLOSE,26);: l Q/ Q6 E9 k( J+ A" {6 S6 Y
DEA:EMA(DIFF,9);6 `1 W W' l" w! G6 n
MACD:2*(DIFF-DEA), COLORSTICK;
) V( _, D! k# E0 @' ?* {, O; @A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
7 g# |+ \2 t3 t3 `& Q底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
% `% C# G6 R* P/ v2 N; }( y( N$ R ESTICKLINE(底背离,0,0.1,8,0),COLORRED;
; e7 D8 y0 l. G8 c& MDRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;
" v9 w. _* N6 y2 t7 j" `4 m7 KA2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
+ [3 l, \6 X8 u0 L顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);+ |! q+ `; y0 i" X
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;
8 g4 B/ s6 A, |7 ^8 b* R* ^( u% A, q" h! d: W' }
0 M# y$ e$ R6 `' x, h7 N- h+ l
0 w( X5 @* ~" q$ [ |
6 s. i' h( ?# Z5 ` W8 j: F8 o4 l
|
|