如何获取当前交易商品是否有夜盘?
如何获取当前交易商品是否有夜盘?多谢!
如何获取当前交易商品是否有夜盘?多谢!
Vars CodeProperty cp; //合约属性 Events OnReady() { // 确保成功获取合约属性 if (!GetProperty(cp)) { PushStatusMsg("获取合约属性失败"); return; } // 检查交易时间段是否包含夜盘标识"21" if (FindFirstOf(cp.dealTimes, "21") == InvalidInteger) { PushStatusMsg("没有夜盘"); } Else { PushStatusMsg("有夜盘"); } }
CodeProperty cp; //合约属性Bool ret = GetProperty(cp);If(FindFirstOf(cp.dealTimes,\"21\")==InvalidInteger){ //没有夜盘}
GetSessionCount 交易时段个数判断