 
等级: 超级版主
- 注册:
- 2021-5-18
- 曾用名:
|
然后当前交易策略如下
// 开仓前提
c1:=STKINDI('','A.DIF',0,6,0)>STKINDI('','A.DEA',0,6,0);
c2:=stkindi('','A.condmacd',0,3,0) and stkindi('','A.DEA',0,3,0)>0;
//开仓条件
cond1:stkindi('','A.cond1',0,4,0);
cond2:stkindi('','A.cond2',0,4,0);
cond3:stkindi('','A.cond3',0,4,0);
if cond1 then
begin
tbuy(1,100000/close,mkt);
SPEAK(1,'信号1');
END
if cond2 then
begin
tbuy(1,50000/close,mkt);
SPEAK(1,'信号2');
END
if cond3 then
begin
tbuy(1,30000/close,mkt);
SPEAK(1,'信号3');
END
//平仓条件
if stkindi('','A.pccond',0,5,0) then tsell(1,tbuyholding(0),mkt); |
|