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

- 积分
- 9950
|
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);
) @, h. J2 \2 H2 t7 lDEA:= EMA(DIF,9);* u8 z( t" g; {: [& K8 b* T' a; Z
MACD:= (DIF-DEA)*2;- G* j4 p5 h; u& P
0 Y }% s5 _1 {6 S% x2 e
均值:= SUM(ABS(MACD), 100)/100;
8 X& k) \; C) p; J& zNOTEXT起死回生:= REF(MACD, 2) > REF(MACD, 1) AND REF(MACD, 1) < 均值*0.1 AND
: h; c/ S2 }$ o1 U& n REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;7 f5 h" |$ l, x( u. \3 g8 g8 C: c
金叉失败:= REF(MACD, 2) < REF(MACD, 1) AND REF(MACD, 1) > 0-均值*0.1 AND
/ m2 w+ k: Q" K$ U REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;
6 [; D2 v9 d# B* u3 f, u7 w1 [- e
AA1A:= BARSLAST(CROSS(DEA, DIF))+1;
+ H9 `$ V9 ]+ X5 b$ M) t) [AA1B:= IF(NOTEXT起死回生 OR 金叉失败, BARSLAST(NOTEXT起死回生 OR 金叉失败)+3, 99999);$ S! ^8 t* y" G& n
AA1:= IF(AA1B<AA1A, AA1B, AA1A);& F9 t7 H8 l- c7 |! N) A6 U; L
7 Y1 I/ s" d9 h6 `+ b/ A6 I% _
AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;
- P( k4 W0 v8 ]AA2B:= IF(REF(NOTEXT起死回生 OR 金叉失败, AA1), REF(BARSLAST(NOTEXT起死回生 OR 金叉失败), AA1), 99999)+3;' N: p! J- C, Z8 W3 |. l$ `
AA2:= IF(AA2B<AA2A, AA2B, AA2A);" ~0 J7 }( g# z
! [) \& L# ?! H* Y2 YDIFZ~小值:= LLV(DIF, AA1+AA2);
! e, {4 l( r( |DIFZ~小日:= LLVBARS(DIF, AA1+AA2);, {: ]) T% J' `
DBL1:= IF(DIFZ~小日<=AA1, 0, 1);
" n7 d& P$ ?. p' x \DBL2:= IF(DBL1=1 AND C<REF(C, DIFZ~小日) AND DIF>REF(DIF, DIFZ~小日), 1, 0);
d/ W- j* _2 ?( f8 {; f! U5 u& IDBL:= IF(DBL1=0, 0, DBL2);
: w ]6 J' g4 j; g& ?$ H8 n( U) F4 A
DBLJC: DBL AND (CROSS(DIF, DEA) OR NOTEXT起死回生) AND DIF>REF(DIF, 1);
" W0 l4 m- K' v: `7 {! M
6 r3 F5 Q* D9 r' N* }# b2 J/ O. I% H7 f J# {. k
' L$ w% f, A- w7 _- e' S
按下面的来,注意是选股公式,不是指标公式,还有公式名称不能太长。
; b2 C4 o, r9 C' J+ F- a2 I8 M4 b! g* c5 c: a0 k: C9 p# w- U" Z2 r# V% `
" p5 y" e# f/ i# E9 z, S DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);# y- ]" m. ~/ ?- p3 t1 m2 ]( m
; E6 c8 |5 I0 U5 h2 n: P2 W0 e! O7 E; I JDEA:= EMA(DIF,9);. W" v/ Z. [6 ^7 B; C! x
2 x) K% h- Q& S0 K! qMACD:= (DIF-DEA)*2;0 k j* s7 u7 G$ m5 K4 a: g! B
2 T7 k4 f( v( I/ T$ @1 d! i
! [* s7 H# Q+ g% _2 B W% f0 ]. c: t5 S" i! ~: F1 A+ ^9 j均值:= SUM(ABS(MACD), 100)/100;
- i0 R1 t" g2 k5 C0 u8 h' z6 H8 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/ b# T9 o& w; Y; P4 B/ J( K
REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;/ T% y9 v* i5 S! f8 L9 ^
" ^+ 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+ v) @6 n- Z o7 P
REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;5 P+ y8 L6 O: w! I& q
S+ d! L! H7 B$ q% D4 J
1 K2 Z) e' A4 m$ F3 I% x( w7 ~0 g% ?. C; f) rAA1A:= BARSLAST(CROSS(DEA, DIF))+1;8 y/ f. e# m4 T: F* ~5 R+ f, [! c O" v3 ]9 F: M; b0 k
AA1B:= IF(起死回生 OR 金叉失败, BARSLAST(起死回生 OR 金叉失败)+3, 99999);- b! S& h/ k8 E9 s
) Y k+ H; l% k& O AA1:= IF(AA1B<AA1A, AA1B, AA1A);5 b% G4 y4 w6 Y
9 S2 A8 z1 D7 @" @. C. j' l
7 |2 h5 {( I5 l6 B) Q# q ^8 ~2 l7 }AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;
$ F2 \9 M; b" w0 F6 T( D* m- `* H- _: C7 O$ r5 V8 BAA2B:= IF(REF(起死回生 OR 金叉失败, AA1), REF(BARSLAST(起死回生 OR 金叉失败), AA1), 99999)+3;! I7 s) L1 }* S" o% w
5 T. D6 \5 u }! w/ k5 _ AA2:= IF(AA2B<AA2A, AA2B, AA2A);
( u1 ?& R8 Q1 X$ J1 M0 H) l& m8 K2 z# P! X W+ l6 W$ ]9 y$ R0 G/ g4 E* o3 x- N
( C# I i! z6 t% p1 ^+ rDIFZ~小值:= LLV(DIF, AA1+AA2);
5 |) E- e/ J& x2 p# |1 ^$ V+ m$ F4 c3 f- N+ A3 `% ~! nDIFZ~小日:= LLVBARS(DIF, AA1+AA2);
+ \( P, B$ D I/ V% _: q% {8 D8 O3 c2 c8 Q7 f% ], Q GDBL1:= IF(DIFZ~小日<=AA1, 0, 1);/ g* v) Q' y4 h2 W" 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
+ P! F$ Y1 s+ F$ i3 `$ \8 N DBL:= IF(DBL1=0, 0, DBL2);
5 _3 `* M& X7 O/ J$ ?7 Q* V3 c0 b5 g5 ?# e$ S$ V. @& H4 u
0 i! W- Q0 [: Q$ { DBLJC: DBL AND (CROSS(DIF, DEA) OR 起死回生) AND DIF>REF(DIF, 1);
|
|