TA的每日心情 | 开心 2019-5-15 08:50 |
---|
签到天数: 134 天 [LV.7]签到七级
四段
- 积分
- 9950
|
按下面的来,注意是选股公式,不是指标公式,还有公式名称不能太长。5 n& R4 u* R5 i
1 s% T; i+ _' ]+ F. X6 y6 C
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);, f5 p( e5 r( `4 L6 U* b- r; p, ^
DEA:= EMA(DIF,9);
2 k3 I3 V' v: `' B/ v3 ^MACD:= (DIF-DEA)*2;1 H! p6 a+ V. P$ S% y' Y; g
6 O$ j' G+ ^7 P: s2 J$ Q0 T: I均值:= SUM(ABS(MACD), 100)/100;5 ~/ b- V4 d6 v$ u5 J
起死回生:= REF(MACD, 2) > REF(MACD, 1) AND REF(MACD, 1) < 均值*0.1 AND # z3 B' C9 F( n' j
REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;
/ T: P! [6 @' f5 @4 s+ x8 s. Q v金叉失败:= REF(MACD, 2) < REF(MACD, 1) AND REF(MACD, 1) > 0-均值*0.1 AND , m) |3 h: J N N& U7 n
REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;
9 Y6 D7 U9 w9 I- b& a
/ u- {2 o6 I; u/ W4 EAA1A:= BARSLAST(CROSS(DEA, DIF))+1;% w: ^. i7 t* L3 ^+ W+ o: X d
AA1B:= IF(起死回生 OR 金叉失败, BARSLAST(起死回生 OR 金叉失败)+3, 99999);/ ~) J Q5 v% P7 Q/ @
AA1:= IF(AA1B<AA1A, AA1B, AA1A);$ g7 @$ ^2 }2 }
: I+ I9 z# R0 q9 K4 g* l/ c; fAA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;% J' O, o% C7 {4 n
AA2B:= IF(REF(起死回生 OR 金叉失败, AA1), REF(BARSLAST(起死回生 OR 金叉失败), AA1), 99999)+3;& [4 n$ e6 M+ J, L
AA2:= IF(AA2B<AA2A, AA2B, AA2A);4 i0 w6 u7 F0 M
# K0 i0 S( @+ P: b* B) ?5 l7 PDIFZ~小值:= LLV(DIF, AA1+AA2);. j/ n4 g0 b4 O. G p8 s/ V
DIFZ~小日:= LLVBARS(DIF, AA1+AA2);
# S, |$ M0 g- Q+ N: ~DBL1:= IF(DIFZ~小日<=AA1, 0, 1);0 \* l# s; j3 Q
DBL2:= IF(DBL1=1 AND C<REF(C, DIFZ~小日) AND DIF>REF(DIF, DIFZ~小日), 1, 0);
" f1 Z# P9 M$ z) G# JDBL:= IF(DBL1=0, 0, DBL2);6 p0 [( f, Q! S# P7 x
8 w h2 R; K* i! {- M
DBLJC: DBL AND (CROSS(DIF, DEA) OR 起死回生) AND DIF>REF(DIF, 1);6 G7 S& Z. Z! Z9 p- F/ O
|
|