网友求助:

通达信长线趋改成大智慧的金叉和底背离选股公式,多谢了!

LC:=REF(CLOSE,1);
VID:=SUM(VOL,2)/(((HHV(HIGH,2)-LLV(LOW,2)))*100);
RC:=(CLOSE-LC)*VID;
LONG:=SUM(RC,0);
DIFF:=SMA(LONG,10,1);
DEA:=SMA(LONG,20,1);
LON:DIFF-DEA;
LONMA:MA(LON,10);
LONT:LON,COLORSTICK;

 

 

解答如下:

LC:=REF(CLOSE,1);
VID:=SUM(VOL,2)/(((HHV(HIGH,2)-LLV(LOW,2)))*100);
RC:=(CLOSE-LC)*VID;
LONG:=SUM(RC,0);
DIFF:=SMA(LONG,10,1);
DEA:=SMA(LONG,20,1);
LON1:=DIFF-DEA;
LONMA:=MA(LON,10);
CROSS(LON1,LONMA);
===============
{底背离}
LC:=REF(CLOSE,1);
VID:=SUM(VOL,2)/(((HHV(HIGH,2)-LLV(LOW,2)))*100);
RC:=(CLOSE-LC)*VID;
LONG:=SUM(RC,0);
DIFF:=SMA(LONG,10,1);
DEA:=SMA(LONG,20,1);
LON1:=DIFF-DEA;
AA:=BARSLAST(REF(LON1,1)<0 AND LON1>0);
BB:=LLVBARS(LON1,AA+20);
CC:=IF(BB>AA,REF(LON1,BB),0);
XG1:=LON1<0 AND LON1>CC AND CLOSE=LLV(CLOSE,AA+20) AND CC<0;
XG:REF(XG1,1)=1 AND LON1>REF(LON1,1);