TA的每日心情 | 开心 2019-5-15 08:50 |
---|
签到天数: 134 天 [LV.7]签到七级
四段
- 积分
- 9950
|
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);
+ \* I. p; F# d6 fDEA:= EMA(DIF,9);
0 D* h0 G, r2 @; OMACD:= (DIF-DEA)*2;
- z$ n, z2 y1 n; M/ K9 a4 D& D; O: a
; `+ t) L) q: _均值:= SUM(ABS(MACD), 100)/100;3 B2 P" S6 X# y, k+ {% d L
NOTEXT起死回生:= REF(MACD, 2) > REF(MACD, 1) AND REF(MACD, 1) < 均值*0.1 AND ! _: M0 d4 Z1 p
REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;" T- g) E4 L4 l1 D
金叉失败:= REF(MACD, 2) < REF(MACD, 1) AND REF(MACD, 1) > 0-均值*0.1 AND / f% p2 V: N) F
REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;
9 o( i, e/ Z/ i4 i8 t. n( x7 g" J. }# Q* \
AA1A:= BARSLAST(CROSS(DEA, DIF))+1;" a4 \3 |' U8 O$ X# z" } j6 d
AA1B:= IF(NOTEXT起死回生 OR 金叉失败, BARSLAST(NOTEXT起死回生 OR 金叉失败)+3, 99999);+ A: b, F8 X. }+ t" q4 u' l! j8 M- a
AA1:= IF(AA1B<AA1A, AA1B, AA1A);9 Z. b2 C9 S5 U t
0 q9 C3 h- Z* ]: R
AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;. [& @$ E5 c3 G: s' n% X
AA2B:= IF(REF(NOTEXT起死回生 OR 金叉失败, AA1), REF(BARSLAST(NOTEXT起死回生 OR 金叉失败), AA1), 99999)+3;7 X3 R; K+ y2 |0 T$ x2 _
AA2:= IF(AA2B<AA2A, AA2B, AA2A);
) h% l! s/ C. l) p# w2 ~; }
# }% B. l4 {! P& ?. DDIFZ~小值:= LLV(DIF, AA1+AA2);
* G, t, ]( T' H& V QDIFZ~小日:= LLVBARS(DIF, AA1+AA2);
0 q; w* I5 |; z" g, h7 u4 h5 j. O0 S2 ?/ BDBL1:= IF(DIFZ~小日<=AA1, 0, 1);! i$ e: U) Y8 J" f
DBL2:= IF(DBL1=1 AND C<REF(C, DIFZ~小日) AND DIF>REF(DIF, DIFZ~小日), 1, 0);
$ m( x1 L( N1 _: |2 N9 lDBL:= IF(DBL1=0, 0, DBL2);
+ N. F4 C* V0 G" ?
+ m8 g3 F+ d2 c. f2 n, q5 oDBLJC: DBL AND (CROSS(DIF, DEA) OR NOTEXT起死回生) AND DIF>REF(DIF, 1);) v9 @( u0 y+ ~( F2 f- r
; n6 \2 o0 t; Y5 O; f+ S1 v6 _
8 z% t! U' B4 q% X1 K' F
5 y8 ^" T0 m% w3 g) l& C$ u% M按下面的来,注意是选股公式,不是指标公式,还有公式名称不能太长。6 U' E& n+ R6 p/ k- r
- a2 I8 M4 b! g* c5 c: a0 k: C9 p# w- U" Z2 r# V% `
! F/ Y4 j, ~. b& I) D( P DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);+ D G$ K6 P9 U8 w& i$ Y4 a# ]
; E6 c8 |5 I0 U5 h2 n: P2 W0 e! O7 E; I JDEA:= EMA(DIF,9);
8 @% y; N& G+ f2 x) K% h- Q& S0 K! qMACD:= (DIF-DEA)*2;0 k j* s7 u7 G$ m5 K4 a: g! B
. |' [ A. M3 H5 W/ [4 I+ A9 Q/ t0 \8 @9 I* y- N7 q
: t5 S" i! ~: F1 A+ ^9 j均值:= SUM(ABS(MACD), 100)/100;1 _+ _5 s, \% X `7 u8 w- 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! w5 b1 @2 r* H# v E7 @1 u1 y. u
REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;: n. s8 r9 K5 L! I) X
" ^+ 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 l6 N2 k1 E4 b: E; O1 T. {4 x REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;5 P+ y8 L6 O: w! I& q% j% k! O0 r- U: A
H R" Z L7 k) i4 v4 i3 ]5 n3 I% x( w7 ~0 g% ?. C; f) rAA1A:= BARSLAST(CROSS(DEA, DIF))+1;8 y/ f. e# m4 T: F* ~5 R
$ k: d9 l& Y" I: Z6 Q AA1B:= IF(起死回生 OR 金叉失败, BARSLAST(起死回生 OR 金叉失败)+3, 99999);- b! S& h/ k8 E9 s/ f3 W, L, j# s0 _) z) z, R9 j0 L- e
AA1:= IF(AA1B<AA1A, AA1B, AA1A);
5 ] u9 W6 n! i, X5 H5 N9 S2 A8 z1 D7 @" @. C. j' l7 }6 b1 d# K' e
# q ^8 ~2 l7 }AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;
3 M1 j$ Q1 s, G h2 ~9 Q- `* H- _: C7 O$ r5 V8 BAA2B:= IF(REF(起死回生 OR 金叉失败, AA1), REF(BARSLAST(起死回生 OR 金叉失败), AA1), 99999)+3;! I7 s) L1 }* S" o% w
3 ^) J4 I) q& Y; R% h AA2:= IF(AA2B<AA2A, AA2B, AA2A);4 s% c2 j3 O" H6 y( v
2 z# P! X W+ l6 W$ ]
6 e( W6 Z+ ^0 l' N9 B( C# I i! z6 t% p1 ^+ rDIFZ~小值:= LLV(DIF, AA1+AA2);
5 X0 J' q( T2 {4 i$ V+ m$ F4 c3 f- N+ A3 `% ~! nDIFZ~小日:= LLVBARS(DIF, AA1+AA2);
; Q% E& o2 d; B2 Q8 D8 O3 c2 c8 Q7 f% ], Q GDBL1:= IF(DIFZ~小日<=AA1, 0, 1);
% b4 j# ~7 f$ g! F) X/ o8 }7 }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) _ S% K b7 j
DBL:= IF(DBL1=0, 0, DBL2);
& i2 H) Q0 a; }, M( \/ R$ ?7 Q* V3 c0 b5 g5 ?# e$ S$ V. @& H4 u- ~. t9 h' m+ S
DBLJC: DBL AND (CROSS(DIF, DEA) OR 起死回生) AND DIF>REF(DIF, 1);
|
|