TA的每日心情 | 开心 2019-5-15 08:50 |
---|
签到天数: 134 天 [LV.7]签到七级
四段
- 积分
- 9950
|
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);9 E3 \- P6 x4 v, z. _* Z5 |
DEA:= EMA(DIF,9);5 [5 r: W D7 K9 w' i& h
MACD:= (DIF-DEA)*2;# [2 J/ q$ s1 V$ R4 H% ^
. k+ l- Y3 h! C) E7 A
均值:= SUM(ABS(MACD), 100)/100;4 k$ k2 ]. H8 |4 z
NOTEXT起死回生:= REF(MACD, 2) > REF(MACD, 1) AND REF(MACD, 1) < 均值*0.1 AND
- h- y( \( r. A; @* [ REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;
5 p0 H. ~5 @- T. Y金叉失败:= REF(MACD, 2) < REF(MACD, 1) AND REF(MACD, 1) > 0-均值*0.1 AND
0 r- x8 R4 t. S5 }0 m) J REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;
3 B" H ^& G+ I2 k+ a0 f& }. t5 g& _
AA1A:= BARSLAST(CROSS(DEA, DIF))+1;7 t9 a5 A- k4 E' g9 k0 g6 C
AA1B:= IF(NOTEXT起死回生 OR 金叉失败, BARSLAST(NOTEXT起死回生 OR 金叉失败)+3, 99999);' Y$ Y- Z8 P0 H6 y7 ~) O
AA1:= IF(AA1B<AA1A, AA1B, AA1A);2 C* t7 I& L" t" e+ v. w
4 d# ~) b+ w1 ~9 SAA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;0 j2 \7 q- y" P$ f6 f# `
AA2B:= IF(REF(NOTEXT起死回生 OR 金叉失败, AA1), REF(BARSLAST(NOTEXT起死回生 OR 金叉失败), AA1), 99999)+3;
8 M- C$ a+ t" E# N! u1 D4 S! VAA2:= IF(AA2B<AA2A, AA2B, AA2A);' w$ x2 W; P/ ]3 P1 B3 P
2 m/ E T4 c* M* r9 HDIFZ~小值:= LLV(DIF, AA1+AA2);
; C- V7 m1 b; x' q1 c. l* n' IDIFZ~小日:= LLVBARS(DIF, AA1+AA2);( \: ^' A( o( w i C
DBL1:= IF(DIFZ~小日<=AA1, 0, 1);
6 X+ k; A' ? p2 X' V5 ^DBL2:= IF(DBL1=1 AND C<REF(C, DIFZ~小日) AND DIF>REF(DIF, DIFZ~小日), 1, 0);
/ ]: A; p4 ?% V" YDBL:= IF(DBL1=0, 0, DBL2);
2 R/ V& t) D( k( ]% z5 [' M. }6 Y8 @9 Z1 s
DBLJC: DBL AND (CROSS(DIF, DEA) OR NOTEXT起死回生) AND DIF>REF(DIF, 1);
/ D' r: k5 n# D
3 h( A! H, q- s/ L) C: O" W
; \/ T' N' s' s7 T5 Y2 |' b" a5 b8 }4 T2 c! k8 \! |; Z
按下面的来,注意是选股公式,不是指标公式,还有公式名称不能太长。
, I, R7 b6 M) r) e- o( J- a2 I8 M4 b! g* c5 c: a0 k: C9 p# w- U" Z2 r# V% `& E1 P0 o& C$ s: s c2 \
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);
$ U1 x! W* A* d5 B) c, D2 U; E6 c8 |5 I0 U5 h2 n: P2 W0 e! O7 E; I JDEA:= EMA(DIF,9);5 Q1 c- v+ f( P& @9 L% E
2 x) K% h- Q& S0 K! qMACD:= (DIF-DEA)*2;0 k j* s7 u7 G$ m5 K4 a: g! B
q( P7 S9 C$ Q* ^& N# l* Q9 r5 _5 p: D F0 U2 _2 O
: t5 S" i! ~: F1 A+ ^9 j均值:= SUM(ABS(MACD), 100)/100;
. Z, ]" ~3 n/ Z. r/ F. `% l' V8 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! w1 O2 }0 {& h7 _- q/ D9 Q* @
REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;
, i1 s5 p1 g! U6 n) @% m6 O" ^+ 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
: O: W( R" D, ~5 Y+ Y/ Q1 C REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;5 P+ y8 L6 O: w! I& q5 e; [8 w3 ~* s6 \! |1 e: U
/ `9 \$ P7 C9 w3 n+ i& F3 I% x( w7 ~0 g% ?. C; f) rAA1A:= BARSLAST(CROSS(DEA, DIF))+1;8 y/ f. e# m4 T: F* ~5 R7 I& {. m& S) B( V2 C
AA1B:= IF(起死回生 OR 金叉失败, BARSLAST(起死回生 OR 金叉失败)+3, 99999);- b! S& h/ k8 E9 s
+ N+ ?" T+ y. Z) S" J1 o/ _ AA1:= IF(AA1B<AA1A, AA1B, AA1A);7 ~. ?3 H6 ~( X/ a( f
9 S2 A8 z1 D7 @" @. C. j' l% ]4 ?3 n0 t0 Q
# q ^8 ~2 l7 }AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;
0 d! Q9 B' x- s- ^1 o0 a! O; W0 G- `* H- _: C7 O$ r5 V8 BAA2B:= IF(REF(起死回生 OR 金叉失败, AA1), REF(BARSLAST(起死回生 OR 金叉失败), AA1), 99999)+3;! I7 s) L1 }* S" o% w
9 @5 j0 }, @2 K4 f, v1 p AA2:= IF(AA2B<AA2A, AA2B, AA2A);4 b1 ?6 v0 T( w& m5 Q
2 z# P! X W+ l6 W$ ] U+ Q8 X2 O6 `. s
( C# I i! z6 t% p1 ^+ rDIFZ~小值:= LLV(DIF, AA1+AA2);
# h W- ^7 M9 o H0 F# }$ V+ m$ F4 c3 f- N+ A3 `% ~! nDIFZ~小日:= LLVBARS(DIF, AA1+AA2);$ z7 H5 C. i& d" S5 `- A6 \. M w9 M
8 D8 O3 c2 c8 Q7 f% ], Q GDBL1:= IF(DIFZ~小日<=AA1, 0, 1);, c/ C0 J h/ T6 j6 h/ l/ \( E, b" W
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
: L/ g. p; \! ?2 N3 o# x DBL:= IF(DBL1=0, 0, DBL2);
' n" a" F9 {8 \$ n$ ~2 @$ ?7 Q* V3 c0 b5 g5 ?# e$ S$ V. @& H4 u$ X8 \9 e1 z4 l h2 p1 |
DBLJC: DBL AND (CROSS(DIF, DEA) OR 起死回生) AND DIF>REF(DIF, 1);
|
|