等级: 免费版
- 注册:
- 2022-3-5
- 曾用名:
|
老师,你好,帮忙加一个DKX多空指标,使KDJ金叉和DKX金叉(DKX上穿MADKX), 二个指标同时共振金叉开多,KDJ死叉和DKX死叉(DKX下穿MADKX),二个指标同时共振死叉开空,谢谢!
input:ss(1,1,100,1);//手数
时间:currenttime>090000 and currenttime<1500000 or currenttime>210000 and currenttime<230000;
DIFF:= EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA), COLORSTICK;
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);
kdjc:=kdjc2;
kksc:=kdsc2;
kd:=cross(k2,d2) and 时间;
kk:=cross(d2,k2) and 时间;
DRAWICON(kd,l,1);
DRAWICON(kk,l,1);
pd:=cross(d2,k2) and 时间;
pk:=cross(k2,d2) 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);
|
|