TA的每日心情 | 开心 2022-11-11 07:43 |
---|
签到天数: 1848 天 [LV.Master]签到十一级
六段
 
- 积分
- 56090
|
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);
2 ~ r6 \7 U0 X5 C9 gDEA:= EMA(DIF,9);4 g* g/ o5 O% J% O6 |9 g+ b
MACD:= (DIF-DEA)*2;
; M( t; l6 N$ l- g/ E) i" ?$ _& L# v0 g* @: a
均值:= SUM(ABS(MACD), 100)/100;
: J; I) c8 a; B, O! q$ K3 ANOTEXT回:= REF(MACD, 2) > REF(MACD, 1) AND REF(MACD, 1) < 均值*0.1 AND
7 _9 q7 u0 E$ |& n& v/ [REF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;
8 W; y0 r* S d% ?6 S金叉败:= REF(MACD, 2) < REF(MACD, 1) AND REF(MACD, 1) > 0-均值*0.1 AND
) u; @, R" a/ n3 Z1 g- G. gREF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;
/ ^& ]( y, \/ w2 L9 j& h) \- U( R. p/ Z6 w; j4 ?
AA1A:= BARSLAST(CROSS(DEA, DIF))+1;
+ L& U6 R# ^& y+ |: Q- bAA1B:= IF(NOTEXT回 OR 金叉败, BARSLAST(NOTEXT回 OR 金叉败)+3, 99999);+ c# E! r$ ~0 ^8 r5 |1 |
AA1:= IF(AA1B<AA1A, AA1B, AA1A);+ |. ^! g) A3 x; Q) r) m: `
8 `$ R! t2 a* o& |
AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;6 Z4 ] o! [1 _3 V. \4 q2 `
AA2B:= IF(REF(NOTEXT回 OR 金叉败, AA1), REF(BARSLAST(NOTEXT回 OR 金叉败), AA1), 99999)+3;
" A1 h- r1 n( K# {5 k$ `1 hAA2:= IF(AA2B<AA2A, AA2B, AA2A);* G5 n' x- z5 g! ]9 A
% O5 Z4 F m! P" e4 S7 h. qDIFZ~小值:= LLV(DIF, AA1+AA2);
: T: L% C2 s C9 [ F7 L: p2 IDIFZ~小日:= LLVBARS(DIF, AA1+AA2);
1 d! H9 m( _% o5 kDBL1:= IF(DIFZ~小日<=AA1, 0, 1);
( J$ q8 P6 Q+ j6 H' Y# ]8 X$ fDBL2:= IF(DBL1=1 AND C<REF(C, DIFZ~小日) AND DIF>REF(DIF, DIFZ~小日), 1, 0);, o# v. a7 q8 m4 T; R% t3 \" G3 N/ F- j
DBL:= IF(DBL1=0, 0, DBL2);
4 Y. r8 |4 z/ B& g. I9 {
9 `4 O% h* R5 ^ v. cDBLJC: MACD2.DBL AND (CROSS(MACD2.DIF, MACD2.DEA) OR MACD2.NOTEXT回) AND MACD2.DIF>REF(MACD2.DIF, 1);
% k4 ^ Z% c, G. o+ t; y& i" x6 B D6 `
0 n( H! |' {% _! E' s9 d Y把中间的字符减少了,测试通过了,不知道有没有改变函数的用法,试试再说 |
|