增加布林通道指标限制开仓 [金字塔]
- 咨询内容:
老师您好!!如下模型请增加布林通道指标限制开仓.上轨与下轨距离要大于30点开仓.上穿上轨开空.下穿下轨开多.谢谢!!
VAR1:=EMA(EMA(c,3),3);VAR2:=REF(VAR1,1);kp1:=(VAR1-VAR2)/VAR2*100000;VAR1:=EMA(EMA(c,3),3);VAR2:=REF(VAR1,1);kp2:=(VAR1-VAR2)/VAR2*100000;EXITTIME:=IF (STRLEFT(STKLABEL(),2)=STRLEFT('IFD',2),TIME >= 151400,TIME >= 145800) ;aXITTIME:=IF (STRLEFT(STKLABEL(),2)=STRLEFT('IFD',2),TIME < 151400,TIME < 145800) ;
kp15:=STKINDI('','zldt.kp',0,3);
kp16:=STKINDI('','zldt1.kp',0,3);
KD:=cross(kp1,0); //开多条件PD:=kp2<0; //平多条件KK:=cross(0,kp2); //开空条件PK:=kp1>0; //平空条件
平空:SELLSHORT(PK OR EXITTIME,lots,limitr,close+0.1*mindiff); //平空信号平多:SELL(PD OR EXITTIME,lots,limitr,close-0.1*mindiff); //平多信号
开多:BUY(KD AND HOLDING=0 and aXITTIME,lots,limitr,close+0.1*mindiff); //开多信号
开空:BUYSHORT(KK AND HOLDING=0 and aXITTIME,lots,limitr,close-0.1*mindiff);//开空信号 - 金字塔客服:
m:=26;
n:=2;
MID : MA(CLOSE,M);
UPPER: MID + N*STD(CLOSE,M);
LOWER: MID - N*STD(CLOSE,M);if upper-lower>=30 and cross(h,upper) then buyshort(holding=0,1,market);
if upper-lower>=30 and cross(lower,l) then buy(holding=0,1,market);
- 用户回复:
如下KD.KK.无限制.应要用and连上通道指标
KD:=cross(kp1,0); //开多条件
KK:=cross(0,kp2); //开空条件
- 网友回复:
要求上轨与下轨矩为30点.小于30点不开仓.大于30点才开仓
- 网友回复: 1楼我写错了
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 511411198 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容