这样写能实现发单5秒钟后不成交,马上撤单吗?

data-href=

data-href=

这样写,能实现发单后,5秒钟不成交,马上撤单吗?

运行是不行的,print,tmpOrderbuy.localDateTime,是0,并没有时间。问题出在哪里?

我想实现先撤掉之前所有挂的单再新开多仓,可以这样写吗
交易助手撤单后未重发
用程序化怎么实现买入后,马上下止盈止损单
请问一下老师,我想实现早午晚尾盘自动平仓,这样写代码可以吗?
想在集合竞价发单,确保在开盘价成交,如何实现
图标交易发出的映射成交单在成交更新驱动中能收到驱动信号吗?
如何实现FAK发单
TB支持向后引用数据吗,比如avgValue[1]=Close实现这样的功能。
撤单后交易助手不给重新发单
这样写会信号闪烁吗

Params

Vars

global numeric big_con;

array<integer>ids;

Global integer timer_1;

   Global numeric buy_ord;

   Global numeric mybuy_ordprice;

   Order tmporderbuy;

Events

OnInit()//----------------------------------------------------------------------------------------------------------

{

big_con=0;

timer_1=CreateTimer(500);

}

OnOrder(OrderRef ord)//-----------------------------------------------------------------------------------------------

   {

    if(ord.orderid==buy_ord and ord.status==Enum_Declare)

    {

    mybuy_ordprice=ord.price;

    tmporderbuy=ord;

}

   }

OnTimer(Integer id,Integer Millsecs)//---------------------------------------------------------------------------------

{

if(id==timer_1)

{

get order

print2quote(\"输出\",tmpOrderbuy.localDateTime,\"卖单报单时间\");

print(\"tmpOrderbuy.localDateTime=\"+text(tmpOrderbuy.localDateTime));

if(big_con==1)

{

if(TimeDiff(tmpOrderbuy.localDateTime,SystemDateTime)>5)

{

A_DeleteOrderEx(buy_ord);

big_con=11;

}

}          

}

}

OnBar(ArrayRef<Integer> indexs)

{

if(barstatus==2 and big_con==0)//开仓

{

if(h-c[1]>=3)

{

A_SendOrderEx(Symbol,enum_buy,enum_entry,1,c[1]+2,ids);

buy_ord=ids[0];

big_con=1;

}

}

}

Order tmporderbuy,是不是也应该定义为Global ,这样在ontime里就能访问到tmporderbuy的属性值了。