【RS_BarsPerDay】
[code]variables:var0( false ),
var1( 0 ),
var2( 0 ),
var3( 0 ),
var4( 0 ),
var5( 0 ),
var6( 0 ) ;
if var0 = false then
begin
var1 = BarInterval ;
for Value1 = 1 to SessionCount( 0 )
begin
var2 = MinutesIntoWeek( SessionStartDay( 0, Value1 ),
SessionStartTime( 0, Value1 ) ) ;
var3 = MinutesIntoWeek( SessionEndDay( 0, Value1 ),
SessionEndTime( 0, Value1 ) ) ;
var4 = var3 - var2 ;
var5 = Ceiling( var4 / var1 ) + 2
;
var6 = var6 + var5 ;
end ;
RS_BarsPerDay = Ceiling ( var6 / 5 ) ;
var0 = true ;
end ;
[/code]
页:
[1]