TA的每日心情 | 开心 2019-5-15 08:50 |
---|
签到天数: 134 天 [LV.7]签到七级
四段
- 积分
- 9950
|
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);4 t* R& A1 p1 d- M3 C7 z" h
DEA:= EMA(DIF,9);7 b: o8 C+ F" _. P4 I2 U/ d
MACD:= (DIF-DEA)*2;
: l2 z5 p: F- K$ y1 A! j# K' I2 u9 i/ \* i k0 v' C0 n7 E
均值:= SUM(ABS(MACD), 100)/100;0 y8 f) g# D7 o& c
NOTEXT起死回生:= REF(MACD, 2) > REF(MACD, 1) AND REF(MACD, 1) < 均值*0.1 AND . P3 w" C3 ^7 \$ a; S5 K
REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;7 o" {, y. N! O& k
金叉失败:= REF(MACD, 2) < REF(MACD, 1) AND REF(MACD, 1) > 0-均值*0.1 AND & k3 D7 H" I* i
REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;2 h! H& O( U% N9 i$ Q, R/ B- K
' s- K0 h( x' ^4 ?! j, D8 g
AA1A:= BARSLAST(CROSS(DEA, DIF))+1;$ C( s0 `3 d2 U6 q) f- w/ @
AA1B:= IF(NOTEXT起死回生 OR 金叉失败, BARSLAST(NOTEXT起死回生 OR 金叉失败)+3, 99999);
. L7 S* l U8 l5 ?' P/ v& jAA1:= IF(AA1B<AA1A, AA1B, AA1A);3 V3 F4 r* H; ]7 G& h3 o% V
# j; n7 f2 h, c% O' R* |& iAA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;
0 l" r. T) j: V6 I/ V, A4 s" kAA2B:= IF(REF(NOTEXT起死回生 OR 金叉失败, AA1), REF(BARSLAST(NOTEXT起死回生 OR 金叉失败), AA1), 99999)+3;) I$ O# [' Y2 }8 x* ^$ M* J
AA2:= IF(AA2B<AA2A, AA2B, AA2A);. T/ C: K' z+ _0 {
; M: `. w- S- B8 h2 r' f; G3 W
DIFZ~小值:= LLV(DIF, AA1+AA2);6 H2 m/ l2 m% t) A8 W
DIFZ~小日:= LLVBARS(DIF, AA1+AA2);+ S8 t8 _1 i" e' j& N; B0 S
DBL1:= IF(DIFZ~小日<=AA1, 0, 1);
. N9 U; B; I% H& O1 qDBL2:= IF(DBL1=1 AND C<REF(C, DIFZ~小日) AND DIF>REF(DIF, DIFZ~小日), 1, 0);1 Q4 u! h1 s I/ R3 f
DBL:= IF(DBL1=0, 0, DBL2);
6 C* g; t4 |; M6 U: H; C
1 K9 k" \8 B% l9 T8 i5 fDBLJC: DBL AND (CROSS(DIF, DEA) OR NOTEXT起死回生) AND DIF>REF(DIF, 1);8 ]6 u' V) z+ F; ^: R
5 y# W* c! B5 F( G
( a4 p2 [$ x6 T1 N+ }
; _+ C2 m% T8 t$ w! S按下面的来,注意是选股公式,不是指标公式,还有公式名称不能太长。
# n" i6 b& l0 L* e6 C8 N) ~- a2 I8 M4 b! g* c5 c: a0 k: C9 p# w- U" Z2 r# V% `3 n# u! W! _; [& p& I
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);
+ a" l$ q; w1 u9 q4 l; E6 c8 |5 I0 U5 h2 n: P2 W0 e! O7 E; I JDEA:= EMA(DIF,9);
0 `2 Z4 |: ?# Z6 L$ v" J& H2 x) K% h- Q& S0 K! qMACD:= (DIF-DEA)*2;0 k j* s7 u7 G$ m5 K4 a: g! B
$ G( _5 J& X* c9 T+ L2 {
/ o! i/ I1 q. b6 i: t5 S" i! ~: F1 A+ ^9 j均值:= SUM(ABS(MACD), 100)/100;
' S6 D# G1 q* S: T& u8 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 a# J1 f% Y e* n$ s% ~ REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;( B; B7 g& o0 P% 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+ f9 A4 W g" \- u/ c5 O6 R/ e; M1 H. u
REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;5 P+ y8 L6 O: w! I& q
) s- m+ S \, s9 x! u I
! A- u9 |; J" a. D4 g3 I% x( w7 ~0 g% ?. C; f) rAA1A:= BARSLAST(CROSS(DEA, DIF))+1;8 y/ f. e# m4 T: F* ~5 R9 W8 N4 ^) S+ ~& l, l* u% o" T/ \4 S
AA1B:= IF(起死回生 OR 金叉失败, BARSLAST(起死回生 OR 金叉失败)+3, 99999);- b! S& h/ k8 E9 s4 }6 q/ y" r8 E
AA1:= IF(AA1B<AA1A, AA1B, AA1A);0 h" d$ F. Q4 I! ~
9 S2 A8 z1 D7 @" @. C. j' l4 S( x& d, a ~; Q; p3 I
# q ^8 ~2 l7 }AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;3 N: Y D: S; Q' w2 Z4 s1 K
- `* H- _: C7 O$ r5 V8 BAA2B:= IF(REF(起死回生 OR 金叉失败, AA1), REF(BARSLAST(起死回生 OR 金叉失败), AA1), 99999)+3;! I7 s) L1 }* S" o% w* ? N9 P$ B7 [1 q5 t, E( u
AA2:= IF(AA2B<AA2A, AA2B, AA2A);" |$ H0 a5 t: F$ y$ X. u0 w0 W( G
2 z# P! X W+ l6 W$ ]
& ^9 j6 e" ?. R# G3 a* \( C# I i! z6 t% p1 ^+ rDIFZ~小值:= LLV(DIF, AA1+AA2);; Z7 L" R `1 e
$ V+ m$ F4 c3 f- N+ A3 `% ~! nDIFZ~小日:= LLVBARS(DIF, AA1+AA2);: }' R7 L6 X% D& d- Y2 j6 y& p" U
8 D8 O3 c2 c8 Q7 f% ], Q GDBL1:= IF(DIFZ~小日<=AA1, 0, 1);
( W$ h/ d1 c3 z- F6 ?) 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% V9 m8 D- ^" l( ]( Q
DBL:= IF(DBL1=0, 0, DBL2);
9 J+ k# L9 g9 a# j4 ~6 V- D% V) n0 j$ ?7 Q* V3 c0 b5 g5 ?# e$ S$ V. @& H4 u: l2 e" t& j/ Y- W' r1 o% G
DBLJC: DBL AND (CROSS(DIF, DEA) OR 起死回生) AND DIF>REF(DIF, 1);
|
|