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

- 积分
- 9950
|
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);
( n9 \ V2 q( l; u+ xDEA:= EMA(DIF,9);7 e( i( \: V2 e. H1 X* }1 a# F. h
MACD:= (DIF-DEA)*2;
, U* C. h( e; Q7 x# D! c
1 N+ I) G, c2 P( f! B( N均值:= SUM(ABS(MACD), 100)/100;
3 h) b9 X+ I& g) i/ Q, ANOTEXT起死回生:= REF(MACD, 2) > REF(MACD, 1) AND REF(MACD, 1) < 均值*0.1 AND 4 U. w9 r2 ]1 @$ Y
REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;9 r W/ T6 T2 i" ]4 V% X. C
金叉失败:= REF(MACD, 2) < REF(MACD, 1) AND REF(MACD, 1) > 0-均值*0.1 AND , E. h. q1 a$ C. X/ A$ y" l
REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;
# h' c2 z' @8 R5 `, d& ?; r$ u& e5 H h8 x, I
AA1A:= BARSLAST(CROSS(DEA, DIF))+1;1 M3 N% \- u$ S" h0 L
AA1B:= IF(NOTEXT起死回生 OR 金叉失败, BARSLAST(NOTEXT起死回生 OR 金叉失败)+3, 99999);% \- N9 z- o$ P# j
AA1:= IF(AA1B<AA1A, AA1B, AA1A);# X7 ^1 B. T, q( E5 ^
2 R- [/ g8 g( ]; \AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;* B6 L/ R4 a& {5 a, H" e. i
AA2B:= IF(REF(NOTEXT起死回生 OR 金叉失败, AA1), REF(BARSLAST(NOTEXT起死回生 OR 金叉失败), AA1), 99999)+3;
) B H& B% i( tAA2:= IF(AA2B<AA2A, AA2B, AA2A);: Z8 i6 Z M( X9 k$ X& \$ P5 w
( A U8 d$ a" x7 y% {' v$ G: y5 \DIFZ~小值:= LLV(DIF, AA1+AA2);* V; O0 Q Y+ [2 U8 P1 f' N
DIFZ~小日:= LLVBARS(DIF, AA1+AA2);
3 A2 n j9 E I" c0 B* t' v+ \. r8 oDBL1:= IF(DIFZ~小日<=AA1, 0, 1);4 V$ @" G+ @) b/ a
DBL2:= IF(DBL1=1 AND C<REF(C, DIFZ~小日) AND DIF>REF(DIF, DIFZ~小日), 1, 0);
4 F) ?7 U9 H5 R2 ^$ xDBL:= IF(DBL1=0, 0, DBL2);
4 g. b( v. z! |) V8 h7 H `0 X# A% Q8 _. L+ Z( ^1 T+ ~8 Y; J8 h) Z) D; _2 Y) ^
DBLJC: DBL AND (CROSS(DIF, DEA) OR NOTEXT起死回生) AND DIF>REF(DIF, 1);
! f9 g5 v, D) {$ H4 D% i3 T" K3 x5 b
) X v4 C6 o4 O
& B& f$ f9 L7 C: q/ J按下面的来,注意是选股公式,不是指标公式,还有公式名称不能太长。3 v% r+ [6 X. g- }; e5 h
- a2 I8 M4 b! g* c5 c: a0 k: C9 p# w- U" Z2 r# V% `9 k- g7 ~, L9 X. Q8 z
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);% s* j6 s' [; B3 p/ }" |$ |- e
; E6 c8 |5 I0 U5 h2 n: P2 W0 e! O7 E; I JDEA:= EMA(DIF,9);
1 o3 p4 F) p) o4 a% H2 x) K% h- Q& S0 K! qMACD:= (DIF-DEA)*2;0 k j* s7 u7 G$ m5 K4 a: g! B
* c9 L* r, e: o4 s% U
( W5 K$ v' W% R% ]8 s: t5 S" i! ~: F1 A+ ^9 j均值:= SUM(ABS(MACD), 100)/100;4 \, d) ~% {) N7 @4 y
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! w# R6 d4 ^' v# V8 h
REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;
3 B0 p7 n3 j h# W" ^+ 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' [5 b' w* \: o* [, _# |' r
REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;5 P+ y8 L6 O: w! I& q$ g2 S9 ~- p G$ X8 x" }. } G
: n$ I) H0 r/ w3 I% x( w7 ~0 g% ?. C; f) rAA1A:= BARSLAST(CROSS(DEA, DIF))+1;8 y/ f. e# m4 T: F* ~5 R$ Z$ f( O! G3 \ L; Y. K$ _% h) J
AA1B:= IF(起死回生 OR 金叉失败, BARSLAST(起死回生 OR 金叉失败)+3, 99999);- b! S& h/ k8 E9 s- Q9 z/ ~+ G% `0 z( x8 M
AA1:= IF(AA1B<AA1A, AA1B, AA1A);, [1 ^! t, _# v. ^( K* ?! K
9 S2 A8 z1 D7 @" @. C. j' l2 v" X! F3 Z8 t, N
# q ^8 ~2 l7 }AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;' j. L( r: U! K8 O6 h( q1 ^5 K
- `* H- _: C7 O$ r5 V8 BAA2B:= IF(REF(起死回生 OR 金叉失败, AA1), REF(BARSLAST(起死回生 OR 金叉失败), AA1), 99999)+3;! I7 s) L1 }* S" o% w
! y) G' X, C1 J; m% L9 r( i/ u AA2:= IF(AA2B<AA2A, AA2B, AA2A);
9 D6 P, {0 t+ W2 z# P! X W+ l6 W$ ]
7 L- f: |9 y& h4 b( C# I i! z6 t% p1 ^+ rDIFZ~小值:= LLV(DIF, AA1+AA2);# e7 y& {6 q$ D- \5 v
$ V+ m$ F4 c3 f- N+ A3 `% ~! nDIFZ~小日:= LLVBARS(DIF, AA1+AA2);
# R2 P" r, h; E8 D8 O3 c2 c8 Q7 f% ], Q GDBL1:= IF(DIFZ~小日<=AA1, 0, 1);3 U) H: t4 _+ n
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
1 ^3 |5 s: Y4 P DBL:= IF(DBL1=0, 0, DBL2);7 s o7 W9 B/ H
$ ?7 Q* V3 c0 b5 g5 ?# e$ S$ V. @& H4 u M I+ O" t! J4 |+ a) Z4 J
DBLJC: DBL AND (CROSS(DIF, DEA) OR 起死回生) AND DIF>REF(DIF, 1);
|
|