等级: 超级版主
- 注册:
- 2021-5-24
- 曾用名:
|
//1买入
if open>ref(close,1)*1.05 and open<ref(close,1)*1.07 and CURRENTTIME>092000 and currenttime<092500 then tbuy(1,10%,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
//卖出
GLOBALVARIABLE:flag2=0;
if tbuyholding(1)=0 then flag2:=0;
if currenttime>091000 and currenttime<093000 and flag2=1 then flag2:=2;
//持仓票高开卖出持仓25%
if open>ref(close,1)*1.025 then
begin
tsell(1,25%,mkt),PERTRADER;
end
//IF涨停卖出现有仓位30%
if close = DYNAINFO( 54) then
begin
flag2:=1;
tsell(1,30%,mkt),PERTRADER;
end
//剩余仓位在下一个交易日,开盘低于6%现价卖出现有仓位50%,2点50不涨停清仓,涨停继续持仓,后续交易日保持低于6%卖出50%,不涨停清仓滚动执行
if flag2=2 and open<ref(close,1)*(1-6/100) then tsell(1,50%,mkt),PERTRADER;
if flag2=2 and currenttime>145000 and currenttime<150000 and close<DYNAINFO( 54) then tsell(1,100%,mkt),PERTRADER;
//高开的情况下,现价低于上一日收盘价直接现价的买2价格清仓
//低开超过7%现价清仓,0.5%— -7%之间,开盘出50%仓位,9点40低于上一日收盘价,清仓
if open>ref(close,1)*1.01 and close<ref(close,1) then tsell(1,100%,lmt,DYNAINFO( 29)),PERTRADER;
if open<ref(close,1)*(1-7/100) and close<ref(close,1) then tsell(1,100%,mkt),PERTRADER;
if open>ref(close,1)*(1-7/100) and open<ref(close,1)*(1-0.5/100) then tsell(1,50%,mkt),PERTRADER;
if currenttime>094000 and currenttime<09450000 and close<ref(close,1) then tsell(1,100%,mkt),PERTRADER;
//9点40后,现价下穿均线,现价的买2价格清仓
//11点15后,现价低于均价,现价的买2价格清
if currenttime>094000 and cross(ma(close,5),close) then tsell(1,100%,lmt,DYNAINFO( 29)),PERTRADER;
if currenttime>111500 and close<ma(close,5) then tsell(1,100%,lmt,DYNAINFO( 29)),PERTRADER; |
|