求老师把‘明天买,今天买’分别改成选股公式

2024-12-26 16:37:02
推荐回答(1个)
回答1:

{明天买}
MA1:=MA(C,5);
MA2:=MA(C,10);
MA3:=MA(C,20);
MA4:=MA(C,30);
VAR1:=MA4>MA2;
VAR2:=MA2>MA1;
VAR3:=MA1>MA3;
VAR4:=MA2>MA3;
VAR5:=((C-REF(C,4))/5)+MA1;
VAR6:=((C-REF(C,9))/10)+MA2;
VAR7:=CROSS(VAR5,VAR6);
VAR8:=CROSS(MA1,MA2);
VAR9:=VAR1 AND VAR2 AND VAR3 AND VAR7;
VAR10:=VAR1 AND VAR4 AND VAR8;
VAR11:=MA1>MA2;
VAR12:=MA2>MA3;
VAR13:=MA3>MA4;
VAR14:=CROSS(VAR6,VAR5);
VAR16:=VAR11 AND VAR12 AND VAR13 AND VAR14 AND C>MA3;
VAR9 OR VAR16;

----------------------------------
{今天买}
MA1:=MA(C,5);
MA2:=MA(C,10);
MA3:=MA(C,20);
MA4:=MA(C,30);
VAR1:=MA4>MA2;
VAR4:=MA2>MA3;
VAR8:=CROSS(MA1,MA2);
VAR10:=VAR1 AND VAR4 AND VAR8;
VAR12:=MA2>MA3;
VAR13:=MA3>MA4;
VAR15:=CROSS(MA2,MA1);
VAR17:=VAR12 AND VAR13 AND VAR15 AND C>MA3;
VAR10 OR VAR17;