请高手将下列通达信公式改为选股公式,要求选出有“红色柱的”。

2024-12-18 18:43:41
推荐回答(2个)
回答1:

{抄底王}
VAR2:=MA(CLOSE, 5);
VAR3:=MA(CLOSE, 10);
VAR4:=MA(CLOSE, 20);
VAR5:=MA(CLOSE, 30);
VAR6:=(VAR2+VAR3+VAR4+VAR5)/4;
VAR7:=(VAR6-REF(VAR6,15))/REF(VAR6, 15)*100;

红柱选股:COUNT(VAR7>REF(VAR7,1),BARSLAST(NOT(VAR7>REF(VAR7,1))))=1;

回答2:

选出所有红柱:
{抄底王}
VAR2:=MA(CLOSE, 5);
VAR3:=MA(CLOSE, 10);
VAR4:=MA(CLOSE, 20);
VAR5:=MA(CLOSE, 30);
VAR6:=(VAR2+VAR3+VAR4+VAR5)/4;
VAR7:=(VAR6-REF(VAR6,15))/REF(VAR6, 15)*100;
选股:VAR7>1*REF(VAR7, 1),;

选出刚变红:
{抄底王}
VAR2:=MA(CLOSE, 5);
VAR3:=MA(CLOSE, 10);
VAR4:=MA(CLOSE, 20);
VAR5:=MA(CLOSE, 30);
VAR6:=(VAR2+VAR3+VAR4+VAR5)/4;
VAR7:=(VAR6-REF(VAR6,15))/REF(VAR6, 15)*100;
选3日前低位变红:VAR7>1*REF(VAR7, 1) AND REF(VAR7,2)<1*REF(VAR7, 3) AND VAR7<0;