TA的每日心情 | 开心 2019-5-15 08:50 |
---|
签到天数: 134 天 [LV.7]签到七级
四段
- 积分
- 9950
|
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);
0 a( ^0 j, k, I' y' i6 WDEA:= EMA(DIF,9);, n& |2 t& x' q* d
MACD:= (DIF-DEA)*2;
2 r3 F* s* l5 n, K+ I* l
: A* ^4 c" X" A: _. c X- E均值:= SUM(ABS(MACD), 100)/100;7 P3 c0 \3 u; }6 J, N
NOTEXT起死回生:= REF(MACD, 2) > REF(MACD, 1) AND REF(MACD, 1) < 均值*0.1 AND 5 s& w* O0 h8 {' y( v! K
REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;4 C# M6 k% G9 f* \4 o) }/ S
金叉失败:= REF(MACD, 2) < REF(MACD, 1) AND REF(MACD, 1) > 0-均值*0.1 AND : t! @3 j% V w1 i
REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;. Z. ?; q5 l: T- k
% E2 f3 X2 H! M- t$ E: jAA1A:= BARSLAST(CROSS(DEA, DIF))+1;: d8 V: {: E0 D! d
AA1B:= IF(NOTEXT起死回生 OR 金叉失败, BARSLAST(NOTEXT起死回生 OR 金叉失败)+3, 99999);
1 Y9 y. K+ k( F, NAA1:= IF(AA1B<AA1A, AA1B, AA1A);
) v1 F+ c! _$ K# G1 f. [) C! i+ _# A. U& T9 ?. T! R+ \6 E
AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;2 T& d$ p' s! E( n" f. u0 O* v
AA2B:= IF(REF(NOTEXT起死回生 OR 金叉失败, AA1), REF(BARSLAST(NOTEXT起死回生 OR 金叉失败), AA1), 99999)+3;# ?3 v4 ]: X+ C; k
AA2:= IF(AA2B<AA2A, AA2B, AA2A);
0 i* W2 ]0 r7 q( z. M, w& \3 I# _) N& k0 v
DIFZ~小值:= LLV(DIF, AA1+AA2);+ s7 j* s K: V- s$ C
DIFZ~小日:= LLVBARS(DIF, AA1+AA2);
! W; d1 |) ~4 d/ b, z/ `DBL1:= IF(DIFZ~小日<=AA1, 0, 1);
$ N: @# w! T0 eDBL2:= IF(DBL1=1 AND C<REF(C, DIFZ~小日) AND DIF>REF(DIF, DIFZ~小日), 1, 0);% @! y$ Q9 x6 P( i7 J
DBL:= IF(DBL1=0, 0, DBL2);
" z$ v6 r c" ]/ [ i
1 F7 z( L/ t5 p( F6 K% ^+ gDBLJC: DBL AND (CROSS(DIF, DEA) OR NOTEXT起死回生) AND DIF>REF(DIF, 1); T, }: |/ X& U
+ ?# _* L+ ]; ] F* j. `% R5 Z4 X& D" o$ D
, H( L+ L) j6 w
按下面的来,注意是选股公式,不是指标公式,还有公式名称不能太长。
5 e, d) E1 F+ [4 e- a2 I8 M4 b! g* c5 c: a0 k: C9 p# w- U" Z2 r# V% `0 [8 _4 t/ I, J% D0 s1 `
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);
3 e. `: x h) ?! T' D# {; E6 c8 |5 I0 U5 h2 n: P2 W0 e! O7 E; I JDEA:= EMA(DIF,9);) U( |, C( ^( S; a h B
2 x) K% h- Q& S0 K! qMACD:= (DIF-DEA)*2;0 k j* s7 u7 G$ m5 K4 a: g! B P- O- \& I, y) E8 x
, o; f3 T' B- ~6 K. | i8 ^: t5 S" i! ~: F1 A+ ^9 j均值:= SUM(ABS(MACD), 100)/100;; E3 ^8 Q; y6 ]4 S8 @' ?6 J- l
8 E2 t, R. S" M1 H' M3 C$ S _# z起死回生:= REF(MACD, 2) > REF(MACD, 1) AND REF(MACD, 1) < 均值*0.1 AND 7 @" T2 H, j$ Z! w
8 p: X: T* x7 Y REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;
! B0 C' R1 V( h: \) E* \" ^+ E; z% P( f$ m9 A# D; Y金叉失败:= REF(MACD, 2) < REF(MACD, 1) AND REF(MACD, 1) > 0-均值*0.1 AND * r! R! C! b9 Y$ q# r. K+ f/ T2 J# E0 @* a& ~8 ?. G! x
REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;5 P+ y8 L6 O: w! I& q, f1 O$ e$ { y* V
& W& M1 X/ d; D+ T2 D
3 I% x( w7 ~0 g% ?. C; f) rAA1A:= BARSLAST(CROSS(DEA, DIF))+1;8 y/ f. e# m4 T: F* ~5 R% B* K* Z. _7 d; f) R
AA1B:= IF(起死回生 OR 金叉失败, BARSLAST(起死回生 OR 金叉失败)+3, 99999);- b! S& h/ k8 E9 s
5 j: s/ [9 h* `+ x7 s+ J! u9 r AA1:= IF(AA1B<AA1A, AA1B, AA1A);
. @# U6 K7 a, W! t1 d2 H; P6 S9 S2 A8 z1 D7 @" @. C. j' l
' B' w0 `' g" o# q ^8 ~2 l7 }AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;3 G' o( m7 H( l5 A6 N6 ]" c. o v! {
- `* H- _: C7 O$ r5 V8 BAA2B:= IF(REF(起死回生 OR 金叉失败, AA1), REF(BARSLAST(起死回生 OR 金叉失败), AA1), 99999)+3;! I7 s) L1 }* S" o% w
) P! D- S L: a* _ AA2:= IF(AA2B<AA2A, AA2B, AA2A);" t8 }! N, [* r E7 b
2 z# P! X W+ l6 W$ ]& G1 b8 }3 A6 E5 M& V8 ?+ O0 C
( C# I i! z6 t% p1 ^+ rDIFZ~小值:= LLV(DIF, AA1+AA2);
# k/ v2 r j: b% A1 g% U$ V+ m$ F4 c3 f- N+ A3 `% ~! nDIFZ~小日:= LLVBARS(DIF, AA1+AA2);3 K7 }6 P+ L I" O3 t8 V/ I
8 D8 O3 c2 c8 Q7 f% ], Q GDBL1:= IF(DIFZ~小日<=AA1, 0, 1);
8 }1 \5 M. @5 Y6 ?) D& A: m, `: d6 x6 cDBL2:= IF(DBL1=1 AND C<REF(C, DIFZ~小日) AND DIF>REF(DIF, DIFZ~小日), 1, 0);3 g* Q# }$ r: x: Y& O
4 c8 J+ g' H/ s$ @% e9 }) V+ Q5 d* q" J DBL:= IF(DBL1=0, 0, DBL2);
) W; o, z- z6 A. Q- F$ ?7 Q* V3 c0 b5 g5 ?# e$ S$ V. @& H4 u. l. o- U, K& y: R. ^& B6 k
DBLJC: DBL AND (CROSS(DIF, DEA) OR 起死回生) AND DIF>REF(DIF, 1);
|
|