Board logo

标题: 【SessionCountDay】 [打印本页]

作者: 龙听    时间: 2022-11-2 13:00     标题: 【SessionCountDay】

  1. inputs:
  2.         SessionType( numericsimple ),                                
  3.         XDay( numericsimple ) ;               

  4. variables:
  5.         var0( 0 ),
  6.         var1( 0 ) ;

  7. var0 = SessionCount( SessionType ) ;
  8. var1 = 0 ;
  9. for Value1 = 1 to var0
  10.         begin
  11.         condition1 = SessionStartDay( SessionType, Value1 ) = XDay ;
  12.         if condition1 then
  13.                 begin
  14.                 condition1 = SessionEndDay( SessionType, Value1 ) = XDay ;
  15.                 if condition1 then
  16.                         var1 = var1 + 1 ;
  17.                 end
  18.         else
  19.         begin
  20.         condition1 = SessionStartDay( SessionType, Value1 ) > XDay ;
  21.         if condition1 then
  22.                 Value1 = var0 ;                                 
  23.                 end;
  24.         end ;

  25. SessionCountDay = var1 ;
复制代码





欢迎光临 龙听期货论坛 (http://qhlt.club/) Powered by Discuz! 7.2