Board logo

标题: 【Block Trades per Bar】 [打印本页]

作者: 龙听    时间: 2022-11-3 10:56     标题: 【Block Trades per Bar】

  1. inputs:
  2.         BlockSize( 5000 ),                                      
  3.         DataNum( 1 ) ;                                                   

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

  7. condition1 = LastBarOnChart and BarStatus( DataNum ) <> 2 ;
  8. if condition1 then                        
  9.                                                                                  
  10.                                                                            
  11.                                 
  12.         begin

  13.         if var1 <> CurrentBar then
  14.                 begin
  15.                 var0 = 0 ;
  16.                 var1 = CurrentBar ;
  17.                 end ;
  18.        
  19.         if TradeVolume >= BlockSize then
  20.                 var0 = var0 + 1 ;
  21.        
  22.         Plot1( var0, "BlockTrds" ) ;
  23.        
  24.         end ;
复制代码





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