等级: 专业版
- 注册:
- 2022-8-5
- 曾用名:
|
楼主 |
发表于 2022-12-21 09:36
|
显示全部楼层
后台买入在这里
//1买入
if open>ref(close,1)*1.01 and open<ref(close,1)*1.04 and CURRENTTIME>092500 and currenttime<093000 then tbuy(1,10%,lmt,DYNAINFO( 51)),PERTRADER;
//另一种买入
if open>ref(close,1)*1.0401 and open<ref(close,1)*1.07 and CURRENTTIME>092500 and currenttime<093000 then tbuy(1,5%,lmt,DYNAINFO( 51)),PERTRADER;
if open>ref(close,1)*1.0401 and open<ref(close,1)*1.07 and CURRENTTIME>092500 and currenttime<093000 then tbuy(1,5%,mkt),PERTRADER;
//第三种买入
if open>ref(close,1)*1.0701 and CURRENTTIME>092500 and currenttime<093000 then tbuy(1,3%,lmt,DYNAINFO( 51)),PERTRADER;
if open>ref(close,1)*1.0701 and CURRENTTIME>092500 and currenttime<093000 then tbuy(1,4%,mkt),PERTRADER;
//用来标记是否执行过撤单
GLOBALVARIABLE:flag=0;
if CURRENTTIME>091000 and currenttime<092000 then flag:=0;
if TSUBMITEX( 1,'' ,'' )>5 and CURRENTTIME>092000 and currenttime<092500 then
begin
TCANCEL(1,1);
flag:=1;
end
//自动全部撤单,然后以9点30分开盘按卖2价格买入,买入仓位10%
if flag=1 and CURRENTTIME>093000 and currenttime<093100 then
begin
tbuy(1,10%,lmt,DYNAINFO( 35)),PERTRADER;
flag:=0;
end
//10点全部撤单
if CURRENTTIME>100000 then
begin
TCANCEL(1,1);
END |
|