等级: 专业版
- 注册:
- 2022-1-11
- 曾用名:
|
老师好,我在指标中加入背离条件限制,但是实际运行没有效果,请老师看我的代码设置是否有问题?
附件图中DBL模板来源于金字塔论坛,我也不太清楚里面的逻辑。
DBL:=STKINDI('000300','DBL.DBL',0,22,30);
DBL1:=STKINDI('000300','DBL.DBL1',0,22,30);
KD:= BIGUPTT>6 AND DIFFHF>1 AND DIFF1>2 AND DBL=0;//开多条件
PD:= MACDHF<0 OR (DIFF3>=5 AND MACD_UP3<0) OR (DIFF2>=3 AND MACD_UP2<0) OR (DIFF1>=2 AND MACD_UP1<0);
KK:= BIGDNTT>6 AND DIFFHF<-1 AND DIFF1<-2 AND DBL1=0;//开空条件
PK:= MACDHF>0 OR (DIFF3<=-5 AND MACD_DOWN3<0) OR (DIFF2<=-3 AND MACD_DOWN2<0) OR (DIFF1<=-2 AND MACD_DOWN1<0);
TSELL(PK,0,MKT,0,0,'','10003739'); //平空信号
TBUY(KD AND TBUYHOLDINGEX('','10003729',2)=0,1,MKT,0,0,'','10003729'); //开多信号
TSELL(PD,0,MKT,0,0,'','10003729'); //平多信号
TBUY(KK AND TBUYHOLDINGEX('','10003739',2)=0,1,MKT,0,0,'','10003739'); //开空信号
|
|