StockTradeDate
简述
指定时间点属于的交易日,与系统参数(证券代码、时间)相关。
判定规则:日盘,日盘交易时间和期间休盘时间点返回所属交易日;
夜盘,夜盘交易时间返回所属交易日;
其余时间点,返回为0。
StockTradeDate(Ttype:Integer):Real
名称 | 类型 | 说明 |
---|
Ttype | Integer | 整数。是否考虑集合竞价时段。0:不考虑;1:考虑 |
返回 | Real | 实数。返回证券指定时间点所属的交易日。若指定时间点为非交易时间,则返回为0。 |
//"bc2401"在2023-12-16 00:30:00时所属的交易日,不考虑集合竞价时段
SetSysParam(pn_stock(),"bc2401");
SetSysParam(PN_Date(),20231216.0030T);
return StockTradeDate(0);
//结果:45278,即2023-12-18