等级: 免费版
- 注册:
- 2022-3-5
- 曾用名:
|
老师,你好,帮忙在以下策略中加个布林线指标,参数 为(2),设置UB为下跌,LB为上涨,使其布林线指标成变窄状,越窄越好,就是UB的值和LB的值,设置在比较小的范围内,使其比较接近BOLL值。开仓条件 同时满足KDJ交叉和布林线闭口。谢谢!
input:ss(1,1,100,1);//手数
时间:currenttime>090000 and currenttime<150000 or currenttime>210000 and currenttime<230000;
RSV:=(CLOSE-LLV(LOW,2))/(HHV(HIGH,2)-LLV(LOW,2))*100;
K2:SMA(RSV,2,1);
D2:SMA(K2,2,1);
J2:3*K2-2*D2;
kdjc2:=cross(k2,d2);
kdsc2:=cross(d2,k2);
kd:=cross(k2,d2) and 时间;
kk:=cross(d2,k2) and 时间;
DRAWICON(kd,l,1);
DRAWICON(kk,l,1);
pk:=cross(k2,d2) and 时间;
pd:=cross(d2,k2) and 时间;
if tbuyholdingex('','',1)>0 and pd then tsell(1,tbuyholdingex('','',1),mkt);
if tsellholdingex('','',1)=0 and kk then tbuyshort(1,ss,mkt);
if tsellholdingex('','',1)>0 and pk then tsellshort(1,tsellholdingex('','',1),mkt);
if tbuyholdingex('','',1)=0 and kd then tbuy(1,ss,mkt);
|
|