
等级: 专业版
- 注册:
- 2022-1-11
- 曾用名:
|

楼主 |
发表于 2022-12-13 09:20
|
显示全部楼层
abb:=(time0-timetot0(dynainfo(207)));//K线结束倒计时间(秒)
akk:=timetot0(dynainfo(207))-ref(time0,1);//k线的最开始的时间(秒)
cd0:=not(ISLASTBAR);
cd1:=islastbar and abb>=0 and abb<1;// and bili>=Tbili;
cd2:=islastbar and akk>=0 and akk<1;
TCD01:=(CD0||CD1);
TCD02:=(CD0||CD2);
TJ0:=BARSLAST((KDPK0&&mHOLDING<0)||(KKPD0&&mHOLDING>0));
TJ1:=BARSLAST((KDPK00&&mHOLDING>0)||(KKPD00&&mHOLDING<0));
//-------------金字塔BPK书写------------------------------------------------------
if (TJ0=0||TJ1>=1) then begin//BARSLAST((KDPK0&&mHOLDING<0)||(KKPD0&&mHOLDING>0))=0||
BSK1:=BARPOS;;//
end
BKCN:=(BARPOS-BSK1)&&TCD01;
//-------------金字塔平书写仓------------------------------------------------------
if mholding>0 and (BKCN=1)&&HOLDING>0&&TCD01 then begin
sell(1,HOLDING,limitR,C);//
Tsell(1,HOLDING,LMT,C,0);//
mHolding:=0;
//EXTGBDATASET(G5H,0);
end
if mholding<0 and (BKCN=1)&&HOLDING<0&&TCD01 then begin
sellshort(1,HOLDING,limitR,C);//
Tsellshort(1,HOLDING,LMT,C,0);//
mHolding:=0;
//EXTGBDATASET(G5H,0);
end |
|