我设法将一些对象放在策略测试图表上,如下所示:
void OnTick() {
ObjectCreate(0,"test9999",OBJ_ARROW_LEFT_PRICE,0,TimeCurrent(),SymbolInfoDouble(_Symbol,SYMBOL_BID)-0,03);
ObjectCreate(0,"test9991",OBJ_ARROW_RIGHT_PRICE,0,TimeCurrent(),SymbolInfoDouble(_Symbol,SYMBOL_BID)-0,03);
ObjectCreate(0,"test9992",OBJ_ARROW_SELL,0,TimeCurrent(),SymbolInfoDouble(_Symbol,SYMBOL_BID)+0,1);
ObjectCreate(0,"test9993",OBJ_VLINE,0,TimeCurrent(),SymbolInfoDouble(_Symbol,SYMBOL_BID)+0,1);
Print(TimeCurrent());
Print(SymbolInfoDouble(_Symbol,SYMBOL_BID));
}
但是,创建的对象不会随着当前时间和投标价格移动。可以看出,我还打印了当前时间和出价,当我开始回测时,我看到打印出的当前时间和出价都发生了变化。任何想法为什么对象没有随着当前时间和投标价格移动?