源码
选股周期:日线
源码:
{今日涨幅}
ZF:=(C-REF(C,1))/REF(C,1)*100;
MA5:=MA(c,5);
MA10:=MA(c,10);
MA20:=MA(c,20);
MA30:=MA(c,30);
MA250:=MA(c,250);
{均线}
A:=IF(CROSS(C,MA5),1,0);
B:=IF(CROSS(C,MA10),1,0);
D:=IF(CROSS(C,MA20),1,0);
E:=IF(CROSS(C,MA30),1,0);
{满足任意条件中的3个,同时收盘站上年线}
TJ1:=A+B+D+E>=3 AND C>MA250;
{TJ1满足到当前的天数}
DTJ1:=BARSLAST(TJ1);
{TJ1满足后到当前每天收盘价和最低价抬高,TJ1成立后每天小阳};
TJ2:=COUNT(C>REF(C,1),DTJ1)=DTJ1
AND COUNT(C>REF(L,1),DTJ1)=DTJ1
AND COUNT(ZF>0 AND ZF<3,DTJ1)=DTJ1;
{当天涨幅大于6个点,最高价回调不超过2个点,收盘价大于开盘价,今日成交是昨日1.5倍以上,今日收盘价小于120日内收盘2倍以上,今日收盘价不是120日内最高收盘价}
XG:ZF>6
AND H-C/C*100 <2
AND REf(TJ2,1)
AND C>O
AND V>REF(V,1)*1.5
AND C<LLV(C,120)*2
AND C<HHV(C,120);
{选股出来后40天内计算收益}
DXG:=BARSLAST(XG);
收益:=if(DXG >0 and DXG <40,(C-REF(C,DXG))/REF(C,DXG) *100,0);
正收益:=IF(收益>0,收益,0),Colorred;
负收益:=IF(收益<0,收益,0),ColorGREEN;