N:=60;
MAN:=MA(C,N);
MA60:=MA(C,60);
MA120:=MA(C,120);
MA200:=MA(C,200);
MA60JD:=ATAN((MA60/REF(MA60,1)-1)*100)*180/3.1416;
MA120JD:=ATAN((MA120/REF(MA120,1)-1)*100)*180/3.1416;
MA200JD:=ATAN((MA200/REF(MA200,1)-1)*100)*180/3.1416;
AA:=MA60>MA120 AND MA120>MA200; {中长期均线多头排列。}
BB:=MA60JD>0 AND MA120JD>0 AND MA200JD>0;
CC:=CROSS(MAN,L); {均线穿过K线。}
DD:=C>MAN; {回调而不破位。}
EE:=(MIN(OPEN,CLOSE)-LOW)/(HIGH-LOW)>(1/3);
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
FF:=BARSLASTCOUNT(DIF>0 AND DEA>0);
XG: AA AND BB AND CC AND DD AND EE AND FF;
九毛八公式解读
N赋值:60 MAN赋值:收盘价的N日简单移动平均 MA60赋值:收盘价的60日简单移动平均 MA120赋值:收盘价的120日简单移动平均 MA200赋值:收盘价的200日简单移动平均 MA60JD赋值:(MA60/1日前的MA60-1)*100的反正切*180/3.1416 MA120JD赋值:(MA120/1日前的MA120-1)*100的反正切*180/3.1416 MA200JD赋值:(MA200/1日前的MA200-1)*100的反正切*180/3.1416 AA赋值:MA60>MA120 AND MA120>MA200 BB赋值:MA60JD>0 AND MA120JD>0 AND MA200JD>0 CC赋值:MAN上穿最低价 DD赋值:收盘价>MAN EE赋值:(开盘价和收盘价的较小值-最低价)/(最高价-最低价)>(1/3) DIF赋值:收盘价的12日指数移动平均-收盘价的26日指数移动平均 DEA赋值:DIF的9日指数移动平均 FF赋值:条件连续成立次数 输出XG: AA AND BB AND CC AND DD AND EE AND FF