简体   繁体   English

如何在QuickFix C ++中设置FIX :: ExpireTime

[英]How to set FIX::ExpireTime in QuickFix C++

I am using QuickFIx C++ engine I want to send GTT(Good Till Time) order for which I need to set FIX::ExpireTime to UTCTimeStampFormat. 我正在使用QuickFIx C ++引擎我想发送GTT(Good Till Time)订单,我需要将FIX :: ExpireTime设置为UTCTimeStampFormat。 The time portion specifies the amount of time before the order expires. 时间部分指定订单到期前的时间量。 For example, for an order that expires in ten seconds, the value could be 00000000-00:00:10.000. 例如,对于在十秒内到期的订单,该值可以是00000000-00:00:10.000。 ieThe relative expiration time of the order in the format YYYYMMDD-hh:mm:ss.sss . 即订单的相对到期时间,格式为YYYYMMDD-hh:mm:ss.sss。

Here, lets say I have a variable: int delay = 10. ie I need to cancel the order if it is not fillled in 10 secs. 在这里,假设我有一个变量:int delay = 10.即如果未在10秒内填充,我需要取消订单。

Can anyone please suggest how to set above value(delay) in 00000000-00:00:10.000 format so that I can set FIX::ExpireTime. 任何人都可以建议如何设置00000000-00:00:10.000格式的上述值(延迟),以便我可以设置FIX :: ExpireTime。

Currently I am using: 目前我正在使用:

FIX::UtcTimeStamp expireTime(0, 0, 10, 0, 0, 0, 0);

newOrderSingle.set(FIX::ExpireTime(expireTime.getTime()));

But it seems to take current time, not 00000000-00:00:10.000. 但它似乎需要当前时间,而不是00000000-00:00:10.000。

Thanks and Regards garv 谢谢和问候加夫

如何将过期设置为字符串?

message.setField(FIX::FIELD::ExpireTime, "00000000-00:00:10.000");

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM