季天数:=BARSLAST(cross(MONTH=1 or MONTH=4 or MONTH=7 or MONTH=10,0.5) or barpos=1);
月天数:=BARSLAST(MONTH<>ref(MONTH,1) or barpos=1);
年天数:=1+BARSLAST(year<>ref(year,1) or barpos=1);
{ 爱约股_大智慧股票指标公式}
周天数:=1+BARSLAST(DAYS1970-ref(DAYS1970,1)<>weekday-ref(weekday,1) or barpos=1);
量:vol,volstick;
yt:=月天数+1;
jt:=季天数+1;
周均:ma(vol,周天数),colorff9900;
月均:ma(vol,yt),coloryellow;
季均:ma(vol,jt),colorwhite;
年均:ma(vol,年天数),color00ff00;
drawtext(cross(周均,月均),月均,'▲'),coloryellow;
stickline(月均>季均 and v>年均,0,年均,6,0),color0099ff;
stickline(v>年均,年均,v,6,0),colorred;