网友求助:

这是一个网上找的日线选股公式,请哪位高手帮忙改成2个独立的用分钟线选股的公式,一个用5分钟线选的,一个用30分钟线选的,谢谢。这是原公式:

DIFF:=EMA(C,12)-EMA(C,26);
DEA:=EMA(DIFF,9);
轴下二次金叉:COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0))=2 AND CROSS(DIFF,DEA) AND DEA<0;
 

 

 

解答如下:

DIFF:=EMA(C,12)-EMA(C,26);
DEA:=EMA(DIFF,9);
AA:="MACD.DIFF#5MIN";
BB:="MACD.DEA#5MIN";
五分轴下二叉:IF(COUNT(CROSS(AA,BB),BARSLAST(BB>=0))=2 AND CROSS(AA,BB) AND BB<0,0.5,0);
=============
DIFF:=EMA(C,12)-EMA(C,26);
DEA:=EMA(DIFF,9);
AAA:="MACD.DIFF#30MIN";
BBB:="MACD.DEA#30MIN";
三十分轴下二叉:IF(COUNT(CROSS(AAA,BBB),BARSLAST(BBB>=0))=2 AND CROSS(AAA,BBB) AND BBB<0,0.5,0);