【SessionFirstBarTime】
[code]inputs:SessionType( numericsimple ),
SessionNum( numericsimple ) ;
variables:
var0( BarType ),
var1( false ),
var2( 0 ) ;
arrays:
arr0[ 1, 50 ]( 0 ) ;
if var0 <> 1 then
RaiseRuntimeError(
"Invalid interval. The SessionFirstBarTime function requires intraday data." ) ;
if var1 = false then
begin
for Value1 = 0 to 1
begin
var2 = SessionCount( Value1 ) ;
for Value2 = 1 to var2
begin
arr0[ Value1, Value2 ] = TimeToMinutes( SessionStartTime(
Value1, Value2 ) ) ;
end ;
end ;
var1 = true ;
end ;
SessionFirstBarTime = MinutesToTime( arr0[ SessionType, SessionNum ] +
BarInterval ) ;
[/code]
页:
[1]