TA的每日心情 | 开心 2024-9-20 00:45 |
---|
签到天数: 949 天 [LV.10]签到十级
六段
- 积分
- 36750
|
感谢斗K不是逗K师兄发的MAC底背离条件选股公式" d- C' ~0 \$ }& O! [! [. w% M
我这里发一个,MACD指标公式,可以在图中标出顶和底的背离; y/ R$ M7 U0 ?$ A
/ v6 h, |8 ^, Y& e
在主图上右键点MACD的“修改当前指标公式” 然后拷如下列程序,名字自命名,我命名的是“MACD=背离”
4 j8 I: n- A |# ]
6 o; i% n+ k( L4 a
3 x9 b- R+ H- ]DIFF:EMA(CLOSE,12) - EMA(CLOSE,26);
. k/ v0 A" `0 J; L4 RDEA:EMA(DIFF,9);
* Q% J+ c5 D7 b# {! KMACD:2*(DIFF-DEA), COLORSTICK;
2 q( `, J5 ^7 D' wA1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
0 i$ }6 _3 g# U. S7 |( x6 o* k底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
' `2 A/ s* A: |STICKLINE(底背离,0,0.1,8,0),COLORRED;
) u2 J- {3 f+ x! \) X8 x& u PDRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;$ c+ E8 l" h" h/ _+ a x
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));8 a$ ` `) e2 }5 p7 }5 i4 ]
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
$ j) ]) @; R+ x4 _; B! KDRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;! k+ f" p$ E* Q0 ^
|
|