等级: 免费版
- 注册:
- 2021-5-20
- 曾用名:
|
固定轮询,1秒,TICK,信号闪烁,为何?
KDPK3:=REF(KDPK0,1);
KKPD3:=REF(KKPD0,1);
BPm:=barslast(KKPD0) and KKPD3;
SPm:=barslast(KDPK0) and KDPK3;
//-------------金字塔BPK书写------------------------------------------------------
if SPm=1 then begin//当收盘价上穿下轨且有空仓或无仓时
if holding<=0 then begin
sellshort(1,LOTS,limitR,(O+MINDIFF));//平空
buy(1,Lots,limitR,O+MINDIFF);//开多,IGNORECHECKPRICE;
end
end
if BPm=1 then begin //当收盘价下穿上轨且有多仓或无仓时
if holding>=0 then begin
sell(1,LOTS,limitR,(O-MINDIFF));//平多
buyshort(1,Lots,limitR,O-MINDIFF);//开空
end
end
谢谢,在线等。
补充内容 (2021-8-6 09:19):
固定轮询,1秒,TICK,信号闪烁,为何?
KDPK3:=REF(KDPK0,1);
KKPD3:=REF(KKPD0,1);
纠正:
BPm:=barslast(KKPD0) =1 and KKPD3;
SPm:=barslast(KDPK0) =1 and KDPK3;
补充内容 (2021-8-6 09:56):
LL:=-6;LH:=6;
KDPK0:=CROSS(LL,BIAS*100);//
KKPD0:=CROSS(BIAS*100,LH);//
KDPK3:=REF(KDPK0,1);
KKPD3:=REF(KKPD0,1);
BPm:=barslast(KKPD0) =1 and KKPD3;
SPm:=barslast(KDPK0) =1 and KDPK3;
//-----------... |
|