- UID
- 2
- 积分
- 2874624
- 威望
- 1387341 布
- 龙e币
- 1487283 刀
- 在线时间
- 13156 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-11-24
|
【CurrentSessionMS】
- variables:
- var0( false ),
- var1( 0 ),
- var2( 0 ),
- var3( 0 ) ;
- arrays:
- arr0[50]( 0 ),
- arr1[50]( 0 ) ;
- var1 = SessionCountMS ;
- if var0 = false then
- begin
- for Value1 = 1 to var1
- begin
- arr0[Value1] = MinutesIntoWeek( SessionStartDayMS( Value1 ),
- SessionStartTimeMS( Value1 ) ) ;
- arr1[Value1] = MinutesIntoWeek( SessionEndDayMS( Value1 ),
- SessionEndTimeMS( Value1 ) ) ;
- end ;
- var0 = true ;
- var3 = BarType ;
- end ;
- var2 = MinutesIntoWeek( DayOfWeek( Date ), Time ) ;
- for Value1 = 1 to var1
- begin
- condition1 = ( var2 > arr0[Value1] or ( ( var3 = 0 or var3 > 4 ) and var2 >=
- arr0[Value1] ) ) and var2 <= arr1[Value1] ;
- if condition1 then
- begin
- CurrentSessionMS = Value1 ;
- Value1 = var1 ;
- end ;
- end ;
复制代码 |
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|