if tenterbars=1 or currenttime>145957 then
begin
tsell(1,0,mkt);
end
我用这个公式进行下一个周期开盘价平仓,在行情是连续的时候没有问题,但是我今天是上午11点20开的仓,在下午胶开盘后却不能平仓,不知为什么?
BuyCon: =con and currenttime<145940;
buylshortcon:=con1 and currenttime<145940;
s:tenterbars=1;
If BuyCon and tholding=0 then begin
tbuy(1,1,mkt);
end
if s or currenttime>145957 then
begin
tsell(1,0,mkt);
end
if buylshortcon and tholding=0 then
begin
tbuyshort(1,1,mkt);
end
if s=1 or currenttime>145957 then
begin
tsellshort(1,0,mkt);
end
以上是我的基本模型 我用的是15分钟周期 平时在上午或下午都能开平仓 但是我今天的是11点20分钟买进,应该到下午13点30分就能平仓,但是没有平仓 我做的是胶 奇怪?谁帮我看看公式结构是否有问题 我的公式意思是开仓后 下一根k线开盘就平仓,收盘前平仓 现在我就是对tenterbars是否中间有中午的时间隔断对平仓有影响不是很明白?
tenterbars中间有中午的时间隔断对平仓没有影响.
看看后台自动化交易里的监控,在对应时间是否有开仓.
跟踪一下tenterbars的值