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

- 积分
- 9950
|
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);" P9 I: Y$ v( p$ T% e9 x
DEA:= EMA(DIF,9);, }+ g1 p2 E; _- k1 Q- ^9 m& }8 n4 }, Z9 ^
MACD:= (DIF-DEA)*2;
- W/ m* s% b& y9 |* O/ {4 o0 `" i* B$ ]8 j3 F9 I
均值:= SUM(ABS(MACD), 100)/100;
$ Q; S- {/ g6 f# D- z! TNOTEXT起死回生:= REF(MACD, 2) > REF(MACD, 1) AND REF(MACD, 1) < 均值*0.1 AND
/ e7 I& r9 G! t! d" e$ _5 m1 H REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;. v* i+ }- r; r
金叉失败:= REF(MACD, 2) < REF(MACD, 1) AND REF(MACD, 1) > 0-均值*0.1 AND
; j. o0 t* V2 Z8 S REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;
3 m# p6 f! f; X& ~4 l Z, p+ v/ `" S4 u+ R2 Y- N7 }1 {. e T
AA1A:= BARSLAST(CROSS(DEA, DIF))+1;
. Y6 A. V% h5 z( o8 SAA1B:= IF(NOTEXT起死回生 OR 金叉失败, BARSLAST(NOTEXT起死回生 OR 金叉失败)+3, 99999);6 E( R/ L- _2 B0 v9 _/ R/ ~7 d
AA1:= IF(AA1B<AA1A, AA1B, AA1A);. A9 {1 d$ n( V9 E8 e
& D! Y0 P, k$ C4 b
AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;+ P% k) _+ |, T0 O. R
AA2B:= IF(REF(NOTEXT起死回生 OR 金叉失败, AA1), REF(BARSLAST(NOTEXT起死回生 OR 金叉失败), AA1), 99999)+3;# ]& u, C! k& q4 n* ^/ L
AA2:= IF(AA2B<AA2A, AA2B, AA2A);
$ @; v. r5 W, v3 @' c+ U: o1 K
( j. J- |) g# G9 S( C' cDIFZ~小值:= LLV(DIF, AA1+AA2);
% {! u2 u% }* S1 k/ |% h8 FDIFZ~小日:= LLVBARS(DIF, AA1+AA2);) Q5 q8 R2 l. l; g
DBL1:= IF(DIFZ~小日<=AA1, 0, 1);9 r9 { q9 ]/ `9 n
DBL2:= IF(DBL1=1 AND C<REF(C, DIFZ~小日) AND DIF>REF(DIF, DIFZ~小日), 1, 0);. `4 j6 @! w: }- J
DBL:= IF(DBL1=0, 0, DBL2);
# ?; _% `* p' y0 q* S4 v) W5 ~9 t( \
. I$ j! j' c {# P& EDBLJC: DBL AND (CROSS(DIF, DEA) OR NOTEXT起死回生) AND DIF>REF(DIF, 1);# U( v. S+ {0 n8 {, r! H# p
8 p1 ]/ y6 \/ \/ i9 k
8 c- D) j$ [( j+ b0 [$ q7 Z$ C* h b+ ^3 J
按下面的来,注意是选股公式,不是指标公式,还有公式名称不能太长。" @' Q f$ }3 |* H3 Q
- a2 I8 M4 b! g* c5 c: a0 k: C9 p# w- U" Z2 r# V% `' `) t8 ]) H2 p, I) n, A; d- K. {
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);+ Q" m2 c5 J( ]7 b1 W3 ^" c9 X
; E6 c8 |5 I0 U5 h2 n: P2 W0 e! O7 E; I JDEA:= EMA(DIF,9);
; G: f& g# W5 V3 Q4 d/ v4 @4 n9 V: Y2 x) K% h- Q& S0 K! qMACD:= (DIF-DEA)*2;0 k j* s7 u7 G$ m5 K4 a: g! B
9 a- y( w+ a) q/ z" a8 y0 [0 }* I
: t5 S" i! ~: F1 A+ ^9 j均值:= SUM(ABS(MACD), 100)/100;& Q6 k7 z3 r7 |8 P( X
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! w8 ?' c- R. @; ]9 [4 X+ h1 N3 B
REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;. G5 _8 H) w5 U2 _4 Z
" ^+ 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
1 C$ Q: @/ Q, |) e8 | REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;5 P+ y8 L6 O: w! I& q
; V; u7 U2 q/ `( |8 e8 z% M2 t! {2 t- B) J6 m
3 I% x( w7 ~0 g% ?. C; f) rAA1A:= BARSLAST(CROSS(DEA, DIF))+1;8 y/ f. e# m4 T: F* ~5 R
- C3 d- E' g! ]( ~, J" K AA1B:= IF(起死回生 OR 金叉失败, BARSLAST(起死回生 OR 金叉失败)+3, 99999);- b! S& h/ k8 E9 s9 T9 z7 f* `( ]+ m# S
AA1:= IF(AA1B<AA1A, AA1B, AA1A);/ U. P3 p* Z/ T# D9 D+ n6 k( [
9 S2 A8 z1 D7 @" @. C. j' l: _3 B8 U& o$ l5 s2 Q2 }2 h; z0 y
# q ^8 ~2 l7 }AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;& A! L0 l/ j. D/ D" Z
- `* H- _: C7 O$ r5 V8 BAA2B:= IF(REF(起死回生 OR 金叉失败, AA1), REF(BARSLAST(起死回生 OR 金叉失败), AA1), 99999)+3;! I7 s) L1 }* S" o% w% x, u0 R: ^5 F- b" ^6 M$ i+ I5 Y
AA2:= IF(AA2B<AA2A, AA2B, AA2A);
% P, d* o1 g% I% m4 l+ D2 z# P! X W+ l6 W$ ]
8 ?" B) V1 o% i) d0 m. C! H4 J( C# I i! z6 t% p1 ^+ rDIFZ~小值:= LLV(DIF, AA1+AA2);
& r; ~/ m* g% R% h2 H0 F6 x: V$ V+ m$ F4 c3 f- N+ A3 `% ~! nDIFZ~小日:= LLVBARS(DIF, AA1+AA2); p( m( H& m0 s: V2 x
8 D8 O3 c2 c8 Q7 f% ], Q GDBL1:= IF(DIFZ~小日<=AA1, 0, 1);7 N/ j/ W' c; `
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$ w, j' a& Z" s0 O0 y
DBL:= IF(DBL1=0, 0, DBL2);
5 n/ @% i6 @: C: k$ ?7 Q* V3 c0 b5 g5 ?# e$ S$ V. @& H4 u
9 ?( m! Z7 i3 v/ o) J0 E DBLJC: DBL AND (CROSS(DIF, DEA) OR 起死回生) AND DIF>REF(DIF, 1);
|
|