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

- 积分
- 9950
|
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);! u! b% e, B9 r( [% L! g
DEA:= EMA(DIF,9);
2 P: j3 X9 Y8 P7 ^MACD:= (DIF-DEA)*2;
. C+ P* L) p3 ^" B. R) O) U) x- Z6 e& N* \9 O
均值:= SUM(ABS(MACD), 100)/100;7 y1 b" r/ i1 r. a" |9 c
NOTEXT起死回生:= REF(MACD, 2) > REF(MACD, 1) AND REF(MACD, 1) < 均值*0.1 AND & I" d1 o3 A: N9 E6 @
REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;
' }; Q5 N. p. G4 y' H, l金叉失败:= REF(MACD, 2) < REF(MACD, 1) AND REF(MACD, 1) > 0-均值*0.1 AND 5 r+ ~0 H5 h0 m% V/ e, V/ p* S
REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;1 e+ Z+ F, g! A7 c
9 A* P! t! m0 t+ u( H+ u6 k
AA1A:= BARSLAST(CROSS(DEA, DIF))+1;5 q: P% P2 I+ n/ v* q2 S
AA1B:= IF(NOTEXT起死回生 OR 金叉失败, BARSLAST(NOTEXT起死回生 OR 金叉失败)+3, 99999);
" {4 D1 y0 Z2 [9 LAA1:= IF(AA1B<AA1A, AA1B, AA1A);& l. E4 c2 [- b2 W4 u
8 G: X, J1 W8 @' @- n- @ [. y
AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;: i% {$ H7 O9 D& d# f* J3 w1 f
AA2B:= IF(REF(NOTEXT起死回生 OR 金叉失败, AA1), REF(BARSLAST(NOTEXT起死回生 OR 金叉失败), AA1), 99999)+3;/ O" i: P9 ~& E" ?6 T& T0 r0 f" `; a
AA2:= IF(AA2B<AA2A, AA2B, AA2A);# k3 P9 [' w: f
5 ^* D- F. ]5 R( @, |
DIFZ~小值:= LLV(DIF, AA1+AA2);
. N; ^3 F' x8 t. t# o: z" sDIFZ~小日:= LLVBARS(DIF, AA1+AA2);
! r( s9 Y+ V$ o+ b n# g, s5 d/ LDBL1:= IF(DIFZ~小日<=AA1, 0, 1);# W5 u6 `$ r' h9 T5 w
DBL2:= IF(DBL1=1 AND C<REF(C, DIFZ~小日) AND DIF>REF(DIF, DIFZ~小日), 1, 0);
7 V3 \' G, Q W6 y$ eDBL:= IF(DBL1=0, 0, DBL2);6 a5 p2 _) i c3 n+ G) j
. x0 ]. r: h' LDBLJC: DBL AND (CROSS(DIF, DEA) OR NOTEXT起死回生) AND DIF>REF(DIF, 1);
. v" m. R: M0 m, \
0 Q0 X- O- a( b3 f& j
b `; g+ |) J0 u+ G( O9 u0 y& S5 g+ M8 J
按下面的来,注意是选股公式,不是指标公式,还有公式名称不能太长。+ Q# n$ R/ [5 f& t
- a2 I8 M4 b! g* c5 c: a0 k: C9 p# w- U" Z2 r# V% `" x1 r6 S. o) ~2 U8 H- Y
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);3 {! v/ s- R9 F2 I
; E6 c8 |5 I0 U5 h2 n: P2 W0 e! O7 E; I JDEA:= EMA(DIF,9);
. n, o1 ~" ^9 O% l5 |2 x) K% h- Q& S0 K! qMACD:= (DIF-DEA)*2;0 k j* s7 u7 G$ m5 K4 a: g! B
- l# `6 Y* U# e1 ?: T& k) @; Q7 Z, _8 w) F. a9 W+ I1 d2 m
: t5 S" i! ~: F1 A+ ^9 j均值:= SUM(ABS(MACD), 100)/100;
, s9 X1 t( ~$ p$ s9 U, j6 N8 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! w3 g( s8 u: O, n- X7 g
REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;3 g7 s1 R& G4 V3 l
" ^+ 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
( [6 Y$ ^5 I. M6 f2 x% D REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;5 P+ y8 L6 O: w! I& q6 _! w$ S/ E6 z/ d z
$ ?1 U7 C& S Z7 G+ ^* s" v4 \2 a3 I% x( w7 ~0 g% ?. C; f) rAA1A:= BARSLAST(CROSS(DEA, DIF))+1;8 y/ f. e# m4 T: F* ~5 R
$ |/ I$ i3 u. i( l9 c; s; |0 x+ @( P" W AA1B:= IF(起死回生 OR 金叉失败, BARSLAST(起死回生 OR 金叉失败)+3, 99999);- b! S& h/ k8 E9 s
' X. s/ Z! L, H6 ^1 R1 ]3 L AA1:= IF(AA1B<AA1A, AA1B, AA1A);
0 `9 W/ g1 v X% B- I+ N1 ^' e) U+ p9 S2 A8 z1 D7 @" @. C. j' l
# K, s4 P& O8 X- u# q ^8 ~2 l7 }AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;/ l: s& e3 }, Q8 M# E, f
- `* H- _: C7 O$ r5 V8 BAA2B:= IF(REF(起死回生 OR 金叉失败, AA1), REF(BARSLAST(起死回生 OR 金叉失败), AA1), 99999)+3;! I7 s) L1 }* S" o% w9 Q7 P4 c, N. o8 F {8 D" A- m+ j
AA2:= IF(AA2B<AA2A, AA2B, AA2A); G" E+ j3 Y7 W! Z( B
2 z# P! X W+ l6 W$ ], x' Y' n2 `) y8 s8 [ ~, l7 Y
( C# I i! z6 t% p1 ^+ rDIFZ~小值:= LLV(DIF, AA1+AA2);- `0 ^0 `0 s; T6 _- X8 w
$ V+ m$ F4 c3 f- N+ A3 `% ~! nDIFZ~小日:= LLVBARS(DIF, AA1+AA2);
2 x S+ T4 f2 R' d+ }5 {; x, b8 D8 O3 c2 c8 Q7 f% ], Q GDBL1:= IF(DIFZ~小日<=AA1, 0, 1);) k F7 l U' f3 O
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& O9 a; z( n; C- x: ^# ^: q
DBL:= IF(DBL1=0, 0, DBL2);
6 i/ q& l: s& P2 W( P1 ?2 j$ ?7 Q* V3 c0 b5 g5 ?# e$ S$ V. @& H4 u
# z& x% }4 P. O% d2 w* s) h DBLJC: DBL AND (CROSS(DIF, DEA) OR 起死回生) AND DIF>REF(DIF, 1);
|
|