TA的每日心情 | 开心 2019-5-15 08:50 |
---|
签到天数: 134 天 [LV.7]签到七级
四段
- 积分
- 9950
|
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);6 Z! u5 L% s- Q# E% m. y
DEA:= EMA(DIF,9);
3 k; ?3 ^) y& A' T0 {# u+ S/ eMACD:= (DIF-DEA)*2;
+ X( r& A, k" S" B
6 c8 x3 g( P9 v d* E均值:= SUM(ABS(MACD), 100)/100;! [! y3 }4 l4 h3 M
NOTEXT起死回生:= REF(MACD, 2) > REF(MACD, 1) AND REF(MACD, 1) < 均值*0.1 AND . `+ t: K% w7 E# e( D( Z
REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;: p# p7 I0 o2 q$ S
金叉失败:= REF(MACD, 2) < REF(MACD, 1) AND REF(MACD, 1) > 0-均值*0.1 AND $ ` J6 y& p# p- j! {
REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;
+ H4 `1 k9 S/ z1 h5 y H# L2 c' G7 F
AA1A:= BARSLAST(CROSS(DEA, DIF))+1;
; R1 k2 _) Y& P% @AA1B:= IF(NOTEXT起死回生 OR 金叉失败, BARSLAST(NOTEXT起死回生 OR 金叉失败)+3, 99999);, y4 x$ ?' Z$ @9 ]. q+ A
AA1:= IF(AA1B<AA1A, AA1B, AA1A);
. U# [0 M9 P. O5 e
/ h! r8 q) Q, SAA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;
6 `" z+ `8 ~& e+ X# P! ?" gAA2B:= IF(REF(NOTEXT起死回生 OR 金叉失败, AA1), REF(BARSLAST(NOTEXT起死回生 OR 金叉失败), AA1), 99999)+3;0 T9 h6 U W% W
AA2:= IF(AA2B<AA2A, AA2B, AA2A);
8 P' X) e( K* K( _
* D" F6 e1 R# E" F3 m2 m7 I7 jDIFZ~小值:= LLV(DIF, AA1+AA2);. I1 u# X% o+ }5 o% O. ?( D+ N4 {
DIFZ~小日:= LLVBARS(DIF, AA1+AA2);& ?" h* Z' A: m5 e
DBL1:= IF(DIFZ~小日<=AA1, 0, 1);
# V$ l# O1 h% g& W' P9 [7 c( dDBL2:= IF(DBL1=1 AND C<REF(C, DIFZ~小日) AND DIF>REF(DIF, DIFZ~小日), 1, 0);
/ N. i' A) b( b5 y/ yDBL:= IF(DBL1=0, 0, DBL2);
1 N, J: ^) T( t R
$ g: d; I3 J$ b7 i& s4 nDBLJC: DBL AND (CROSS(DIF, DEA) OR NOTEXT起死回生) AND DIF>REF(DIF, 1);0 [4 {+ w* a& s$ v' A V! }
, {0 g% P+ M# J& a. ]7 k. y( [$ u' I q/ E
' w' F$ Q( O- L( W: J% n按下面的来,注意是选股公式,不是指标公式,还有公式名称不能太长。: O! _* j- x6 R) ~) A
- a2 I8 M4 b! g* c5 c: a0 k: C9 p# w- U" Z2 r# V% `
* U0 ~2 X7 N! w! H* o DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);
m" |, ^! P2 }; k; q0 f; E6 c8 |5 I0 U5 h2 n: P2 W0 e! O7 E; I JDEA:= EMA(DIF,9);
. {& d) P2 t" j. ? N; A9 B7 x: ^2 x) K% h- Q& S0 K! qMACD:= (DIF-DEA)*2;0 k j* s7 u7 G$ m5 K4 a: g! B
a! v/ K9 M4 B6 b/ G& N
& S& o2 b% e8 Q! s; H: I& ?: t5 S" i! ~: F1 A+ ^9 j均值:= SUM(ABS(MACD), 100)/100;
- _6 o$ @1 P D6 H8 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
9 t- t! _. H$ e REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;
7 B2 p" E- K6 P& t# y" ^+ 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
: y! J6 K; B1 y1 L+ b REF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;5 P+ y8 L6 O: w! I& q
2 F4 g& y1 M# X
. C9 w T4 i- e( ~* Y9 [) F6 z3 I% x( w7 ~0 g% ?. C; f) rAA1A:= BARSLAST(CROSS(DEA, DIF))+1;8 y/ f. e# m4 T: F* ~5 R) q, f1 y$ M0 b! p0 a* @
AA1B:= IF(起死回生 OR 金叉失败, BARSLAST(起死回生 OR 金叉失败)+3, 99999);- b! S& h/ k8 E9 s. v4 Y# Q/ i+ N
AA1:= IF(AA1B<AA1A, AA1B, AA1A);
g$ [! K2 Z( _7 ]* v* S5 |9 S2 A8 z1 D7 @" @. C. j' l
/ K1 G! N* |& R+ S" i. |4 J. _8 y# q ^8 ~2 l7 }AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;. T* w( G# f F4 u( z
- `* H- _: C7 O$ r5 V8 BAA2B:= IF(REF(起死回生 OR 金叉失败, AA1), REF(BARSLAST(起死回生 OR 金叉失败), AA1), 99999)+3;! I7 s) L1 }* S" o% w
, p& |, T% l' {3 V+ H AA2:= IF(AA2B<AA2A, AA2B, AA2A);: n' W/ U# B6 E/ a
2 z# P! X W+ l6 W$ ]
. A( I; F, ^& A: W7 M2 m T( C# I i! z6 t% p1 ^+ rDIFZ~小值:= LLV(DIF, AA1+AA2);+ c& {+ t1 j# F4 G T( N! L
$ V+ m$ F4 c3 f- N+ A3 `% ~! nDIFZ~小日:= LLVBARS(DIF, AA1+AA2);: a2 S3 K6 ^! P7 Y) U# e. J# l9 j
8 D8 O3 c2 c8 Q7 f% ], Q GDBL1:= IF(DIFZ~小日<=AA1, 0, 1);0 H6 \0 [+ Y" f9 l+ Q
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
7 ?! P, P* k0 G# k! v DBL:= IF(DBL1=0, 0, DBL2);8 s. X$ ~7 \- k" B3 U
$ ?7 Q* V3 c0 b5 g5 ?# e$ S$ V. @& H4 u
. d- J* D2 g, \) G DBLJC: DBL AND (CROSS(DIF, DEA) OR 起死回生) AND DIF>REF(DIF, 1);
|
|