等级: 超级版主
- 注册:
- 2021-5-24
- 曾用名:
|
//盈利
if (close-TAVGENTERPRICEEX2('' ,'' , 0))*tbuyholding(1)*MULTIPLIER>close*tbuyholding(1)*MULTIPLIER*TACCOUNT(41)*0.1 then
begin
tsell(1,tbuyholding(1),mkt);
WRITEINIFILE('C:\TESTNINFILE.INI',stklabel,numtostr(date,0),1);
END
//亏损
if (TAVGENTERPRICEEX2('' ,'' , 0)-close)*tbuyholding(1)*MULTIPLIER>close*tbuyholding(1)*MULTIPLIER*TACCOUNT(41)*0.05 then
begin
tsell(1,tbuyholding(1),mkt);
WRITEINIFILE('C:\TESTNINFILE.INI',stklabel,numtostr(date,0),1);
END
//开仓条件中加上一个ini判断
if GETINIFILE('C:\TESTNINFILE.INI',stklabel,numtostr(date,0))=0 then
begin
tbuy(1,1,mkt);
END |
|