【AB_NextColor】
程式码:[code]inputs:
MinuteInterval( numericsimple ) ;
variables:
var0( 0 ),
var1( 0 ),
var2( 0 ),
var3( 0 ),
var4( RGBToLegacyColor( GetBackGroundColor ) ) ;
condition1 = BarType = 1
and MinuteInterval >= BarInterval
and ( MinuteInterval <= BarInterval of Data1 or BarType of Data1 = 2 ) ;
if condition1 then
begin
var1 = MinutesIntoWeek( DayOfWeek( Date ), Time ) ;
var0 = BarStatus( 1 ) ;
condition1 = ( CurrentBar of Data1 = 1 and var0 = 2 ) or var0[1] = 2;
if condition1 then
begin
var3 = 1 ;
var2 = var1 - BarInterval ;
end ;
if var1 > var2 + MinuteInterval then
begin
var3 = var3 + 1 ;
if var3 > 16 then
var3 = 1 ;
var2 = var1 - BarInterval ;
end ;
if var3 = var4 then
if var3 = 16 then
var3 = 1
else
var3 = var3 + 1 ;
end
else
var3 = var4 ;
AB_NextColor = LegacyColorToRGB( var3 ) ;
[/code]
页:
[1]