等级: 专业版
- 注册:
- 2022-1-11
- 曾用名:
|
KS:="UIK.KS#MIN1";
KT:="UIK.KT#MIN1";
BK10:holding=0&&KCN=1&&O>BBO&&((KDPKJ)>=L&&(KDPKJ)<=H) &&((CD0&&KS=1)||DYNAINFO(34)<=KDPKP)&&DDTPOS,nodraw;
SK10:holding=0&&KCN=-1&&O<BBO &&((KKPDJ)>=L&&(KKPDJ)<=H)&&((CD0&&KT=1)||DYNAINFO(28)<=KKPDP)&&DDTPOS,nodraw;
BP1:=holding>0&&KCN<>1&&((KKPDJ)>=L&&(KKPDJ)<=H)&&((CD0&&KT=1)||DYNAINFO(28)<=KKPDP)&&DDTPOS,nodraw;
SP1:=holding<0&&KCN<>-1&&((KDPKJ)>=L&&(KDPKJ)<=H)&&((CD0&&KS=1)||DYNAINFO(34)<=KDPKP)&&DDTPOS,nodraw;
BP2:=holding>0&&ma1>BBO&&OPENPROFIT<0&&C>BBO&&TCD02&&DDTPOS,nodraw;
SP2:=holding<0&&ma1<BBO&&OPENPROFIT<0&&C<BBO&&TCD02&&DDTPOS,nodraw;
BP10:BP1&&BP2,nodraw;
SP10:SP1&&SP2,nodraw;
//-------------金字塔开仓------------------------------------------------------
GZ:=(STKNAME='50股指连续')||(STKNAME='300股指连续')||(STKNAME='500股指连续')||(STKNAME='1000股指连续'),NODRAW;//为股指
nGZ:=not(GZ),NODRAW;//非股指
if BK10 then begin//
//bzj0:=KDPKP*Multiplier*TACCOUNT(41)+GEGCHARGE('',KDPKP,1,0);//一手保证金占用
//if nGZ=1&&(TACCOUNT(19)+1000)<bzj0&&TSELLHOLDING(1)=0&&ISLASTBAR then goto CONTINUELINE;//+GEGCHARGE('',KDPKP,1,0)
buy(1,1,limitR,KDPKP);//开多,IGNORECHECKPRICE;
Tbuy(1,1,LMT,KDPKP,0);dt:=BARPOS;
end
if SK10 then begin //当
//bzj1:=KKPDP*Multiplier*TACCOUNT(42)+GEGCHARGE('',KKPDP,1,0);//一手保证金占用
//if nGZ=1&&(TACCOUNT(19)+1000)<bzj1&&TBUYHOLDING(1)=0&&ISLASTBAR then goto CONTINUELINE;//+GEGCHARGE('',KKPDP,1,0)
buyshort(1,1,limitR,KKPDP);//
Tbuyshort(1,1,LMT,KKPDP,0);dt:=BARPOS();
end
//=========================目标平仓================================================
if SP1 then begin//
sellshort(1,0,limitR,KDPKP);//
Tsellshort(1,0,LMT,KDPKP,0);dt:=BARPOS();
end
if BP1 then begin //&&dt<>DATE
sell(1,0,limitR,KKPDP);//平多
Tsell(1,0,LMT,KKPDP,0); dt:=BARPOS();
end
if SP2 then begin //当收盘价下穿上轨且有多仓或无仓时&&dt<>DATE
sellshort(1,0,limitR,(C+MINDIFF));//平多
Tsellshort(1,0,LMT,C+MINDIFF,0);dt:=BARPOS();
end
if BP2 then begin //当收盘价下穿上轨且有多仓或无仓时&&dt<>DATE
sell(1,0,limitR,(C-MINDIFF));//平多
Tsell(1,0,LMT,C-MINDIFF,0);dt:=BARPOS();
end
//=========================目标平仓================================================
CONTINUELINE@ HD:=HOLDING,COLORYELLOW,LINETHICK0;
补充内容 (2024-12-20 07:01):
其中被隐去的bzj0来控制不够资金不要发出信号也不能控制
|
-
|