TA的每日心情 | 开心 2019-5-15 08:50 |
---|
签到天数: 134 天 [LV.7]签到七级
四段
- 积分
- 9950
|
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);
4 W( v7 J; `, \DEA:= EMA(DIF,9);
2 |3 s$ \" z5 U/ C( k: u* J4 @2 PMACD:= (DIF-DEA)*2;
: J' v' d2 e! z I/ l7 B3 P4 D* a& ]4 k6 d* d" Z* d% k: u
均值:= SUM(ABS(MACD), 100)/100;- `7 l8 V! x; p5 x3 a& G# G
NOTEXT起死回生:= REF(MACD, 2) > REF(MACD, 1) AND REF(MACD, 1) < 均值*0.1 AND
3 h( I; a C" X- O# m/ g4 e( E( a; E7 p REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;( n# c. T, L5 C9 B
金叉失败:= REF(MACD, 2) < REF(MACD, 1) AND REF(MACD, 1) > 0-均值*0.1 AND 7 s' D. d7 i; [) G. [
REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;# [3 Y7 U/ S% t# L1 [
3 w& @, ~8 [' U7 yAA1A:= BARSLAST(CROSS(DEA, DIF))+1;( S' J1 f- X- S) @7 X
AA1B:= IF(NOTEXT起死回生 OR 金叉失败, BARSLAST(NOTEXT起死回生 OR 金叉失败)+3, 99999);
; y, d) [) M a1 \7 [/ jAA1:= IF(AA1B<AA1A, AA1B, AA1A);- o; N; R* _. {$ G) H U" v/ I7 O
_' u' h0 A' S' g
AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;
; h1 g- j, U( z0 v S# Z# ^$ U9 W' f' QAA2B:= IF(REF(NOTEXT起死回生 OR 金叉失败, AA1), REF(BARSLAST(NOTEXT起死回生 OR 金叉失败), AA1), 99999)+3;8 `1 t. `- Y! t* ^& |" c
AA2:= IF(AA2B<AA2A, AA2B, AA2A);* q* g0 W/ f0 U" Y+ R
8 `3 e, b! p) d$ X% [
DIFZ~小值:= LLV(DIF, AA1+AA2);% I) e- x. m7 M: x
DIFZ~小日:= LLVBARS(DIF, AA1+AA2);9 W& k e( I& B5 E7 x7 G2 {/ n# [
DBL1:= IF(DIFZ~小日<=AA1, 0, 1);2 r" F3 u7 L: ]
DBL2:= IF(DBL1=1 AND C<REF(C, DIFZ~小日) AND DIF>REF(DIF, DIFZ~小日), 1, 0);5 n6 M! _: a0 `8 R1 N
DBL:= IF(DBL1=0, 0, DBL2);0 z8 w7 b# _7 a3 y$ o
" j8 T9 S1 W- G9 X: r
DBLJC: DBL AND (CROSS(DIF, DEA) OR NOTEXT起死回生) AND DIF>REF(DIF, 1);
/ b9 \2 ? J$ j, l$ c% S, s0 D- Z! Z# k0 \+ d6 |
; |) V* W: }8 ?- G- g! {( s& f
6 ^' \/ u0 ]" O' k9 |6 _. E" B
按下面的来,注意是选股公式,不是指标公式,还有公式名称不能太长。% p5 P& j$ A9 v3 r8 I
- a2 I8 M4 b! g* c5 c: a0 k: C9 p# w- U" Z2 r# V% `: V% x1 X/ ?! R
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);
# w% N6 ?2 ?' ]5 d; E6 c8 |5 I0 U5 h2 n: P2 W0 e! O7 E; I JDEA:= EMA(DIF,9);
4 `9 ]* k5 X& K7 f$ C( H2 x) K% h- Q& S0 K! qMACD:= (DIF-DEA)*2;0 k j* s7 u7 G$ m5 K4 a: g! B* f/ V6 }' r4 S; a, T
% w0 P+ R: l" d# E; \4 X2 H: z
: t5 S" i! ~: F1 A+ ^9 j均值:= SUM(ABS(MACD), 100)/100;
/ r6 K8 E* y4 f# |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
" `3 I6 e# l; ^* `: N, V3 Y$ L: r REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;; O. a6 e0 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
1 s: t6 l% }7 l2 N REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;5 P+ y8 L6 O: w! I& q
. L; t& {9 m& r/ g0 F M: v6 x( V5 F) M: o2 y
3 I% x( w7 ~0 g% ?. C; f) rAA1A:= BARSLAST(CROSS(DEA, DIF))+1;8 y/ f. e# m4 T: F* ~5 R8 s7 y/ F# L5 W7 v _/ J
AA1B:= IF(起死回生 OR 金叉失败, BARSLAST(起死回生 OR 金叉失败)+3, 99999);- b! S& h/ k8 E9 s
; l- @5 M+ b Q4 ]+ f G0 h AA1:= IF(AA1B<AA1A, AA1B, AA1A);
$ X+ N0 ?8 T$ I9 S2 A8 z1 D7 @" @. C. j' l) h. u& A3 g; `5 W& E
# q ^8 ~2 l7 }AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;3 f9 K% v" B; U% Z6 t1 }
- `* H- _: C7 O$ r5 V8 BAA2B:= IF(REF(起死回生 OR 金叉失败, AA1), REF(BARSLAST(起死回生 OR 金叉失败), AA1), 99999)+3;! I7 s) L1 }* S" o% w
1 g2 J; q k' d/ Y AA2:= IF(AA2B<AA2A, AA2B, AA2A);
& T9 y1 R, \* U) Q2 z# P! X W+ l6 W$ ]
: I" d* U4 C8 g2 Q1 |( C# I i! z6 t% p1 ^+ rDIFZ~小值:= LLV(DIF, AA1+AA2);
2 D7 z7 N8 z3 z3 Y) A9 r$ V+ m$ F4 c3 f- N+ A3 `% ~! nDIFZ~小日:= LLVBARS(DIF, AA1+AA2);
% S( |& W" t# ~+ ], C; i8 E8 D8 O3 c2 c8 Q7 f% ], Q GDBL1:= IF(DIFZ~小日<=AA1, 0, 1);- \ y1 k! }- J8 {# }# V
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& Z$ \+ R7 g2 A v# R) ~9 R& F& }
DBL:= IF(DBL1=0, 0, DBL2);
3 E* D2 |* R/ q8 l7 ~$ ?7 Q* V3 c0 b5 g5 ?# e$ S$ V. @& H4 u2 x ^" F* v- I* F
DBLJC: DBL AND (CROSS(DIF, DEA) OR 起死回生) AND DIF>REF(DIF, 1);
|
|