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

- 积分
- 9950
|
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);1 p7 {. e5 b0 t- O
DEA:= EMA(DIF,9); y- i8 f' Y2 z4 R' v5 s. |
MACD:= (DIF-DEA)*2;
1 h4 P( A+ L7 n5 D4 o! k8 U
7 E8 V3 I3 k6 u均值:= SUM(ABS(MACD), 100)/100;; M8 J k9 A# m$ ?
NOTEXT起死回生:= REF(MACD, 2) > REF(MACD, 1) AND REF(MACD, 1) < 均值*0.1 AND
; t$ P+ P" L5 }1 O% t- Z2 [ REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;; n& O6 G: k5 y: U" x5 D
金叉失败:= REF(MACD, 2) < REF(MACD, 1) AND REF(MACD, 1) > 0-均值*0.1 AND ' G6 f" t3 \7 A
REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;
& Q) C3 N$ \; p6 A: W: b# K! F& v0 G
AA1A:= BARSLAST(CROSS(DEA, DIF))+1;
0 m/ @4 b+ {3 i7 V4 TAA1B:= IF(NOTEXT起死回生 OR 金叉失败, BARSLAST(NOTEXT起死回生 OR 金叉失败)+3, 99999);
; {' [. V/ X/ x& U$ ZAA1:= IF(AA1B<AA1A, AA1B, AA1A);9 B' Z& U/ E7 G2 I5 r- Y8 T
9 w( q: O% z+ ~; [0 MAA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;
( o* M: O* b/ k; R# x7 bAA2B:= IF(REF(NOTEXT起死回生 OR 金叉失败, AA1), REF(BARSLAST(NOTEXT起死回生 OR 金叉失败), AA1), 99999)+3;
" C2 r- {& |) {& N& {3 pAA2:= IF(AA2B<AA2A, AA2B, AA2A);. @, ^" o B0 M7 T$ I" E# D5 G9 p
$ J" q& x. H( _( H0 v" {
DIFZ~小值:= LLV(DIF, AA1+AA2);
) U m$ q' O' {DIFZ~小日:= LLVBARS(DIF, AA1+AA2);
9 U# f+ H4 Y+ p6 S" O' ~$ z4 t, fDBL1:= IF(DIFZ~小日<=AA1, 0, 1);
8 f3 P6 O) D- n& R& X+ `, DDBL2:= IF(DBL1=1 AND C<REF(C, DIFZ~小日) AND DIF>REF(DIF, DIFZ~小日), 1, 0);
/ ~+ l* k; {+ A: j1 T+ RDBL:= IF(DBL1=0, 0, DBL2);
$ U/ b- \) m% p: A |6 w2 p, h1 B% p( z b4 m1 ~
DBLJC: DBL AND (CROSS(DIF, DEA) OR NOTEXT起死回生) AND DIF>REF(DIF, 1);
( J# K1 W8 _( W2 K0 a3 n( h5 N8 B0 D) L% K
/ x% D; D$ _- _' I* K! d7 y! x/ a
+ A4 a5 c7 D5 g. C! N按下面的来,注意是选股公式,不是指标公式,还有公式名称不能太长。
- o$ |* T2 G ~: X- a2 I8 M4 b! g* c5 c: a0 k: C9 p# w- U" Z2 r# V% `
& B# O+ D9 v1 U3 U/ Z+ ^& m DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);8 y& x4 H) Q8 j" n' @/ a( P
; E6 c8 |5 I0 U5 h2 n: P2 W0 e! O7 E; I JDEA:= EMA(DIF,9);
1 z; O% N) u* \! p! r2 x) K% h- Q& S0 K! qMACD:= (DIF-DEA)*2;0 k j* s7 u7 G$ m5 K4 a: g! B
% ^ \' F- W1 T1 l! u. J
4 m/ T9 B+ z4 F1 G: t5 S" i! ~: F1 A+ ^9 j均值:= SUM(ABS(MACD), 100)/100;5 {) b: Y5 X8 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! w
$ R3 ?$ @; T0 O1 ]# Q6 c8 X9 g Q REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;
% K! y$ w. \) n7 v, L4 F" ^+ 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
' G+ s: b# Y, w# H7 g REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;5 P+ y8 L6 O: w! I& q
( U/ R- ?! t! c! c% |* l3 U: C8 l9 y/ K0 V3 g$ T+ Y3 O: [+ g! N
3 I% x( w7 ~0 g% ?. C; f) rAA1A:= BARSLAST(CROSS(DEA, DIF))+1;8 y/ f. e# m4 T: F* ~5 R. p2 W- y( p/ Y* ?5 b; L! i8 C
AA1B:= IF(起死回生 OR 金叉失败, BARSLAST(起死回生 OR 金叉失败)+3, 99999);- b! S& h/ k8 E9 s3 H9 a4 K+ Q. z
AA1:= IF(AA1B<AA1A, AA1B, AA1A);
2 B& _3 _" h; G, q$ e9 S2 A8 z1 D7 @" @. C. j' l
# [( K9 d$ L! |0 Q' j. x9 Z1 g- }# q ^8 ~2 l7 }AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;
- ~6 `- x' u: Y" c' I9 W; W8 t- `* H- _: C7 O$ r5 V8 BAA2B:= IF(REF(起死回生 OR 金叉失败, AA1), REF(BARSLAST(起死回生 OR 金叉失败), AA1), 99999)+3;! I7 s) L1 }* S" o% w# F: g t. k6 R- M) Z, C2 j5 K) L6 {( k
AA2:= IF(AA2B<AA2A, AA2B, AA2A);
1 F9 L0 r- j/ A" u) V( d. V5 c2 z# P! X W+ l6 W$ ]
5 O" l/ M% F+ Q* Y( C# I i! z6 t% p1 ^+ rDIFZ~小值:= LLV(DIF, AA1+AA2);6 @7 W8 k) g+ C- U
$ V+ m$ F4 c3 f- N+ A3 `% ~! nDIFZ~小日:= LLVBARS(DIF, AA1+AA2);& W6 I/ m1 F2 L: i
8 D8 O3 c2 c8 Q7 f% ], Q GDBL1:= IF(DIFZ~小日<=AA1, 0, 1);) U' I. W; ?" 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
; h# b. U I& {. \. ~ DBL:= IF(DBL1=0, 0, DBL2);
$ i- G$ g( p* E0 x; J6 E+ _! \6 `$ ?7 Q* V3 c0 b5 g5 ?# e$ S$ V. @& H4 u! L9 C. h- M$ c* S" P* e
DBLJC: DBL AND (CROSS(DIF, DEA) OR 起死回生) AND DIF>REF(DIF, 1);
|
|