TA的每日心情 | 开心 2019-5-15 08:50 |
---|
签到天数: 134 天 [LV.7]签到七级
四段
- 积分
- 9950
|
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26); c8 u2 c; Q2 t1 l5 J8 x
DEA:= EMA(DIF,9);2 D( ~% \ L* ^, m& ^6 @
MACD:= (DIF-DEA)*2;
, i; } @% K8 X2 n# V" a8 O
/ o7 E, \0 v4 d( S/ ^4 B! v均值:= SUM(ABS(MACD), 100)/100;6 U% g5 l" Y. i
NOTEXT起死回生:= REF(MACD, 2) > REF(MACD, 1) AND REF(MACD, 1) < 均值*0.1 AND $ [5 ~9 ^) W1 R6 H
REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;
7 e' _; ]' G9 P# F+ t; T金叉失败:= REF(MACD, 2) < REF(MACD, 1) AND REF(MACD, 1) > 0-均值*0.1 AND ; z9 V0 {% y/ A4 K
REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;# R) ?! {% |. {, }1 p7 j
$ }% \( u6 p& K# @: } \AA1A:= BARSLAST(CROSS(DEA, DIF))+1;, l3 A r, g7 J
AA1B:= IF(NOTEXT起死回生 OR 金叉失败, BARSLAST(NOTEXT起死回生 OR 金叉失败)+3, 99999);
! l' |: T4 ?7 N6 F& o5 oAA1:= IF(AA1B<AA1A, AA1B, AA1A);5 _# G, H3 g8 X" P' J: Y& g! U
3 I5 P" R7 L) h3 V. TAA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;
4 k2 x: w% t$ p) J! u% g0 ?AA2B:= IF(REF(NOTEXT起死回生 OR 金叉失败, AA1), REF(BARSLAST(NOTEXT起死回生 OR 金叉失败), AA1), 99999)+3;
?7 o- t( g& p! t! ?8 {, _AA2:= IF(AA2B<AA2A, AA2B, AA2A);
& g( [& U) m. y6 X6 P% T( p. u" t' y' z- N' y* n4 @
DIFZ~小值:= LLV(DIF, AA1+AA2);% u& E% c; d! F
DIFZ~小日:= LLVBARS(DIF, AA1+AA2);) E% C- u2 }; M: f- z# P
DBL1:= IF(DIFZ~小日<=AA1, 0, 1);
: E7 k9 M4 e% {5 FDBL2:= IF(DBL1=1 AND C<REF(C, DIFZ~小日) AND DIF>REF(DIF, DIFZ~小日), 1, 0);0 j2 [% Y- B+ @+ e
DBL:= IF(DBL1=0, 0, DBL2);
1 L! W8 S" g3 s: ^) `
/ p: Z" f0 e# M0 t% rDBLJC: DBL AND (CROSS(DIF, DEA) OR NOTEXT起死回生) AND DIF>REF(DIF, 1);
% N. y( w e2 k! ~! s
- g) W, B. Q* q0 |% Z/ A4 |6 F0 [/ |- k/ Z" q4 L/ @& M# ^. y
( U: y1 h3 o: q! V2 ]4 d
按下面的来,注意是选股公式,不是指标公式,还有公式名称不能太长。2 b) L# E5 X' `0 j: n& Y6 g+ ~
- a2 I8 M4 b! g* c5 c: a0 k: C9 p# w- U" Z2 r# V% `* t! I w6 m# I1 S. }8 @) G
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);" I# t0 }( s8 L: r
; E6 c8 |5 I0 U5 h2 n: P2 W0 e! O7 E; I JDEA:= EMA(DIF,9);
1 R% C/ y3 j! v# N2 e1 ~0 Y2 x) K% h- Q& S0 K! qMACD:= (DIF-DEA)*2;0 k j* s7 u7 G$ m5 K4 a: g! B
: g/ ^: d) H/ W/ w- }/ W; n7 M# K' z T# ?, Q* W* }
: t5 S" i! ~: F1 A+ ^9 j均值:= SUM(ABS(MACD), 100)/100;3 M, l; I5 u) S* p
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! w8 k1 q7 T; [& |% g' b6 Z3 V! v
REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;2 x, {5 V$ Q, y4 x6 ~$ ]
" ^+ 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; o+ M5 A! M4 {5 {6 q% s REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;5 P+ y8 L6 O: w! I& q' o/ f# W+ t/ w" X# J
6 n% R& f y, A/ V) G& j- a
3 I% x( w7 ~0 g% ?. C; f) rAA1A:= BARSLAST(CROSS(DEA, DIF))+1;8 y/ f. e# m4 T: F* ~5 R( M+ h! [* f u5 r8 o6 o
AA1B:= IF(起死回生 OR 金叉失败, BARSLAST(起死回生 OR 金叉失败)+3, 99999);- b! S& h/ k8 E9 s
% k, n" p2 H+ z1 V AA1:= IF(AA1B<AA1A, AA1B, AA1A);* B- n1 l, g) `0 Q; D
9 S2 A8 z1 D7 @" @. C. j' l! P0 Q! F9 ^3 h1 P2 Q4 c, }
# q ^8 ~2 l7 }AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;
' r! h0 ?# A$ n& f- `* H- _: C7 O$ r5 V8 BAA2B:= IF(REF(起死回生 OR 金叉失败, AA1), REF(BARSLAST(起死回生 OR 金叉失败), AA1), 99999)+3;! I7 s) L1 }* S" o% w
; Q5 {1 z6 Z( v% c* c0 V: K7 x% ` AA2:= IF(AA2B<AA2A, AA2B, AA2A);
) c! x, C2 [' k) y5 d2 z# P! X W+ l6 W$ ]
! c; Y' z& l% R$ {+ T: U9 M2 E( C# I i! z6 t% p1 ^+ rDIFZ~小值:= LLV(DIF, AA1+AA2);
/ x9 U+ a( f( h* |7 t0 f$ R J$ V+ m$ F4 c3 f- N+ A3 `% ~! nDIFZ~小日:= LLVBARS(DIF, AA1+AA2);+ c# |! z2 z* p5 P1 D" q) t
8 D8 O3 c2 c8 Q7 f% ], Q GDBL1:= IF(DIFZ~小日<=AA1, 0, 1);$ e% }4 E' \% D) @6 N' A3 Z
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
$ s# j) Y: b: y l$ f DBL:= IF(DBL1=0, 0, DBL2);
% B4 ]+ O R+ i$ ?7 Q* V3 c0 b5 g5 ?# e$ S$ V. @& H4 u9 v n' _' I, |8 s4 W, o
DBLJC: DBL AND (CROSS(DIF, DEA) OR 起死回生) AND DIF>REF(DIF, 1);
|
|