马上注册,享用更多功能,让你轻松玩转本论坛。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
请设置计算参数:
KJX: Param#0 (0.00--1.00)
MJX: Param#1 (0.00--1.00)
MDJ: Param#2 (0.00--1.00)
M5X: Param#3 (0.00--1.00)
TSU: Param#4 (1.00--10.00)
=========================================
{KDJ20之上金叉}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
CROSSKDJ:=COUNT((CROSS(K,D) AND D>20),TSU);
{MACD 金叉}
DIFM:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEAM:=EMA(DIFM,9);
CROSSMACD:=COUNT(CROSS(DIFM,DEAM),TSU);
{DMI 怀中金叉}
MTR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),14);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),14);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),14);
PDI:=DMP*100/MTR;
MDI:=DMM*100/MTR;
ADX:=EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,6);
ADXR:=EXPMEMA(ADX,6);
CROSSDMI:=COUNT((PDI>MDI AND PDI>ADX AND PDI>ADXR AND ADX>MDI AND ADXR>MDI AND CROSS(ADX,ADXR)), TSU);
{MA 5X10}
MA5:=MA(C,5);
MA10:=MA(C,10);
CROSSMA5:=COUNT((CROSS(MA5,MA10)), TSU);
{XGCROSSKDJ>0 OR (KJX=0)) AND (CROSSMACD>0 OR (MJX=0)) AND (CROSSDMI>0 OR (MDI=0)) AND (CROSSMA5>0 OR (M5X=0));};
XG0:= ((KJX=0 AND MJX=0 AND MDJ=0 AND M5X=0) );
XG1:= ((KJX=0 AND MJX=0 AND MDJ=0 AND M5X=1) AND (CROSSMA5));
XG2:= ((KJX=0 AND MJX=0 AND MDJ=1 AND M5X=0) AND (CROSSDMI));
XG3:= ((KJX=0 AND MJX=0 AND MDJ=1 AND M5X=1) AND (CROSSDMI AND CROSSMA5));
XG4:= ((KJX=0 AND MJX=1 AND MDJ=0 AND M5X=0) AND (CROSSMACD));
XG5:= ((KJX=0 AND MJX=1 AND MDJ=0 AND M5X=1) AND (CROSSMACD AND CROSSMA5));
XG6:= ((KJX=0 AND MJX=1 AND MDJ=1 AND M5X=0) AND (CROSSMACD AND CROSSDMI));
XG7:= ((KJX=0 AND MJX=1 AND MDJ=1 AND M5X=1) AND (CROSSMACD AND CROSSDMI AND CROSSMA5));
XG8:= ((KJX=1 AND MJX=0 AND MDJ=0 AND M5X=0) AND (CROSSKDJ));
XG9:= ((KJX=1 AND MJX=0 AND MDJ=0 AND M5X=1) AND (CROSSKDJ AND CROSSMA5));
XG10:=((KJX=1 AND MJX=0 AND MDJ=1 AND M5X=0) AND (CROSSKDJ AND CROSSDMI));
XG11:=((KJX=1 AND MJX=0 AND MDJ=1 AND M5X=1) AND (CROSSKDJ AND CROSSDMI AND CROSSMA5));
XG12:=((KJX=1 AND MJX=1 AND MDJ=0 AND M5X=0) AND (CROSSKDJ AND CROSSMACD));
XG13:=((KJX=1 AND MJX=1 AND MDJ=0 AND M5X=1) AND (CROSSKDJ AND CROSSMACD AND CROSSMA5));
XG14:=((KJX=1 AND MJX=1 AND MDJ=1 AND M5X=0) AND (CROSSKDJ AND CROSSMACD AND CROSSDMI));
XG15:=((KJX=1 AND MJX=1 AND MDJ=1 AND M5X=1) AND (CROSSKDJ AND CROSSMACD AND CROSSDMI AND CROSSMA5));
XGXG1 OR XG2 OR XG3 OR XG4 OR XG5 OR XG6 OR XG7 OR XG8 OR XG9 OR XG10 OR XG11 OR XG12 OR XG13 OR XG14 OR XG15);
|