TA的每日心情 | 开心 2019-5-15 08:50 |
---|
签到天数: 134 天 [LV.7]签到七级
四段
- 积分
- 9950
|
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);
& z4 L& }8 n) h+ bDEA:= EMA(DIF,9);" [. v* T+ U0 R
MACD:= (DIF-DEA)*2;
* c3 K& ?" _, i+ `0 g* t, d- \& |' k1 P5 f* r5 u' r# ^
均值:= SUM(ABS(MACD), 100)/100;
. p/ `5 e- j3 ~1 INOTEXT起死回生:= REF(MACD, 2) > REF(MACD, 1) AND REF(MACD, 1) < 均值*0.1 AND
/ a0 {6 L4 ?; E8 [ REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;
- ~! e- c2 q' `! u& B1 U金叉失败:= REF(MACD, 2) < REF(MACD, 1) AND REF(MACD, 1) > 0-均值*0.1 AND
# @% T8 v7 @- w5 ]1 _ REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;/ q. I" K; g) g" i
0 N; a5 M, ]- }! j; b# v- Q5 _& R
AA1A:= BARSLAST(CROSS(DEA, DIF))+1;
& c) W" b6 V" j. H3 jAA1B:= IF(NOTEXT起死回生 OR 金叉失败, BARSLAST(NOTEXT起死回生 OR 金叉失败)+3, 99999);
$ J e) Z& h6 h0 h" E, h) A, e$ m' i$ yAA1:= IF(AA1B<AA1A, AA1B, AA1A);; C% v. b4 j5 Q
$ W: Z& @# Y4 v4 Q [AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;
# C) S5 H, u ]AA2B:= IF(REF(NOTEXT起死回生 OR 金叉失败, AA1), REF(BARSLAST(NOTEXT起死回生 OR 金叉失败), AA1), 99999)+3;( {( r1 L" t, ?/ P" o1 g) P
AA2:= IF(AA2B<AA2A, AA2B, AA2A);
; V) F4 G, O) r! P
: D( O: p5 u, }, T. IDIFZ~小值:= LLV(DIF, AA1+AA2);
$ z! Y# j6 x7 L; IDIFZ~小日:= LLVBARS(DIF, AA1+AA2);9 U8 c/ o1 U) q9 v, k! S3 g+ m
DBL1:= IF(DIFZ~小日<=AA1, 0, 1);
8 p( b2 F0 t. E" A) {( F1 iDBL2:= IF(DBL1=1 AND C<REF(C, DIFZ~小日) AND DIF>REF(DIF, DIFZ~小日), 1, 0);9 p' b, d) d0 v8 X8 s5 {( M
DBL:= IF(DBL1=0, 0, DBL2);+ e1 g$ ] Y' E7 q# [
& D1 }/ u8 u/ x& XDBLJC: DBL AND (CROSS(DIF, DEA) OR NOTEXT起死回生) AND DIF>REF(DIF, 1);! E! z" w, c4 m# b* E' I- f) R
* l2 P4 A+ r5 b& I) r: s. t! H* e2 c' ?# b$ d, ]' W$ e |
+ |3 @6 a4 q2 F9 V, o; N# _按下面的来,注意是选股公式,不是指标公式,还有公式名称不能太长。
* |9 T3 Y5 |+ H- X- F6 G# q" z- l- a2 I8 M4 b! g* c5 c: a0 k: C9 p# w- U" Z2 r# V% `
* R: K) A$ ], K: V3 F: H3 v9 e DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);8 D% \$ O8 D$ Y
; E6 c8 |5 I0 U5 h2 n: P2 W0 e! O7 E; I JDEA:= EMA(DIF,9);# N) \% F. l9 w1 T: I0 T) Q& \
2 x) K% h- Q& S0 K! qMACD:= (DIF-DEA)*2;0 k j* s7 u7 G$ m5 K4 a: g! B& S6 m. N- h% m( I0 B5 i
5 ] M* _: c! y
: t5 S" i! ~: F1 A+ ^9 j均值:= SUM(ABS(MACD), 100)/100;' ^: Q! n4 o z4 Y; T1 r
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! w7 [; Q- }4 C! `. c% g D
REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;2 ?/ D/ w% j0 h, Q2 B( ?
" ^+ 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
; l: H/ n& }% ~% D REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;5 P+ y8 L6 O: w! I& q. b* j2 I3 O; C$ J% g' ^" N& K( t
& z6 C4 w' |6 l6 W% Y. U1 j8 ]
3 I% x( w7 ~0 g% ?. C; f) rAA1A:= BARSLAST(CROSS(DEA, DIF))+1;8 y/ f. e# m4 T: F* ~5 R
0 c& b+ V# M5 ` L) G( F8 k AA1B:= IF(起死回生 OR 金叉失败, BARSLAST(起死回生 OR 金叉失败)+3, 99999);- b! S& h/ k8 E9 s
0 C3 D Y# U+ [# C AA1:= IF(AA1B<AA1A, AA1B, AA1A);0 n, T$ C$ a. a( b% a: j' f2 i% \
9 S2 A8 z1 D7 @" @. C. j' l
" J A2 y% Z$ ?5 X+ _0 b; [3 e& @. Y) V# q ^8 ~2 l7 }AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;+ P9 W y5 a. g2 t3 e" Z
- `* H- _: C7 O$ r5 V8 BAA2B:= IF(REF(起死回生 OR 金叉失败, AA1), REF(BARSLAST(起死回生 OR 金叉失败), AA1), 99999)+3;! I7 s) L1 }* S" o% w, K. l: d' O/ T2 f' E
AA2:= IF(AA2B<AA2A, AA2B, AA2A);
7 y8 |' z5 J% i; Q( P+ I: s2 z# P! X W+ l6 W$ ]
: G" o4 h, x4 r# p# b% p( C# I i! z6 t% p1 ^+ rDIFZ~小值:= LLV(DIF, AA1+AA2);( e7 T& x7 E$ u6 U0 P
$ V+ m$ F4 c3 f- N+ A3 `% ~! nDIFZ~小日:= LLVBARS(DIF, AA1+AA2);
2 n2 h" j$ w8 A4 [4 h1 {4 e7 h/ n8 D8 O3 c2 c8 Q7 f% ], Q GDBL1:= IF(DIFZ~小日<=AA1, 0, 1);
, J8 ?1 X$ T# k! |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* U# L7 X1 h/ `& T
DBL:= IF(DBL1=0, 0, DBL2);
+ s& r+ s" \2 a. h8 K$ ?7 Q* V3 c0 b5 g5 ?# e$ S$ V. @& H4 u
* ]7 ~" \: f; Y DBLJC: DBL AND (CROSS(DIF, DEA) OR 起死回生) AND DIF>REF(DIF, 1);
|
|