请教:临近收盘就进场问题

目的:只要有空仓,临近收盘(如14:59:00)就加仓,测试无法体现加仓效果。如果不加时间限制,担心收盘时无法成交 If(MarketPosition==-1 ){ If(preEntryPrice!=InvalidNumeric ){ If( CurrentTime==0.145900){ myEntryPrice = Close; preEntryPrice = myEntryPrice; SellShort(0,myEntryPrice); SendOrderThisBar = True; } } }

谢谢老师

currenttime只用于实盘,测试和实盘可以分开,另外可以用onbarclose +时间提前来操作