- UID
- 2
- 积分
- 2874674
- 威望
- 1387366 布
- 龙e币
- 1487308 刀
- 在线时间
- 13156 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-11-24
|
【Next3rdFriday】
- inputs:
- Series( numericsimple ) ;
- variables:
- var0( 0 ),
- var1( 0 ),
- var2( 0 ),
- var3( 0 ),
- var4( 0 ),
- var5( 0 ),
- var6( 0 ),
- var7( 0 ),
- var8( 0 ),
- var9( 0 ),
- var10( 0 ) ;
-
- var0 = DayOfMonth( Date ) ;
- var1 = Month( Date ) ;
- var2 = Year( Date ) ;
- var3 = DayOfWeek( var2 * 10000 + var1 * 100 + 1 ) ;
- if var3 < 6 then
- var4 = 6 - var3
- else
- var4 = 7 ;
- var5 = var4 + 14 ;
- if var5 > var0 then
- var7 = var1 + Series - 1
- else
- var7 = var1 + Series ;
- if var7 > 12 then
- begin
- var7 = var7 - 12 ;
- var8 = var2 + 1 ;
- end
- else
- var8 = var2 ;
- var3 = DayOfWeek( var8 * 10000 + var7 * 100 + 1 ) ;
- if var3 < 6 then
- var4 = 6 - var3
- else if var3 = 6 then
- var4 = 7 ;
- var6 = var4 + 14 ;
- var9 = DateToJulian( var8 * 10000 + var7 * 100 + var6 ) ;
- var10 = DateToJulian( Date ) ;
- Next3rdFriday = var9 - var10 ;
复制代码 |
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|