收盘平仓不执行

Params Numeric FastLength(5);// 短期指数平均线参数 Numeric SlowLength(20);// 长期指数平均线参数Vars Series<Numeric> AvgValue1; Series<Numeric> AvgValue2;EventsOnInit(){array<Numeric> timepoint;timepoint[0] = 0.112950;timepoint[1] = 0.145930;SetTriggerBarClose(timepoint);} OnReady() { SetBackBarMaxCount(1+Max(FastLength,SlowLength)); Range[0:DataSourceSize() - 1] { setPlotOption("MA1", "begin-bar", FastLength); setPlotOption("MA2", "begin-bar", SlowLength); } } OnBar(ArrayRef<Integer> indexs) { AvgValue1 = AverageFC(Close,FastLength); AvgValue2 = AverageFC(Close,SlowLength); PlotNumeric("MA1",AvgValue1); PlotNumeric("MA2",AvgValue2); If(MarketPosition <>1 && AvgValue1[1] > AvgValue2[1]) { Buy(0,Open); } If(MarketPosition <>-1 && AvgValue1[1] < AvgValue2[1]) { SellShort(0,Open); } } OnBarClose(ArrayRef<Integer> indexs){if(time == 0.1445){sell(0,close);BuyToCover(0,close);Commentary("收盘平仓");}}实盘收盘在最后30秒不执行平仓

这么多贴就不能放在一个帖子里说明吗?好乱啊