TA的每日心情 | 开心 2022-11-11 07:43 |
---|
签到天数: 1848 天 [LV.Master]签到十一级
六段
- 积分
- 56080
|
DIF:= EMA(CLOSE,12)-EMA(CLOSE,26);
4 Z V# w& y1 n' _% N3 QDEA:= EMA(DIF,9);
5 c4 f) j" M& N, W3 Y% OMACD:= (DIF-DEA)*2;/ S5 b4 A. I# l* u" ` I
0 l/ W/ q# C& g' M均值:= SUM(ABS(MACD), 100)/100; F z, p$ d' p5 ~) d
NOTEXT回:= REF(MACD, 2) > REF(MACD, 1) AND REF(MACD, 1) < 均值*0.1 AND
0 V3 Z9 `/ L8 |$ h# h; a; m, yREF(MACD, 1)>=0 AND REF(MACD, 1) < MACD;
) W6 Z: i( ^) J9 Z% K7 g, T金叉败:= REF(MACD, 2) < REF(MACD, 1) AND REF(MACD, 1) > 0-均值*0.1 AND
' i2 F* P5 _ x: cREF(MACD, 1)<=0 AND REF(MACD, 1) > MACD;
9 E& y' b$ y' c6 p: \6 R9 W
% s& v% Z" D1 _/ WAA1A:= BARSLAST(CROSS(DEA, DIF))+1;5 |: j( ~( x$ N0 s, s# y
AA1B:= IF(NOTEXT回 OR 金叉败, BARSLAST(NOTEXT回 OR 金叉败)+3, 99999);' {( @. w3 D( Y0 s% B. L
AA1:= IF(AA1B<AA1A, AA1B, AA1A);
' X& B- Y ?* [, e) W- D% x( s5 C5 S0 n
AA2A:= REF(BARSLAST(CROSS(DEA, DIF)), AA1)+1;
" y z# H- o" c3 n- Z( @8 xAA2B:= IF(REF(NOTEXT回 OR 金叉败, AA1), REF(BARSLAST(NOTEXT回 OR 金叉败), AA1), 99999)+3;
7 B: @- {, c1 iAA2:= IF(AA2B<AA2A, AA2B, AA2A);; C/ U& W# V5 P: ^- G! L
2 b: T' W( ~0 w0 H" S) p% M
DIFZ~小值:= LLV(DIF, AA1+AA2);
( {: O- W( e' j; l( c$ wDIFZ~小日:= LLVBARS(DIF, AA1+AA2);1 T7 ^( o3 c% a5 I( Z. Y' C5 }
DBL1:= IF(DIFZ~小日<=AA1, 0, 1);
; C7 w% U; V3 a" EDBL2:= IF(DBL1=1 AND C<REF(C, DIFZ~小日) AND DIF>REF(DIF, DIFZ~小日), 1, 0);$ L- C. `* M" _( s( f+ d2 ^
DBL:= IF(DBL1=0, 0, DBL2);
5 i3 F% R5 S* C# |/ s$ p
7 _( S% q$ N2 f0 o% qDBLJC: MACD2.DBL AND (CROSS(MACD2.DIF, MACD2.DEA) OR MACD2.NOTEXT回) AND MACD2.DIF>REF(MACD2.DIF, 1);
! Z9 ~4 p! y1 \: z
" d6 T: z+ m( M+ S% [; g# m* ?2 D把中间的字符减少了,测试通过了,不知道有没有改变函数的用法,试试再说 |
|