网友求助:

要求是:量5从下上拐穿过量10,同时zz从下上拐穿过量5、量10,当天条件同时满足,作一大智慧预警公式,谢谢!

附原码:

量5:EMA(EMA(VOL,2.5),2.5);
量10:EMA(EMA(VOL,7),7);
VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
成交:=VOL;
主买:=IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),COLOR00E521;
主卖:=IF(CLOSE>OPEN,VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,VAR1*(HIGH-LOW),VOL/2));
买卖比:主买/主卖,NODRAW;
昨日比:买卖比/REF(买卖比,1);
STICKLINE(主买,0,主买,3,0),COLORRED,LINETHICK2;
STICKLINE(主卖,0,主卖,1.5,0),COLORGREEN,LINETHICK2;
AA:=REF(量5,1)<REF(量5,2) AND 量5>REF(量5,1),NODRAW;
IF(量5>REF(量5,1), 量5,DRAWNULL),COLORRED,LINETHICK2;
AAA:=SUM((主买-主卖),10),NODRAW;
ZZ:AAA,COLORMAGENTA,LINETHICK2;

 

 

 

把(资金比)作一大智慧预警公式

 

解答如下:

量5:=EMA(EMA(VOL,2.5),2.5);
量10:=EMA(EMA(VOL,7),7);
VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主买:=IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主卖:=IF(CLOSE>OPEN,VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,VAR1*(HIGH-LOW),VOL/2));
AAA:=SUM(主买-主卖,10);
ZZ:=AAA;
CROSS(量5,量10) AND CROSS(ZZ,量5) AND CROSS(ZZ,量10);