TA的每日心情 | 开心 2019-5-15 08:50 |
---|
签到天数: 134 天 [LV.7]签到七级
四段

- 积分
- 9950
|
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);6 ?, x9 e) U/ O" l
DEA:= EMA(DIF,9);7 s2 I: g' l- o" M' Q5 G
MACD:= (DIF-DEA)*2;3 \& [2 M! R' s0 P2 E& _8 t4 A
$ Y- @) O0 Y3 O6 D4 j均值:= SUM(ABS(MACD), 100)/100;: t5 x' j1 a0 J' j8 Q
NOTEXT起死回生:= REF(MACD, 2) > REF(MACD, 1) AND REF(MACD, 1) < 均值*0.1 AND 4 L' K9 @) }# {( S* h; }
REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;
6 J* E+ U# A# G$ ~ Q8 Z3 F& X金叉失败:= REF(MACD, 2) < REF(MACD, 1) AND REF(MACD, 1) > 0-均值*0.1 AND " f4 N) E3 X/ ]" C: H
REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;) q% }8 r7 l, q$ y4 ~8 F
4 M9 m* W* v* TAA1A:= BARSLAST(CROSS(DEA, DIF))+1;
( T* }9 V( [! z. ?( OAA1B:= IF(NOTEXT起死回生 OR 金叉失败, BARSLAST(NOTEXT起死回生 OR 金叉失败)+3, 99999);' |9 T/ Q k1 c! P
AA1:= IF(AA1B<AA1A, AA1B, AA1A);
! K/ o4 {9 j. S' q0 O4 I7 X9 g& e) I7 T, a+ e& {
AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;
/ b% a. n6 Q9 d4 T# C2 p$ j. e/ eAA2B:= IF(REF(NOTEXT起死回生 OR 金叉失败, AA1), REF(BARSLAST(NOTEXT起死回生 OR 金叉失败), AA1), 99999)+3;
+ }2 b6 b j# n8 |AA2:= IF(AA2B<AA2A, AA2B, AA2A);# J- A3 K1 t$ T
5 y; S2 m% v/ PDIFZ~小值:= LLV(DIF, AA1+AA2);- M8 c! g8 |# S& w; N4 ^/ ?! q' ]
DIFZ~小日:= LLVBARS(DIF, AA1+AA2);0 T5 L9 b, u6 F, p
DBL1:= IF(DIFZ~小日<=AA1, 0, 1);" t$ E: G" ~6 S/ y+ D( F
DBL2:= IF(DBL1=1 AND C<REF(C, DIFZ~小日) AND DIF>REF(DIF, DIFZ~小日), 1, 0);
; f2 ~7 l/ }" e, Q: t2 X# I4 O# vDBL:= IF(DBL1=0, 0, DBL2);1 q: y, H2 V f; y$ |! T% x" C; C: W
# c m) S/ Y1 T5 r" {7 ADBLJC: DBL AND (CROSS(DIF, DEA) OR NOTEXT起死回生) AND DIF>REF(DIF, 1);1 H/ U4 H5 F1 |
, Y; c9 w+ Q, N/ ~2 x7 W H% ]( n2 i2 w$ I: w6 p' U1 G
3 g' |. \$ r+ B: u* j4 C按下面的来,注意是选股公式,不是指标公式,还有公式名称不能太长。5 H; Q5 z1 `6 F7 x0 `- Y; k* I
- a2 I8 M4 b! g* c5 c: a0 k: C9 p# w- U" Z2 r# V% `/ D: i+ J' ~# ]" j2 V" `
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);; e% {7 V. O1 w: [+ r+ x/ Y
; E6 c8 |5 I0 U5 h2 n: P2 W0 e! O7 E; I JDEA:= EMA(DIF,9);/ k4 d0 P5 a9 v
2 x) K% h- Q& S0 K! qMACD:= (DIF-DEA)*2;0 k j* s7 u7 G$ m5 K4 a: g! B" q3 a: s q4 r; G. ]
# U3 q( n/ A6 `: t5 S" i! ~: F1 A+ ^9 j均值:= SUM(ABS(MACD), 100)/100;# ~* r9 Q. _8 ?3 |* F3 ~& Q
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! w6 f6 R- N& N) d6 g' f
REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;( k7 B/ W, q1 P: q4 {8 b5 K2 `8 I2 ^
" ^+ 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
8 I! m" y( i0 \$ W. _. U REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;5 P+ y8 L6 O: w! I& q
( P1 \) h; R) ?( Q" w2 E5 T+ O( O# g4 P+ {# J
3 I% x( w7 ~0 g% ?. C; f) rAA1A:= BARSLAST(CROSS(DEA, DIF))+1;8 y/ f. e# m4 T: F* ~5 R) F; v1 z( x$ B, Z. {
AA1B:= IF(起死回生 OR 金叉失败, BARSLAST(起死回生 OR 金叉失败)+3, 99999);- b! S& h/ k8 E9 s
' _* Z* I8 `8 C: ~6 p& n5 V( t AA1:= IF(AA1B<AA1A, AA1B, AA1A);! K4 @2 N3 W7 R- j' @! _; A
9 S2 A8 z1 D7 @" @. C. j' l/ r* _7 ]6 O0 t8 ?4 l! [
# q ^8 ~2 l7 }AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;
/ b4 Z' s; {; W- `* H- _: C7 O$ r5 V8 BAA2B:= IF(REF(起死回生 OR 金叉失败, AA1), REF(BARSLAST(起死回生 OR 金叉失败), AA1), 99999)+3;! I7 s) L1 }* S" o% w$ d' a9 p* Z1 n; W4 F
AA2:= IF(AA2B<AA2A, AA2B, AA2A);
) r$ q7 t9 [+ _6 N6 D6 f2 z# P! X W+ l6 W$ ]
& O! e; s, f; v/ Q' {( C# I i! z6 t% p1 ^+ rDIFZ~小值:= LLV(DIF, AA1+AA2);
0 x |: u; u- D' j& M# G$ V+ m$ F4 c3 f- N+ A3 `% ~! nDIFZ~小日:= LLVBARS(DIF, AA1+AA2);
" d- e1 h* G3 @6 N. C' ^8 D8 O3 c2 c8 Q7 f% ], Q GDBL1:= IF(DIFZ~小日<=AA1, 0, 1);( L- K7 B& }3 l8 y
6 ?) 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# Z" B8 s; n" r4 G( D' J
DBL:= IF(DBL1=0, 0, DBL2);; m: q6 c0 l! n2 F) _" d! |/ L
$ ?7 Q* V3 c0 b5 g5 ?# e$ S$ V. @& H4 u
' @/ v% w3 e" j! z DBLJC: DBL AND (CROSS(DIF, DEA) OR 起死回生) AND DIF>REF(DIF, 1);
|
|