发送假挂单想到的

最近又从XMT的源码看到下面一段代码,

// Unless backtesting, lets send a fake order to check the OrderModify Execution time, 

if ( IsTesting() == FALSE ) 

{

// To be sure that the fake order never is executed, st the price to twice the current price

fakeprice = ask * 2.0;

// Send a BUYSTOP order

orderticket = OrderSend ( Symbol(), OP_BUYSTOP, LotSize, fakeprice, Slippage, 0, 0, OrderCmt, Magic, 0, Lime );             

Execution = GetTickCount(); 

// Send a modify command where we adjust the price with +1 pip

wasordermodified = OrderModify ( orderticket, fakeprice + 10 * Point, 0, 0, 0, Lime );

// Calculate Execution speed

Execution = GetTickCount() - Execution;

// Delete the order

select = OrderDelete(orderticket);

}

老外使用一段假挂单来检验平台执行速度,之前我有看到一个类似例子,是用来检查平台是不是还在交易(看门狗功能),其特征是OrderOpenPrice设置的很小的挂单,让市场不能执行,另外在价格上或备注上设置特殊代码,后续用来检验,以达到特殊目的,很有创意。



微信公众号:天泓评测


本博客所有文章如无特别注明均为原创。作者:天泓评测
分享到:更多

相关推荐

发表评论

路人甲 表情
Ctrl+Enter快速提交

网友评论(0)